- Added support for --define to the VM and dart2js
- Added support for -D and --define for `dart run` and `dart compile js`
Remaining improvements:
- Add support for providing multiple comma separated values for `dart
run`, `dart`, and `dart2js`
Related issue: https://github.com/dart-lang/sdk/issues/44562
TEST=Updated CLI tests and added new dart2js tests.
This reverts commit e49937769f.
Change-Id: I5f9275b829665eb5e8695403d67f230e752ab0e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183180
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The directories where generated tests and compilation output are stored
by the test runner were named based on all the relevant configuration
options. Change this so that the directory path is based on the
name of the tested configuration instead. This allows simultaneous
test runs of configurations that don't differ on relevant options.
Change-Id: Iaad8d0212cb900bc91d7472d99e266183d29a0b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178986
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: William Hesse <whesse@google.com>
This change adds support for the 'enable-experiments' option to control
the experiments used in the analyzer and CFE.
It also adds support for multiple input files.
Change-Id: I15b9082e96f276249165efc66734ac9506b93ca1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178560
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
All existing embedders have been opted into --lazy-async-stacks, the
VM also uses it as it's default in all configurations.
After this CL, any user of --causal-async-stacks will get an error
message when trying to use it.
=> In any such case, please simply remove the flag.
TEST=Exhaustive CQ.
Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ia440afcf2dba464aa8b8cf381b93bbac8eb9f8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172564
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit ce614d33c4.
Original change's description:
> Revert "update Glob in the sdk, also adds package:file to the sdk"
>
> This reverts commit 18b19db300.
>
> Reason for revert: Breaks Flutter 3H/Golem. Tried making an appropriate patch for 3H that would pull file into its dependencies (see https://dart-review.googlesource.com/c/sdk/+/173960/), but that still failed, so reverting.
>
> Original change's description:
> > update Glob in the sdk, also adds package:file to the sdk
> >
> > Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
> > Commit-Queue: Jake Macdonald <jakemac@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
>
> TBR=jakemac@google.com,nbosch@google.com
>
> Change-Id: I0616e3df7505f348edeefee40cbaf4adc59487cd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173963
> Reviewed-by: Tess Strickland <sstrickl@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>
TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com
# Not skipping CQ checks because this is a reland.
Change-Id: Ia85fe3b81214ca4ef2bed8e08ecc1b617927a579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173981
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
This reverts commit 18b19db300.
Reason for revert: Breaks Flutter 3H/Golem. Tried making an appropriate patch for 3H that would pull file into its dependencies (see https://dart-review.googlesource.com/c/sdk/+/173960/), but that still failed, so reverting.
Original change's description:
> update Glob in the sdk, also adds package:file to the sdk
>
> Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
> Commit-Queue: Jake Macdonald <jakemac@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
TBR=jakemac@google.com,nbosch@google.com
Change-Id: I0616e3df7505f348edeefee40cbaf4adc59487cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173963
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
We want to migrate the samples to NNBD. In order for the old samples
to keep running on the legacy bots, this duplicates all samples, and
changes the legacy bots to run the copies.
Note this will cause the legacy bots to report that all the samples
tests are skipped and that there are now new tests in the samples_2
suite. Existing failures may re-appear. These will be be re-approved
or alternatively Skipped.
The follow up CL migrates samples/ffi to NNBD.
Issue: https://github.com/dart-lang/sdk/issues/43600.
TEST=samples
TEST=samples_2
Change-Id: Ib40f8fb71f81c091973aa0f860b1a49bac120d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173523
Reviewed-by: Alexander Thomas <athom@google.com>
1. Adds a message explaining how to build the .far file.
2. Passes --disable-dart-dev, because there is no dart-dev snapshot.
This makes the following steps succeed in running the a Fuchsia test:
`tools/build.py --os=fuchsia -m debug create_sdk fuchsia_test_package`
`tools/test.py -n dartk-fuchsia-debug-x64 tests/standalone_2/int_array_test.dart`
TEST=This is currently untested on the CI. We should consider adding
running the simulator to the CI/CQ Fuchsia bot.
Change-Id: I756863685b6d9042392814838024ec2b6054ee28
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173275
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Allows sound-like null safety when running mixed applications in weak
mode.
This is not a specified option and is only intended to assist large
scale migration efforts.
Change-Id: Icd0abb0e876d16e719a01e8381eef55a2b511051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171821
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
This CL introduces unit tests for the Native* classes in compiler/ffi
that can run for all supported target ABIs on any host architecture.
The unit tests are compiled for all target ABIs with
`tools/build.py run_ffi_unit_tests` and run for all target ABIs with
`tools/test.py ffi_unit`.
The unit test and tested code do not conceptually depend on having a
DartVM. The tests are compiled with a custom `dart::Zone` and
`platform/`. This enables compiling for all `TARGET_ARCH_*` and
`TARGET_OS_*` on any host, and running unit tests for all target ABIs
on any host.
Because the `run_ffi_unit_tests` executables do not include the DartVM
their build is quick (<10seconds) and they are small (~6MB) when
compared to `run_vm_tests` (~250MB).
The tests are added to the existing FFI QEMU bot to prevent adding an
extra bot which would add checkout overhead.
The unit tests themselves are set up to be fairly similar to vm/cc
tests. The only difference is the NativeCallingConvention tests which
are set up with `.expect` files for easy inspection and updating.
TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc
TEST=runtime/vm/compiler/ffi/native_location_test.cc
TEST=runtime/vm/compiler/ffi/native_type_test.cc
Change-Id: I7b8bf4de9ef070e7546472217e571a60362b9639
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171725
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This flag causes test.py and test.dart to (re)build the necessary
build targets locally to run the selected configurations.
Change-Id: I526de702ac0eb8269c91d0be3673af096c94c1f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170822
Reviewed-by: Alexander Thomas <athom@google.com>
The directory was deleted in an earlier change.
Change-Id: Ib6191c5624c7db2462c67a62d4221eacb034eec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171280
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Change-Id: I178f18484b853aa35248fa9f6252509ec0df6832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169500
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This takes co19_2 tests from ~10 minutes to <3 minutes on my machine.
Change-Id: I98c27d0692b9279cf4c7d680cfa18c50b4ab5d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167573
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This fixes an issue introduced when DDS testing support was added to the
test suite. Previously, tests with multiple VMOptions lines would get
the same name for both DDS and service variants. This caused incorrect
behavior in the results processing that broke deflaking, but also
caused one of the results to be ignored by the infrastructure.
Also adds some tests for VMOptions handling in test_suite.dart.
Fixes https://github.com/dart-lang/sdk/issues/43768
Change-Id: I3c0f9cbc1807fe814aed5ecb7531ef4289e95683
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166858
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
The arguments were missing for some dartkp subcommands and for AppJit.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try
Change-Id: I467b10eea1187d44b978170b12a0b2b5927f5b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164380
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
test.py invocations that specify a null safety mode will now work
without tool specific options.
For instance, `test.py --nnbd=strong -cdartkp -mrelease` will now add
the `non-nullable` experiment flag as well as the pass
`--sound-null-safety` to the relevant subcommands.
Fixes https://github.com/dart-lang/sdk/issues/42370
Change-Id: I1ae5bf569cc77ed6f26411c171c2cafe0a12eaff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164160
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Expand the recent addition of tab completion for test files to
allow completion in the co19 and co19_2 directories.
Change-Id: I02f39ef8c7e4c829a2feef7d51f3f24fea5d745d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163120
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
If test resources have read-only permissions and are copied to
generated_compilations copySync will fail the next time because it can't
overwrite the write protected file.
Creating the file first ensures that it has default permissions that
won't be changed when copySync overwrites it.
Change-Id: I1b4a07c4644dc6d0c25275ebc84ba4ebc07a56c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162754
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
The static error updater used to run analyzer using the scripts in
sdk/bin/, but those are no longer reliable now that analyzer looks for
a nearby VERSION file. Instead, look for the most recently built
analyzer in the build directory.
Change-Id: If2b437b12d036e15f5503aba816dc2a007e39cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160943
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
I got tired of wading through the giant list and guessing at which one
matches the options I want to run the tests on, so I added filtering.
If you pass any of the common options like "-m", "-r", etc. when also
passing "--list-configurations", then it only prints configurations
that match those options.
Also, by default it only prints configurations that match the current
host OS.
Eventually, I would like *running* tests to work the same way, where
passing "-c" means "find me a config in the test matrix with this
compiler. But this seems like a good start.
Also, I removed the slow way that test.dart calls test.py to handle
--list-configurations now that those are all in the same package.
Change-Id: Ifabb415a9fad889afc12cfcd7dd81bd02c918612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158980
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
When reading a secondary snapshot, re-run the dispatch table initialization found in the root snapshot. Since each loading unit's contribution to the dispatch table is scattered, it would take more snapshot size to try to serialize their contributions separately. We'll revisit this when we can defer Class, Function and Code, which will prevent the root snapshot from referencing all Codes.
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: Iefd2b98647b96ae59a7efe92897538f5cf8c2426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158923
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
If a static error test contains "[web]" error markers, this runs them
on DDC and dart2js, parses the output, and tests that the compilers
report the expected errors.
Change-Id: I8b846f75828a0078f61c2fc1f3da0a4a587349cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158100
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
- Don't use PC-relative calls when calling between loading units.
- Sort the contents of the code cluster by loading unit, then by text offset.
- Handle binding PC-relatives calls and inserting trampolines per loading unit.
- Create one code order table per loading unit to implement PC -> Code lookup.
- Read code order tables directly, instead of copying into malloc'd memory.
--use_table_dispatch still not yet supported.
This slightly shrinks non-split binaries (~2% clustered part, 0.4% total snapshot) due to the new delta encoding when Code references Instructions.
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I51052ebc7b4968b554897d1710135a6c41821302
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157820
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This reverts commit 17faf89d02.
The fix is in eventhandler_fuchsia.cc. Rather than changing the
condition on line 401, I've just weakened the assert.
Change-Id: Ia6b1f35e479e4b2fdf1adc77e9513551221a7696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157564
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Liam Appelbe <liama@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>