macOS arm64 builds only create the x64 gen_snapshot by default because
they are cross-compiled in Rosetta. Adding the gen_snapshot target
ensures that we have a gen_snapshot for arm64 as well.
These bots require clang which currently isn't provisioned on shards, so
they are running on the main bot.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: I842f37019a65dfb30e522d2d9bead5e62bb3ff79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204505
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
- Fix default value assignment when passing a list of positional
arguments that isn't a dart:core `List` at runtime.
- Fix modification of the original list passed as positional arguments
when also passing named arguments.
Change-Id: I3aef6b1584f159c92251b963ffb927e1f75d3472
Fixes: https://github.com/dart-lang/sdk/issues/46457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204900
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
* Add tests of extraction of comments
* Add tests of extraction of tests
* Add tests (both positive and negative) of actually running tests
* Use parser for extracting tests so it correctly parses stuff with
commas and braces for instance.
Change-Id: I48a7e8ae179d53371a9bcfed982f0df177306c12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204502
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
No qemu-using CI bot runs vm/cc tests currently, but this allows
developers to run vm/cc tests locally using qemu. This way, tests
like those from assembler_arm_test.cc can be tested both with and
without our own ARM7/ARM8 simulators.
Change-Id: I7fd97e411936954b59d9f0fc65e16c518e9ee332
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204781
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
The storebuffer verification code did check that objects in the store
buffer do not have the IsCardRemembered bit set.
This CL adds some extra checks to also ensure the bit is correctly set
(or said differently, that we never add large arrays to the store
buffer)
TEST=Existing test coverage.
Change-Id: I764ac15eec30fef3769706972e1783a31f911e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204800
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Adding explicit source maps to the operator created a breakable location
when viewing source-mapped dart code in chrome devtools. There isn't a
breakable point in the javascript for a `!` operator so trying to enable
the breakpoint visible in the dart code would trigger some "other
breakpoint".
Recent changes in the V8 debugger have changed which "other breakpoint"
would be triggered.
16b0767adc
This causes our tests to fail and makes the user
interaction a little confusing. Removing the extra source map here seems
to be the most reasonable solution because it prevents a possible
breakpoint from appearing where there isn't a breakable location.
Now, the ! operator doesn't introduce any new source mapping it simply
continues the previous mapping.
Change-Id: I5903bfeaf1bcb2e2a3ce883433153575aa1fd05a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204742
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This change teaches tree shaker to drop default values of parameters of
methods if their bodies are dropped (for example if a method is only
used as an interface target).
TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_46461.dart
Fixes https://github.com/dart-lang/sdk/issues/46461
Change-Id: Icb50d7ec6acd91e68ceaa3b826c15d09d1c05701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204840
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The CLI was not providing the ipv6 flag to DDS, resulting in a "Could
not start Observatory" error.
Change-Id: Idff0f525455f121b8f1e89bc4ad20a01cd1165ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change concludes switching to the new invocation nodes in the VM.
Support for the old invocation nodes (MethodInvocation, PropertyGet
and PropertySet) is removed from the VM and VM-specific kernel
transformations.
TEST=ci
Closes https://github.com/dart-lang/sdk/issues/45340
Change-Id: I0717732feb1b9c6ebdf0f6079ed42a90d00970a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204741
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The call specializer replaces implicit setter calls with
AssertAssignable+StoreInstanceField. If the former lazy-deopts it will
deopt to after-call and therefore the StoreInstanceField will not be
performed.
This CL makes use of newly added infrastructure that can mark such
instructions as lazy-deopt to before-call, therefore causing a
re-try of the instance call.
Fixes https://github.com/dart-lang/sdk/issues/46446
Issue https://github.com/dart-lang/sdk/issues/45213
TEST=vm/dart{,_2}/deopt/restart_call_on_deopt_regress_46446_test
Change-Id: I460e9a3c86b89a1ae127145024ace2d3d860d0af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204721
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
When running the weekly test it launches a leak test for flutter first
without the experimental invalidation and then with. As the test starts
with checking out flutter gallery the second launch has to wait for the
first to be done with that.
That stopped working with 8bd4c53381 as
the (in that CL) newly added test trickered that wait to stop (by
printing a "globally listened for" observatory listening on line).
This CL fixes that by only listening for data from the correct process.
It further more makes final error-reporting better.
Change-Id: I1ead96ae4c31616b1e7dc3044ae22437d7f605d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204783
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Previously one would for instance get an error when trying to expression
compile an expression like `Foo._private()` on a class like
```
class Foo {
static int _private() { return 42; }
}
int _private() { return 42; }
```
whereas the expression `_private()` would be fine.
This CL fixes that, so both expressions are accepted.
Change-Id: I959bd5bf8bf5770852add3b979c8382d005ecf41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204782
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Adding this representation allows us to create slots for storing
and retrieving values from uint16_t-typed object fields in the runtime.
Also generalize BoxUint8Instr to BoxSmallIntInstr, which holds any
unboxed integer representation where the value is guaranteed to fit
into a Smi.
To unify the implementation of BoxSmallIntInstr across architectures,
we add ExtendValue(Register dst, Register src, OperandSize sz), which
extends the sz-sized value in src to a full register size in dst. If
sz is a signed OperandSize, then the resulting value is sign
extended appropriately.
We also add MoveAndSmiTagRegister / ExtendAndSmiTagValue, which is like
the base operation but also tags the value as a Smi. On some
architectures, this can be performed using a single instruction.
Also adds sbfx/ubfx on ARM for use in ExtendValue.
TEST=Existing tests for BoxSmallIntInstr, followup CL for the new
representation.
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-linux-debug-simarm64c-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-precomp-ffi-qemu-linux-release-arm-try
Change-Id: I9c0b3a23f5e28480e0bfbde55b9494f7b822dcfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203761
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Sorry for the size of the CL. In reptrospect I should have changed the
defaults in any test class with failing tests and then converted them
one-by-one the way you did in analyzer. I'm happy to do anything I can
to make this easier to review.
Change-Id: I0a729d0d07cc3083a9892cfb1ddc75a06ad8f0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204748
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
In some cases adding default arguments modified the 'positional'
arguments input List. Since there are 'accelerated' paths for small
numbers of arguments, this bug did not show in any other tests.
Change-Id: I5075c96ecfdc9645b85b9beeeb38305415153d20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204747
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This is no longer needed now that the whole migration engine has null
safety enabled.
Change-Id: I834bfb18f9b4d838c0cc933acb6977566bc1643a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204484
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This change adds just enough migration hints so that I can run the
migration tool on itself and get reasonable results. Most of the
hints are just marking a few types as nullable or non-nullable that
the migration tool isn't able to correctly infer by itself. In a few
circumstances I've had to make a type explicit that was previously
inferred, so that I could mark it as nullable. In a few other
circumstances I've had to add `/*!*/` after an expression to let the
migration tool know that the expression should be null checked.
Note that unlike most of the rest of the Dart SDK, the migration tool
is not expected to be a long term part of the Dart ecosystem, since
the whole point of it is to help people migrate their code to null
safety. It's not likely to receive a lot more maintenance, and it
will likely be removed sometime around the time of Dart 3.0 once
people stop needing it. Accordingly, I've tried to err on the side of
liberally allowing types to be nullable where possible. Although this
means that we will wind up with more null checks in the final result,
it makes the migration process a lot easier and substantially reduces
the risk of introducing bugs during the migration process.
Change-Id: Ia348a09e94d22d83c2c15215ca7ddf5a5a4d05f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204480
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
In order to migrate the migration tool to null safety, it can't have a
dependency on `package:dartdev`, because `package:dartdev` isn't
migrated yet. (This is a problem because once the migration tool's
tests have been migrated to null safety, they will require the
transitive closure of all the packages they depend on to also be
migrated).
Fortunately, it's quite easy to change the migration tool so that it
doesn't depend on `package:dartdev`; we only need to move the class
`MigrateCommand` from `package:nnbd_migration` to `package:dartdev`.
To make this work, we have to move the constant `migrationGuideLink`
from `MigrateCommand` to `MigrationCli`, and make the method
`MigrationCli._defineOptions` public.
Change-Id: Ie1ce8db0e8245e98bbb72facddd723300816340e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204540
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 889659e876.
Reason for revert: This CL is too limiting.
Original change's description:
> [dart2js] Use library as key for some holder properties.
>
> Change-Id: I24d21dd6239191ab0242387d97d6b47cdf9582b5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203826
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Joshua Litt <joshualitt@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Id4d3d401a5b96a1c8e42afd87513520e52b725d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204746
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
This reverts commit b1f1aee94d.
Reason for revert: Some left-over uses in g3 need to removed first
(some were removed in b/380758599 but apparently there's some
usages left).
Original change's description:
> [vm] Remove --causal-async-stacks flag
>
> The flag isn't used anywhere in our tests or in embedder code. Turning
> it on will result in a VM startup error.
>
> We should therefore remove all uses of the flag and the flag itself.
>
> TEST=Existing test suite.
>
> Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,cskau@google.com
Change-Id: I03aad46f46153d5ea4ac2fcdd5685d0ef2a0d9af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204723
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
When Future.value and Completer.complete are used with a non-nullable
type argument and an argument that is absent or null, a runtime error
occurs.
This adds a diagnostic detecting those invalid usages.
Closes: https://github.com/dart-lang/sdk/issues/45319
Change-Id: Ifd9af70e002c351bf145f4a623105476feb213d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Simon Binder <oss@simonbinder.eu>
The flag isn't used anywhere in our tests or in embedder code. Turning
it on will result in a VM startup error.
We should therefore remove all uses of the flag and the flag itself.
TEST=Existing test suite.
Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>