Commit graph

7006 commits

Author SHA1 Message Date
Aske Simon Christensen fd12e2e4ae [benchmark] Test dart2wasm benchmark invocations.
Bug: b/260206997
Change-Id: I49e225d8420fc5b5c0123736d0d8069d4cecd108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273842
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-12-08 11:56:56 +00:00
Sigmund Cherem e8906e65e7 [3.0 alpha][dart2js] No longer infer the null-safety mode from sources.
This prepares dart2js to default to sound null safety in Dart 3.0.

The compiler no longer infers the default mode based on the input
program, instead uses sound null safety unless
'--no-sound-null-safety' is specified.

On a separate change, we expect to remove the option of disabling
null safety.

Note: this change should also be reflected in the CHANGELOG, but
we've currently not included it to redeuce merge conflicts, as we plan
to land multiple 3.0-alpha changes in a short window of time

Change-Id: Id87498cc5976548ec89d1f36c60674b72406950a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270860
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-12-07 04:02:13 +00:00
asiva e70e2bc1b7 [Dart 3.0 alpha] Fix some test issues (legacy mode argument not passed in)
TEST=ci

Change-Id: Iebb31a509b99837e41cf3823ca366c1560777af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273920
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-12-06 19:34:47 +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
Alexander Thomas 7e0d92d69d [3.0 alpha] Bump version to 3.0.0
Tested: Standard CQ.
Bug: https://github.com/dart-lang/sdk/issues/49529
Change-Id: I329b9940db7309c7e48f17eecd7a66d5b853a484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271922
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-06 02:40:36 +00:00
Sigurd Meldgaard a890972aee Filter '#' characters from log in tool/manage_deps.dart
Change-Id: Icac7b594a942787477beda2979eb0e427d8dcece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273780
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-12-05 15:10:30 +00:00
Alexander Thomas 484c79bdd6 [spec_parser] Add OWNERS
Change-Id: Ie0946865371d9e35de0fff1c972732f96ea09e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272662
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-11-30 14:01:10 +00:00
Sergey G. Grekhov 2d618d9734 [spec_parser] Allow negative numbers and symbols in a constant patterns
Change-Id: Idd0aaec42e1a92f57515dbb6bda27f1011c7d77d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272782
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2022-11-30 11:41:41 +00:00
Sergey G. Grekhov b1949bfa1f [spec_parser] Change logical pattern rules to '||' and '&&'
Change-Id: I0f973090b6fab0be0f9c774636b3cc4248dc2c22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272362
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2022-11-28 14:23:34 +00:00
Jonas Termansen d2d4ae0b61 [benchmark] Test --no-sound-null-safety on legacy web benchmarks.
Bug: b/241766173
Change-Id: I83b132fe1b7832d0520391a94d346d26db4f3766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271101
Reviewed-by: William Hesse <whesse@google.com>
2022-11-23 11:52:02 +00:00
Ahmed Ashour 9bea89246a Fix grammar
Fixes #50509

TEST=ci

Change-Id: I7ca115bbe6f436e9df126afddcc08eaba79af2f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270740
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-21 20:07:29 +00:00
Alexander Thomas ae1ed9e469 [infra] Remove bullseye-updates from dockerfile
This made the docker build work for me locally. The "updates" list was
probably needed on jessie but isn't needed on bullseye anymore.

Change-Id: I88f257b928f6ef690dac9e7d450eaa4c2ea12b2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271102
Reviewed-by: William Hesse <whesse@google.com>
2022-11-21 12:43:36 +00:00
Alexander Thomas bc48c17c22 [infra] Upgrade Debian package builder to Bullseye
Change-Id: I21e1d01d3acb7d780294fd5cabf75da9dcebd32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271080
Reviewed-by: William Hesse <whesse@google.com>
2022-11-21 10:49:32 +00:00
Erik Ernst f92206f682 Change pattern rules (rename extractor->object, add metadata)
This CL changes the spec parser grammar, Dart.g, such that its pattern
related rules correspond to the recent updates in the patterns feature
specification.

Change-Id: I8d07cdb4c7ce22e0625da5bc8224ca2cf57af095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268920
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-11-16 17:56:11 +00:00
asiva 41a7bb964d [OWNERS] Fix VM owners file entries.
TEST=none
Change-Id: I976ba4243c8df005cf1ccdb24f313b70ab603c83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269340
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-11-11 20:25:03 +00:00
Kallen Tu 63b49dfc8e Deprecate checkValidIndex and avoid using it in the core library.
TEST=No new behaviour, existing tests pass.

Change-Id: Ia7a8e58543bd5e1d8dd14bd46c5083759333845b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259104
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-11-08 19:02:35 +00:00
Kallen Tu ab217c355f [analyzer/cfe] Add an experiment flag for sealed class.
Have a separate flag from patterns, even though sealed families are to be shipped with patterns -- keep the work separate for now.

Change-Id: Ic3996b81d9a61f2a3b1e5137e7cc32ecc8bdec9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267289
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-11-05 00:20:50 +00:00
Johnni Winther 5baa4af7d8 [analyzer,cfe] Add 'views' feature and support for 'view class'
This adds the 'views' feature flag together with parser support
for 'view class'. If the feature is not enabled, an error is reported.

TEST=pkg/front_end/parser_testcases/views/...

Change-Id: I813ac86a0e7de9f0a5729c6d7ae35b82d1258ae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265780
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-11-02 11:09:59 +00:00
Jonas Termansen 5c57cfa043 [infra] Prepare debianpackage-linux for the new cherry-pick workflow.
The debian packages on the release branches are now uploaded to the
version directory only when the tools/VERSION file changes, allowing
cherry-picks to land asynchronously on the beta/stable branches via
gerrit without clobbering any existing release artifacts. This logic
matches the changes made to the recipe for the dart-sdk builders. This
change is required to enforce our data security policies for mandatory
code review on the beta and stable branches using the new release
pipeline workflow.

This change needs to be cherry-picked to beta and stable before
launching the new cherry-pick workflow to avoid clobbering artifacts.
This change is safe because it doesn't affect any aspect of the Dart
SDK except the final upload of .deb files that has been locally tested.

Match the dart-sdk builder logic by also uploading by git hash and to
the latest directory.

Bug: b/256599191
Change-Id: Ib0d4853482edd1bd68f459fc97410fe61b4981c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266685
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-10-31 17:22:38 +00:00
Erik Ernst 0c90e06932 Added pattern grammar rules
This CL changes $SDK/tools/spec_parser/Dart.g to include grammar rules
associated with the upcoming feature 'patterns'.

Change-Id: I3c8a5404471b0957d8e2a2b833156e02bbd3607b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266628
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-10-31 15:39:35 +00:00
Jonas Termansen 7edc7a63f1 [infra] Remove linux SDK builder test matrix entry.
Both the production and try builders for the Linux SDK have been
migrated to the new recipe that doesn't use the test matrix.

The tools/bots/dart_sdk.py script is is no longer use and is removed.

Bug: b/253079985
Change-Id: I85a122b6165858b3dd43e7a1baad1dcd23f32ecb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265341
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2022-10-28 11:11:47 +00:00
Srujan Gaddam c14c0fdda3 [pkg:js] Refactor export and mock tests to use Strings
Allows for tests to pass with dart2wasm. This CL also adds these
tests to the test_matrix.json.

Change-Id: I970ef26b0fb377095c3889e6f52bef256d618850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264604
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-10-26 16:34:38 +00:00
Sam Rawlins 9896f1c647 Enable the unnamed-libraries experiment by default in 2.19.0
TEST=tests/language/library/unnamed_library_test.dart

Bug: https://github.com/dart-lang/language/issues/1073
Change-Id: I1c7fa7b4ee4450e344a7613525765e4ab590cc8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265381
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-25 21:10:57 +00:00
Daco Harkes 89d769765a Revert "[tools] verify_docs don't error on library annotations"
This reverts commit 97eaded1ed.

Reason for revert: It was not erroring on the annotation on the
library, but on the implicit import statement above it due to
template:top.

https://github.com/dart-lang/sdk/issues/50291#issuecomment-1290158070

Original change's description:
> [tools] `verify_docs` don't error on library annotations
>
> Dartdoc code snippets should be able to have annotations before the
> `library` keyword.
>
> Bug: https://github.com/dart-lang/sdk/issues/49803#issuecomment-1287044157
>
> Change-Id: I7ec0b6db296274a1173d10d900f7af38a1f2b552
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265321
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Auto-Submit: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=lrn@google.com,devoncarew@google.com,dacoharkes@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I379a1871a1acd4d1c66804c3948f38e45691fd55
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/49803#issuecomment-1287044157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265324
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-10-25 09:35:18 +00:00
Daco Harkes 359dca76ad [tools] rev_sdk_deps.dart output commit message
This CL changes the output of the tool to have the desired commit
message, including title and reference to the script.

Also scan repos in parallel, reducing execution time from 19 to 4
seconds on my machine.

Change-Id: Ia5fe75c21dd3b217038337e31161d2b88d22026c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265282
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-10-24 18:06:19 +00:00
Daco Harkes 97eaded1ed [tools] verify_docs don't error on library annotations
Dartdoc code snippets should be able to have annotations before the
`library` keyword.

Bug: https://github.com/dart-lang/sdk/issues/49803#issuecomment-1287044157

Change-Id: I7ec0b6db296274a1173d10d900f7af38a1f2b552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265321
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-10-24 18:01:55 +00:00
Alexander Markov 671717b578 [vm/aot] Support dynamic record field access in TFA
TEST=language/records/simple/dynamic_field_access_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I811db5c649988cbadf7ab29e5c4c70366f55e86b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262845
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-19 17:49: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
Ryan Macnak 3e7a1703bb [infra] Increase sharding for vm-kernel-precomp-nnbd-linux-debug-simriscv64.
Change-Id: I3eb11e4eb2d3f2db5329df7245fbca969e2956f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263660
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-13 17:47:33 +00:00
Erik Ernst d2911decfb Adjust rules recordLiteralNoConst and recordType to include ()
This change is needed as a consequence of
https://github.com/dart-lang/language/pull/2422
where `()` was introduced as the syntax for the empty record as well
as the empty record type.

Change-Id: Ia8b3f590361343ca14355043c5898e7bd084c04e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261645
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-10-06 15:10:57 +00:00
Johnni Winther 99f60a5e66 [cfe,vm] Support 'records' experiment in the sdk
This adds support for the experimental 'records' feature in the sdk
by settings its experimental release version to 2.19 and opting the sdk
into the feature the allowed_experiments.

Change-Id: I7a30212e5724e5d8ae3208f177103764b9aed737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262760
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-10-05 09:00:30 +00:00
Martin Kustermann ed5ad5c087 Add CLI tool for analyzing Dart VM heapsnapshots
This CL adds an interactive command line tool to analyze
heapsnapshots generated by the Dart VM.

The tool works by operating on sets of objects. It supports operations
like users, transitive closure, union, ...

An example usage that loads snapshot, finds all live objects, finds
the empty lists in them and prints retainers of the empty lists:

    ```
    % dart bin/explore.dart

    (hsa) load foo.heapsnapshot

    (hsa) all = closure roots
    (hsa) stat all
          size       count     class
      --------   --------  --------
       43861 kb    8371    _Uint8List dart:typed_data
         ...
      --------   --------  --------
      108904 kb  400745

    (hsa) empty-lists = dfilter (filter all _List) ==0
    (hsa) empty-growable-lists = filter (users empty-lists) _GrowableList

    (hsa) retain empty-growable-lists
    There are 5632 retaining paths of
    _GrowableList (dart:core)
    ⮑ ・UnlinkedLibraryImportDirective.configurations (package:analyzer/src/dart/analysis/unlinked_data.dart)
        ⮑ ﹢_List (dart:core)
            ⮑ ・...
    ```

For now the tool lives only in dart-lang/sdk.

TEST=pkg/heapsnapshot/test/*_test.dart

Change-Id: I671c2e3ca770e1a5aa3e590e850a5694070b4c3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261100
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-09-30 14:15:01 +00:00
Erik Ernst 263be7413b Update spec_parser to handle new features (super, anywhere, records)
This CL updates Dart.g and hence the spec parser to handle new features
added to Dart in 2.17.

Change-Id: I42d6534d933df9a30453f12643dcc90e4d86fa80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260821
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-09-27 14:10:53 +00:00
Alexander Thomas e87f2d895c [build] Switch builds to the ninja in DEPS
Note: this "upgrades" ninja to 1.11.1.

Change-Id: Idca0f8a2a67cf5d5dbe75661bb14de174012580f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261101
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-09-27 11:24:03 +00:00
Daco Harkes ce4973b3cd [tools] generate_idefiles.py support for Windows
Three improvements to the generated compile_commands.json on Windows.

1. Prevent the use of .rsp files by using `ninja -t compdb -x`.
   Start using the ninja from DEPS that supports the `-x` flag.
2. Remove the `ninja -t msvc` part of the the build commands. Clangd
   does not understand it.
3. Add the windows sysroots (which are set with `-e environment.x64`
   in the build).
   Currently, these are hardcoded to the ones shipped in depot_tools
   because the `environment.x64` is non-trivial to parse.

Bug: https://github.com/dart-lang/sdk/issues/50032
Change-Id: I897ded9e7c97abdf4dde738c275db36536e0b0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260701
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-09-26 12:30:17 +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
Sam Rawlins 51114fca8a Unnamed libraries
Fixes https://github.com/dart-lang/language/issues/1073

Spec: https://github.com/dart-lang/language/blob/master/accepted/future-releases/unnamed-libraries/feature-specification.md

This work allows library directives without a name. Every single one would look like this:

```
library;
```

:) it was a little anti-climactic implementing a non-feature like this, but there it is.

The affordance for a library directive without a name is guarded by an experiment flag, `--unnamed-libraries`.

Change-Id: I8612238359e88d6082f7e89d0d0fc624fdb45273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257490
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-09-23 05:37:39 +00:00
Paul Berry 4f87eacc5e Add an experiment flag for patterns.
Change-Id: I175e4680a0949e52ae05f46c2051c701b55a99cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-09-22 19:56:38 +00:00
Ryan Macnak 68951ae5a1 [infra] Define NNBD versions of the RISC-V builders.
Change-Id: I7cb158d2e30e999564c11454783082837c7e5984
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259901
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-21 17:23:36 +00:00
Aske Simon Christensen d0d509d4fc [dart2wasm] Add relevant co19 and lib tests
A few co19 tests are marked as skipped for now, as they are hanging
due to https://github.com/dart-lang/sdk/issues/50026

Increase the number of shards to match the increased number of tests.

Change-Id: Ib91127986d13140164c357a22f2d1d9b7b2b7636
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260361
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-09-21 16:11:22 +00:00
Kallen Tu 7578614639 Remove dynamic invocations from custom elements in html_dart2js.
Registering custom elements are already broken -- see: https://github.com/dart-lang/sdk/issues/49536. There are plans on deleting this code at some point. This current change cleans up dynamic invocations in the deprecated code.

Removes cruft on already-deprecated code and doing it now because I assume dynamic clean up will finish before the issue resolves.

Change-Id: Ic6250c139c5d9b08d88650110f55442a7bf5dd42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259247
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-20 16:16:06 +00:00
Jonas Termansen 6622249c7f [infra] Remove win SDK builder test matrix entry.
Both the production and try builders for the Windows SDK have been
migrated to the new recipe that doesn't use the test matrix.

Bug: b/247507699
Change-Id: I7a603e716492ffa272a43eea959b721c8c4a8f1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259842
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-09-20 10:54:35 +00:00
Devon Carew 3a06b800e0 [owners] add mosum@ to the OWNERS_ECOSYSTEM file
Change-Id: Ibf04dd6ff547f30e1fe75f17fa4efaa63152883d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259243
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-09-16 17:51:55 +00:00
Jonas Termansen 822ae59aca [infra] Remove mac SDK builder test matrix entry.
Both the production and try builders for the macOS SDK have been
migrated to the new recipe that doesn't use the test matrix.

Bug: b/236109661
Change-Id: I4f578a162c866da6673b228023adb5966f1ca505
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259423
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2022-09-15 20:10:09 +00:00
Kallen Tu 586efdfe59 Add ignores for dynamic calls in html_dart2js sanitizing code.
Avoid removing dynamic invocations in sanitizing code as we don't know what type the element and its attributes may be.

Change-Id: I057d908027befe7fd284bf4ec6c68bd1d0e977f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259108
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-14 20:35:04 +00:00
Riley Porter c229ff56b2 [dart:html] Update prototype CSS properties script to match views model
Change-Id: I0bcea8e59b6d92b8a0aea82d64ca4266ec12869c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259062
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-09-14 18:00:52 +00:00
Riley Porter b94d9ab29b [dart:html] Add script to generate dart:html prototype legacy events
Adds a flag `--generate-prototype-events` to the dart:html generation
scripts, which causes a `prototype_events.dart` file to be generated
with EventStreamProviders and extensions for all events generated
in legacy dart:html. The generated file can be copied and pasted into `html_events.dart` to be used in the new dart:html prototype.

The script `prototype_htmleventgenerator.py` reuses as much common functionality as possible from the `htmleventgenerator.py`.

There were many edge cases to consider, like:
  - de-conflicting names with different event types (e.g. ProgressEvent onError vs SpeechRecognitionErrorEvent onError)
  - hiding deprecated types that don't appear in the Web IDL and haven't been needed in the glue code prototype yet
  - renaming extension on-types that have been renamed from the Web IDL
  - hiding custom events, which then need to be added to the prototype by hand
  - prefixing some events with the correct web library

Change-Id: I6ab944d74ede6d8a2178bbf9aa580a6ab7d67a77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259063
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-09-14 17:55:03 +00:00
Kallen Tu 7e13c388fe Clean up - unused typedef and lint ignore for html.
Change-Id: I50f89a2d59478c8e2a63a81d106e0943b496ad46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257427
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-08 20:59:24 +00:00
Lasse R.H. Nielsen 5642199dd0 Remove uses of : as default value separator in some tests/ directories.
Change-Id: I35bb926e53e92fd02e264fb5b14feadf063fb8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257961
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-07 14:49:17 +00:00
Michael Thomsen 17972ddce5 Move swarm to a test folder to avoid confusion that this might
be a customer facing app sample.

Bug: None
Change-Id: I94944d4d5677b08eaf6c27ecf26e8503d8eae38f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255255
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-09-07 14:08:18 +00:00