Commit graph

367 commits

Author SHA1 Message Date
Martin Kustermann cdd0694a92 [gardening] Make qemu configurations get 2x the time
Running tests under qemu simulator are slow. To prevent tests from
flakily going over the timeout limit, we give them 2x the time.

Change-Id: I41f771d5b958d11d073fd9808663b0b9f298ad9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274384
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-12-08 14:08:09 +00:00
asiva 606a64a743 [3.0 alpha][VM/Runtime] - Flip flag to make strong null safety the default.
- Flip flag to make strong null safety the default
- Remove code that auto detects null safety mode from source files,
  it is necessary to specify --no-strong-null-safety to opt out.
- Retains sniffing of AOT/JIT snapshots and kernel files to determine
  null safety mode, the opt out has to be done when generating these
  file.

TEST=ci

Change-Id: If2c9608eedb7c46d9c3cd85e261ee9640e0d28eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261140
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-12-06 04:04:23 +00:00
Ryan Macnak 393451a37a [test_runner] Extend the --rr option to include run_vm_tests and gen_snapshot.
Change-Id: I3e1a950e9fb9d25bbade60c9fe3577e5dbcd6f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272862
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-02 18:16:12 +00:00
Devon Carew 99026df0f8 [deps] update package:webdriver
Change-Id: Iaa875c46f1425160063b5cc5f44e87a60c5e61dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273003
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-12-01 17:42:21 +00:00
Alexander Thomas 3f19115234 Make code compatible with Trusted Types.
Closes https://github.com/dart-lang/sdk/pull/50567

Co-authored-by: Jakub Vrána <jakub@vrana.cz>
Tested: Standard CQ
GitOrigin-RevId: b916722ddc03d2b57bae6f51122ee1e7af2486b4
Change-Id: I4f638e7262009744504f0b263bf7a8e23549e5bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272380
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-11-30 09:49:42 +00:00
William Hesse cb6041acf0 [test] Disable auto-update of Firefox browser in testing scripts
Fixes: https://github.com/dart-lang/sdk/issues/50486
Change-Id: I289a396e0c2ae6c08510fbf96b6bb65c66c019e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270101
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-11-16 16:50:48 +00:00
Ömer Sinan Ağacan c6d69f1b02 [test_runner] Create --write-logs dir, add default dir to .gitignore
`python3 tools/test.py --write-results ...` fails to run if the default
directory (logs) doesn't exist. Create the directory if it doesn't
exist.

Update .gitignore with the correct default paths of logs.json and
results.json.

Change-Id: Ib1118387195c3bb30b350ef3748e66b4057c57de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269880
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-11-15 09:59:08 +00:00
Aske Simon Christensen 6ddd14696c Update d8 to 10.9.104
This version contains a number of updates to WasmGC:
- `dataref` is replaced by `structref`.
- `call_ref` now takes a function type immediate, both with the proper
  0x14 opcode and the temporary 0x17 opcode.
- Some of the new type test/cast instructions are implemented,
  specifically `ref.test`, `ref.cast`, `ref.test null` and
  `ref.cast null`. The new `br_on_cast` and `br_on_cast_fail` are not
  yet implemented.

Additionally, the `--wasm-gc-js-interop` flag is removed, and interop
is always enabled.

Change-Id: Ibe7a1d9e8800f89096239ff5afa16e80322e01c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266161
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-11-11 15:11:54 +00:00
Nicholas Shahan 1e9445060a [test_runner] Use constructor to detect async main
This is needed to avoid the dependency on the current runtime
type representation. This is still not an ideal solution and should
be moved into a logic that DDC controls.

Issue: https://github.com/dart-lang/sdk/issues/46377
Change-Id: I6418bff546e63b01059841c1128b4ebeeacdcc39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265564
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-10-25 19:33:38 +00:00
Lasse R.H. Nielsen c13676f2b7 Deprecate FallThroughError.
The error has not been thrown since Dart 2.0,
where being able to reach the end of a switch case
became a compile-time error.

TEST=Removes tests depending on discontinued behavior.

Change-Id: I76292e7c73f2b3aaf071bbb290e97db493b75477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261860
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2022-10-25 12:25:35 +00:00
Alexander Markov e70dec4e82 [vm] Allocation sinking of records
This change adds all necessary support for allocation sinking and
materialization of record instances.

TEST=vm/cc/AllocationSinking_Records

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I040ce8b1ed3220f87a767b590050de3e50573170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-10-24 23:00:47 +00:00
Alexander Thomas 0b26f4816b [testing] Remove --compiler=none from test.py
* Use dartk as the default compiler for runtime=vm.
* Status file entries for checking for the `none` compiler now either
  use dartk or are deleted.

Tested: Standard CQ and local testing.
Fixes: https://github.com/dart-lang/sdk/issues/50241
Change-Id: I7a08d3e491ae1c82a0348fb66ea7b557398f97e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264682
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-10-19 08:09:58 +00:00
Joshua Litt 204c03a98e [dart2wasm] Wire up cfe experimental flags.
Change-Id: Iab9b3a5997e63e61a42bc4fb27825b345ae63ab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264060
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2022-10-17 21:01:33 +00:00
Ömer Sinan Ağacan affc3392a0 [dart2wasm] Implement Wasm FfiNative support
This CL introduces a new kernel-to-kernel pass in Wasm backend to
compile `FfiNative`-annotated external functions to external functions
with `wasm:import` pragmas.

The new pass `WasmFfiNativeTransformer` extends `FfiNativeTransformer`.
Some `FfiNativeTransformer` methods made public to allow reuse in the
pass.

The conversion works like this: when we see a member like:

    @FfiNative<Int8 Function(Int8, Int8)>("ffi.addInt8")
    external int addInt8(int a, int b);

We generate a Wasm import using Wasm ABI types according to emscripten
calling conventions:

    @pragma('wasm:import', 'ffi.addInt8')
    external static WasmI32 addInt8_$import(WasmI32 a, WasmI32 b);

and convert the original member (`addInt8()`) to a wrapper function that
calls the Wasm import, converting the arguments and return values to
Dart types:

    static int addInt8(int a, int b) {
      return WasmI32.toIntSigned(
        addInt8_$import(
            WasmI32::int8FromInt(a),
            WasmI32::int8FromInt(b),
        ));
    }

Build, test, and CI changes:

- Test runner now uses `// SharedObjects=...` lines in dart2wasm tests
  to pass extra Wasm modules to d8 command used to run the tests.

  Support for `// SharedObjects=...` lines were already used in
  native/AOT FFI tests, not added in this CL. We just start to use those
  lines in dart2wasm tests.

- dart2wasm gn file updated with a target "test_wasm_modules" that
  builds FFI test Wasm modules to Wasm using emcc (emscripten C
  compiler).

- CI dart2wasm_hostasserts configuration updated to copy the Wasm files
  generated by the "test_wasm_modules" target to the shards.

TEST=tests/web/wasm/ffi_native_test

Change-Id: I6527fe4e2ca2b582e16d84fee244e9cbe6dee307
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252822
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-09-23 09:41:22 +00:00
William Hesse 51b6dba707 [infra] Handle shutdown failures in webdriver browser controllers
Change-Id: I4c3b457e9167e08afef2e3f4aff92d2b3011a02f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260541
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-09-22 15:23:37 +00:00
Ahmed Ashour 6e03189e2b [analyzer] fix diagnostics for lints map
Fixes #49651

Change-Id: I87b14e407e699da8b9247eed93d957e2ba12e22d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257520
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-20 17:11:35 +00:00
Ömer Sinan Ağacan 293b6379b8 [infra] Avoid crash in test_runner.dart --help
`testConfigurations` expects at least one configuration, so avoid
calling it when there are no configurations.

This fixes the unhandled exception with `test_runner.dart --help`:

```
No build targets found.
Unhandled exception:
RangeError (index): Invalid value: Valid value range is empty: 0
<asynchronous suspension>
```

With this commit, `--help` just prints "No build targets found" and
exits with 0.

This crash was previously fixed in
02a0396f74.

Change-Id: Id82c83f66871c4e811a7502f1e831a0592db2065
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257580
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-09-07 07:44:37 +00:00
Aske Simon Christensen bde8430b97 [dart2wasm] Initial async/await support based on Promise integration
This implementation has a number of limitations:

- Returning a Future from an async function is not supported.
- Every async call switches to a new stack. A later optimization will
  stay on the same stack if the call is directly awaited.
- Exceptions that cross async boundaries do not receive full stack
  traces including the async suspension points. The stack trace of the
  final exception just reflects the stack trace for the outermost
  async call.

Change-Id: I2a5d5e30d6e955999ba55842c8b2ca3427cbf954
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241010
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-08-19 07:11:18 +00:00
Aske Simon Christensen 43e003ba04 Update d8 to 10.6.51
The Promise integration API has been updated to automatically
instantiate suspenders when an async export is called, which enables
the async/await implementation in dart2wasm to avoid a limited-size
stack pool.

Also, the --experimental-wasm-nn-locals options has been removed,
since non-nullable locals are now always enabled.

This is the last version before the (backwards-incompatible) change
over to the three-pronged WasmGC type hierarchy.

Change-Id: Ide164d83059877fa32f4ada9907290dd3d091b7a
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254924
Reviewed-by: William Hesse <whesse@google.com>
2022-08-19 07:11:18 +00:00
Michael Thomsen a23a6b250f Discontinue the non-null FFI sample.
Please refer to the null safety version:
https://github.com/dart-lang/sdk/tree/main/samples

Bug: none
Change-Id: I4db097842b35129f184516aa9ac5cd0e4d165092
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255246
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-08-18 15:44:04 +00:00
Daco Harkes 1ae40d5ebf [vm/ffi] Add Fuchsia ABI unit tests
Adds the Fuchsia ABI to the ABI unit tests.

Adds an ABI test for the FFI callback on who's return the stack is/gets
corrupted from bug:
https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=105336

TEST=tools/test.py ffi_unit

Change-Id: I3c9bb9941e4883384dfba787bb6dacb4c8cdc141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255122
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-08-16 12:17:26 +00:00
Alexander Thomas 8d60314e12 [testing] Run static web tests on dartdevk
Change-Id: Icd4dc024de8ec775b320be1ff5fda9116443dd52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254900
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-08-12 16:42:04 +00:00
Alexander Thomas 54c3663c43 [testing] Make Compiler.dartdevc a fasta compiler
Change-Id: I801687994b979283adab0dec1e3f1c3319fe5dd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254680
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-08-11 16:45:18 +00:00
Robert Nystrom 6a8c81205a Fix a null safety migration bug in update_errors.dart.
It was assigning a List<String> to List<String?> which is allowed due
to (unsound) covariance but would then fail at runtime when null was
assigned to a list element.

Change-Id: Ia893998e8866067b54cfa354b9c4e13d76b6d9ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253303
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-08-02 01:43:14 +00:00
Ryan Macnak 4f7bb16cc5 [vm] Add a stub simx64.
This allows building gen_snapshot with host=arm64, target=x64.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/103386
Change-Id: I478cc0917462896de9b598455d2ed68401323b50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252962
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-07-29 18:11:01 +00:00
Aske Simon Christensen 9814b569ba [dart2wasm] Remove support for not using non-nullable locals.
With the decision to support non-nullable locals in WasmGC as per
https://github.com/WebAssembly/function-references/issues/44 the
support in dart2wasm for forcing all locals to be nullable is no
longer needed.

This CL removes that support and cleans up some related nullability
issues. Specifically:

- Remove the `--local-nullability` and `--parameter-nullability`
  commandline options. These are now always enabled.
- Clean out special cases around forced nullable locals throughout the
  compiler.
- Make `thisLocal` and `preciseThisLocal` always non-nullable.
- Make `returnValueLocal` (for storing the return value of `return`
  statements inside `try` blocks with `finally`) always defaultable,
  since its initialization flow crosses control constructs.
- Make type argument parameters non-nullable.
- Make non-nullable `FutureOr` translate to a non-nullable Wasm type.
- Implement the "initialized until end of block" validation scheme
  in the Wasm instruction validator.
- Run tests with the `--experimental-wasm-nn-locals` option. This
  is likely going away soon, but for now we need it.

Change-Id: I05873dd70510af5944d86d37cb5765c7bdef73a9
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252600
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-27 22:47:30 +00:00
Joshua Litt b9dc9a7fbe [dart2wasm] Support environmental constants.
Change-Id: I2e66c35c209b6c0a0e56b4fd7a5eefd8c3e15c5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250482
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-07-25 20:13:02 +00:00
Anis Alibegić 40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Paul Berry b326d00e96 Fix update_static_error_tests.dart after recent binary removals.
We no longer build separate binaries for `dartanalyzer` and `dart2js`,
so we need to do something different.

For `dartanalyzer`, we just run the `dartanalyzer` script directly
(because the features we need for testing aren't available directly
from `dart analyze`).  For `dart2js`, we run in the new way (`dart
compile js`).

Change-Id: I7e34052a9e6ad62596279ca32604e32291a45953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251842
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-07-19 16:35:54 +00:00
William Hesse 145a9230de [test] Change default branch for test runner to main
Change-Id: Id5f6676c916810b6d4748dda1aff3ee4438a112b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251764
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-07-18 12:48:33 +00:00
Daco Harkes 0f456a845c [vm] Check for undefined symbols in assembly snapshots
We don't check undefined symbols in our assembly snapshots. We
currently never emit undefined symbols, because Dart code only refers
to Dart code statically.

When adding static linking, we would like to have the option to have
PC relative calls to native libraries provided as relocatable files
(object files or static libraries).

Not checking would compile the symbols to dynamic linker, but we don't
support that `dart compile exe` at the moment. So we should add this
sanity check.

Also: Removes unused imports in relevant test.

Bug: https://github.com/dart-lang/sdk/issues/49418
Change-Id: I10701b82a1e8a06ce41271bd9183064addfb88f4
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251261
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-07-15 11:32:35 +00:00
Janice Collins c3ca87b638 Fix compiler_configuration.dart so it doesn't try to run dart.bat.
Fixes a problem introduced here:
822cd1cbd5 (diff-509a85eaf256d56fee73f45ce469c8c4cf164de5847333c384b8d23e1c4f0632)

So the tool now tries to run 'dart.bat' instead of 'dart.exe'
on Windows.  This CL corrects the problem.

Change-Id: I1d5bfc87c996305290d760fd57007c946bb933c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250760
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-07-12 08:07:42 +00:00
Janice Collins 613a2095d5 Delete the old fe comparison logic in the test runner.
This doesn't look like it would be functional even if it was referenced
somewhere as the package is gone.

Change-Id: I819987ed7718db67941a00cb844a142fb5bb8bd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250781
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-07 17:21:43 +00:00
Devon Carew 3dbed884c2 [pkg] use package:lints when analying pkg/
Change-Id: Ib25573375ea1f54e07846af6fcd9cd74a8fefb7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250784
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-07 14:29:22 +00:00
Janice Collins 822cd1cbd5 Remove dartanalyzer from built SDK.
Bug: https://github.com/dart-lang/sdk/issues/48457
Change-Id: Ic0d038299712989b8445859590ff870ce3bdc13a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-01 17:43:20 +00:00
Alexander Thomas 81d86a05b2 [testing] Simplify analyzer configurations
Bug: b/237755665
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try
Change-Id: Ia48331d6fd6bf00df9dbe1b895e157a0957064f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-01 16:16:42 +00:00
Ahmed Ashour c7a02bc43e [_fe_analyzer_shared] fix 4 spaces comments as code block
Fixes #49047

Change-Id: I1aa08fc417365ca894467b15d5094ea203f01940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-01 15:55:00 +00:00
William Hesse 132810f343 [testing] Fix failure in test runner's batch compilation while deflaking tests.
All subclasses of Command must override indexedCopy.
A @subClassMustOverride annotation could have caught this problem.

Bug: https://github.com/dart-lang/sdk/issues/30175
Change-Id: I836cf58ae2233e3b2a5c7a494461e570aad5ffb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-06-30 20:01:21 +00:00
Alexander Aprelev 0c3455e52f [infra] Fix hanging test cleanup logic.
This is follow-up to a2d2d693dc.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/49303
Change-Id: I2db7d4518f12adca125395b4a3315fcf84b30de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250002
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-28 00:39:28 +00:00
William Hesse b153d46c4e [testing] Allow pkg/front_end tests to fail with exit code 1
The test runner expects VM tests to exit with a compile error or
an uncaught exception, which have special exit codes.
Some front end tests fail by explicitly exiting with exit code 1.
Recognize these tests as test failures, and not as failures
of the test infrastructure.

Change-Id: Ib89d89c69f0e4f289fde0f762a7dd47dad446953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249820
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-06-27 10:20:22 +00:00
Devon Carew e9f7cab5ca [tools] migrate the rest of tools/ to null safety
Change-Id: Ieec55a99e9020f8f3962654e07518726d9f66fc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249540
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-06-24 16:38:39 +00:00
Alexander Aprelev 6d923dfd99 Revert "Deprecate outdated errors, drop CastError and NullThrownError."
This reverts commit 0f3dea33f9.

Reason for revert: breaks dart->engine roller as flutter still uses NullThrownError, fails analysis step

Original change's description:
> Deprecate outdated errors, drop `CastError` and `NullThrownError`.
>
> Both `CastError` and `NullThrownError` becomes just (deprecated) aliases for `TypeError`.
>
> `FallThroughError` becomes deprecated. Fall-through was made a compile-time error in Dart 2.0, the error should no longer be used.
>
> `CyclicInitializationError` is deprecated. Null safe Dart doesn't specify which error a late initialization error throws. We use internal errors now.
>
> These errors should not be needed in sound null-safe mode (if they are even needed now), and so should be removed in Dart 3.0.
>
> TEST= No new tests, should not change behavior in a significant way.
>
> Bug: https://github.com/dart-lang/sdk/issues/49141
> Change-Id: I636e9a0d0c32021d40bb819a88a1f57db6efc5a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247384
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Brian Quinlan <bquinlan@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/49141
Change-Id: I1b2802ec69fe654525e683527ff3554ff972f0c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248741
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-16 17:12:19 +00:00
Joshua Litt 878901a16f [test_runner] Fix nullcheck failure when running tests.
This fixes infra failure on the dart2wasm bot.

Change-Id: I22df35f3750f2f7f608dd333ab4b811997a069c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248700
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-06-16 12:09:49 +00:00
Alexander Thomas a2d2d693dc [infra] Migrate test_runner to null safety
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-android-release-arm64c-try
Fixes: b/232495224
Change-Id: I0338db48c0cc89ec35d52bff2f508105e80c3538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248008
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-06-15 15:51:58 +00:00
Lasse R.H. Nielsen 0f3dea33f9 Deprecate outdated errors, drop CastError and NullThrownError.
Both `CastError` and `NullThrownError` becomes just (deprecated) aliases for `TypeError`.

`FallThroughError` becomes deprecated. Fall-through was made a compile-time error in Dart 2.0, the error should no longer be used.

`CyclicInitializationError` is deprecated. Null safe Dart doesn't specify which error a late initialization error throws. We use internal errors now.

These errors should not be needed in sound null-safe mode (if they are even needed now), and so should be removed in Dart 3.0.

TEST= No new tests, should not change behavior in a significant way.

Bug: https://github.com/dart-lang/sdk/issues/49141
Change-Id: I636e9a0d0c32021d40bb819a88a1f57db6efc5a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247384
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-06-15 15:35:58 +00:00
Nicholas Shahan 6bcb186436 [ddc] Add new test and builder configurations
- Add new versions of exisiting configurations to support the arm64
architecture. The current DDC configurations don't name one but
default to x64. In the future I would like to remove the default
and simply specify (x64|arm64) but I'm not making this change now
because I don't want to break the history in the test database.

- Add new "canary" named test configurations that rely on a
specific builder to pass a build time flag
`--gn-args ddc_canary=true`.

Change-Id: I675899ea2e952e2183b8379b60ddaa67e8b864a5
Issue: https://github.com/dart-lang/sdk/issues/48950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243562
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-06-14 17:54:47 +00:00
Konstantin Shcheglov ba4b3d20d2 Import dart:typed_data instead of deprecated re-export from dart:io
Bug: https://github.com/dart-lang/sdk/issues/23067
Change-Id: I6bfe7afabe344bb0de690f762b5f80604809021e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248344
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-06-14 06:29:37 +00:00
Devon Carew 2acf036023 move the third_party/pkg_tested packages into third_party/pkg
Change-Id: I7e2499aafb1ae85da4699358909ac67337593a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247927
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-06-13 17:04:36 +00:00
Ryan Macnak 6a1749edbc [vm, ffi] Misc fixes for RV32 FFI.
TEST=local
Change-Id: I50f0a848cfd973389a7e903aa89e650aa7420aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247503
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-06-08 19:41:52 +00:00
Alexander Thomas 8d6e0a85ee [test_runner] Prepare static error testing for null safety migration
Bug: b/232495224
Change-Id: I3c9de9574637bbc114d42da9804ca77cf0d054f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247082
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-06-04 18:42:47 +00:00