When converting InstanceCall to LoadField don't adjust deoptimization
environment because when we deoptimize from LoadField back to
InstanceCall we would expect to have receiver on the stack.
This is a different situation from LoadField to LoadField lazy
deoptimization in which case receiver should not be on the stack.
Regression test provided by Ryan.
Fixed: 42900
Change-Id: I6041ff02abf22a2bae0fdcd65d5b49ef8aec6204
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157182
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.
Change-Id: Idb389a079f7405fe4adc51bafd715a3f31a9cc7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157465
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
They were sometimes timing out, or close to the 60min execution timeout.
Also moved the co19 nnbd tests with asserts to the end to ensure that is
what is running on the local shard. This should reduce wasted capacity
when waiting on shards (co19 with asserts is the slowest config).
Change-Id: I18235f1f710190aaea2021a7923ec03e7c75b595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157489
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.
In the process, I discovered a flow analysis bug
(https://github.com/dart-lang/sdk/issues/42957), which I plan to fix
in a follow-up CL. For now the test that provoked the bug is marked
as failing.
Change-Id: I0767d650cfaecb125b0cea27c0c7971d3112deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
If a static error test only has expectations for *warnings* then it
still has well-defined runtime semantics that we want to test.
This distinguishes those tests and runs them on non-front-end
configurations.
Change-Id: I41b8d84a229ba53ad0db0271b28a9b9482ad582d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155305
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
In a follow-up CL I will update error reporting logic.
Change-Id: I6fd2916c24a531b1f41bd2872301ffec1fdb8722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The documentation states the parameter must be an integer satisfying
`0 <= fractionDigits <= 20`. Given the existing implementation
passing `null` works like passing 0 but the VM and dart2js both throw
on `null` so it makes sense to enforce the precondition.
Change-Id: I71648b76dc5a4cece2f9b873bdcf58c2ff0563bc
Fixes: https://github.com/dart-lang/sdk/issues/42919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157421
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
lib/html/js_typed_interop_type_test.
Also update the error produced when an interop type contains a
non-external member in case users run into it via a late field.
Change-Id: I5968f4c8b3a71a3d467412c4499524ec4cc9d838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157161
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
This change adds support for generating simple kernel files. More exotic
kernel generation can still be done using the gen_kernel script.
Fixes https://github.com/dart-lang/sdk/issues/42602
Change-Id: If5f281770dada4a81d85d81d2c36439174540724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153389
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
In AOT mode, TFA turns optional arguments (named or positional) that are
always provided into required positional arguments and increases the
number of required arguments accordingly. Thus, from the standpoint of
the VM, whether it's reading in bytecode or kernel, these are just
regular fixed positional arguments. However, TFA originally left the
parameter flags alone for these parameters, so required named parameters
that were converted to positional arguments still had the required flag
set.
This CL does two things:
1. It fixes TFA to clear the required bit on a parameter if it is
converted from a named parameter to a required positional parameter.
2. It adds ASSERT()s and RELEASE_ASSERT()s on the VM side to ensure that
only named parameters have the required bit set.
Change-Id: I1c36d777a7e9e7d703bcc23ee1b798bffeffa29e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157381
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
std::function is not safe to use in the VM because it will leak on longjmp.
Bug: https://github.com/dart-lang/sdk/issues/42934
Change-Id: Id14e7a5ee6ff28c9b3f4ea5d7a46470ec3530a3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157101
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Change-Id: I2969f8c089d087042b2aa681d2d8a61a8f956556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156101
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Fixes the change in d7feab5a, which created a base definition for
BinaryIntegerOpInstr::InferRange from BinaryInt32OpInstr (which used
GetSmiRange to get the operand ranges) instead of BinaryInt64OpInstr
(which used the operand ranges directly).
Instead, just use GetInputRange to get an appropriate range based on
the representation of each input.
Change-Id: Ib62199ecc3ea3246fcf5deffc69285a15124f462
Bug: https://github.com/dart-lang/sdk/issues/42948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156906
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Several people have experienced build issues traced back to
target `//utils/dartanalyzer:generate_summary_strong`.
The issue is triggered by the sdk_hash changing with an old
kernel-service snapshot in the out/ folder.
`generate_summary_strong` uses but does not explicitly depend on
the kernel-service, causing the outdated dependency.
This then causes 'Unexpected Kernel SDK Version' when the new dart
binary tried to load the old kernel-service snapshot.
Tested:
1. Clean build of create_sdk at HEAD.
2. Empty `git commit --amend` to modify commit and thus sdk hash.
3. Rebuild of create_sdk (which failed before).
Cq-Include-Trybots: dart/try:analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-mac-release-try,analyzer-nnbd-linux-release-try,analyzer-win-release-try,benchmark-linux-try,dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,dart-sdk-win-try,flutter-analyze-try,front-end-linux-release-x64-try,pkg-linux-release-try,vm-kernel-linux-release-x64-try
Change-Id: Iba07e9d0c5daa7a93870fb501d9bb57682c88a5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156913
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This assignment appears to have the intention of performing a comparison
and asserting that the opcode encountered was as expected, rather than
assigning it to be that particular opcode.
Change-Id: I21f3c00f414d4b191f85e9dcf4391a6dd7023495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157105
Auto-Submit: Drew Fisher <zarvox@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Uri.toFilePath() might throw errors. If it failed, we should fall back
to use file path and try it a try. This fixes the current red pkg win
bot caused by https://dart-review.googlesource.com/c/sdk/+/156922.
Change-Id: Id67723041d222f477d7584fb73a0d77eb91cd41c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157107
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
This CL does three things:
* It adds a test that shows how a stub is added if it compiles all
"user libraries" from source, but not when it loads some libraries
from a dill. This is bad and can lead to leaks (and possibly other
things).
* It adds the transformation phase to the tests using the link option
for the linked component. This is needed to avoid a potential crash
(assert error) in the mixin transformation triggered by the new test
added above.
* It adds the possibility to create a non-linked compilation in a
testcase directory with a link.options file by naming the file
"<whatever>.no_link.dart". This way one can have two expect files
close together that shows differences between using linked
dependencies and not without too much duplicated test code.
Change-Id: I170c66fb3e0d4d1263217d64234dc0e88388747d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156912
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is another step in refactoring that should help with protecting class functions lookup with locks.
Change-Id: Iab676aec8d5740b800038ded6cabacf54372fb7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156421
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Dart executable accepts a File uri (File://dir/name.dart) as an input,
dartdev run should have the same behavior.
Change-Id: I265ef8242314dbb41c5735c65ee203bbbf76f78e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156922
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
On simulated architectures (simarm, simarm64) machine code checks stack
overflow of the simulated (arm/arm64) stack. However, it is also
possible to overflow C++ stack used by simulator and runtime if runtime
code is called recursively.
This change adds C++ stack overflow check on entry into the runtime
code (on simulated architectures).
Fixes https://github.com/dart-lang/sdk/issues/42936
Change-Id: If8f9388a1edc06044402f052c1d10d79063477e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157103
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Fixes the case where libraries got renamed when created and
they are exported. Previously ddc was emitting broken code that
incorrectly used the original name in the export.
This bug was breaking some benchmarks at runtime.
Change-Id: Id8b27d645766db41fb5ccb5c74d8655dd4a5d4ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157000
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
If an initializer throws, the variable should be treated as
uninitialized so that the next access reevaluates the initializer.
Change-Id: I8428383a7f99527a915962f7be348f4f33b83163
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157040
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Support splitting paths that look like: `package:foo.bar.baz/src/foobar.dart` as well
as "normal" paths (`package:foo/bar/baz/src/foobar.dart`).
Change-Id: I7816b7d6fd34d786a735bf74e3ea2a2606c27af5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157023
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
We were getting the type error "type 'Future<Object>' is not a subtype of type 'Map<String, dynamic>'" because we weren't awaiting this future.
Change-Id: I1247151d5a7bcf688eb90f0188c783cbffc432fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156918
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Stack-alignment flags are not supported by clang-cl, warning messages produced by clang-cl throw off gomas compiler version detection.
Change-Id: I259ed57e72f6c26eb1f01ac2c6dd49ec2e90978c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157100
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>