Commit graph

6975 commits

Author SHA1 Message Date
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
Kallen Tu 8264bd94d1 Revert "Eliminate dynamic call() in html_dart2js in _EventStreamSubscription."
This reverts commit f630a7c07d.

Reason for revert: Remove the `is` check since it's more costly than removing a dynamic call for web.

Original change's description:
> Eliminate dynamic call() in html_dart2js in _EventStreamSubscription.
>
> Change-Id: Ia4a300c210bc505f71cc3bfb1a1b911c96c1aa53
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256703
> Commit-Queue: Kallen Tu <kallentu@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>

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

Change-Id: I36b2f8cedc5f8b5235832ea29ea5eb40e2e8dc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257421
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-02 18:44:53 +00:00
Kallen Tu f630a7c07d Eliminate dynamic call() in html_dart2js in _EventStreamSubscription.
Change-Id: Ia4a300c210bc505f71cc3bfb1a1b911c96c1aa53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256703
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-01 00:27:29 +00:00
Alexander Thomas 789d979f90 Revert "[infra] Add dart_ci scripts to Dart SDK DEPS"
This reverts commit 1acf5dea46.

Reason for revert: Broke gclient sync for users.

Original change's description:
> [infra] Add dart_ci scripts to Dart SDK DEPS
>
> * Remove find_base_commit.dart script, this script will be supplied via
>   the CIPD package instead.
> * The packages use "latest", to stay in sync with the current
>   infrastructure rather than pinning them to an old version.
>
> Bug: b/242960194
> Change-Id: Iafa229e26b8926bc406758a79d22fe1410e1db96
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255681
> Commit-Queue: Alexander Thomas <athom@google.com>
> Reviewed-by: William Hesse <whesse@google.com>

TBR=whesse@google.com,athom@google.com

Change-Id: I1d17b47f72527e46e117420b9d816a5a1dce711c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/242960194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256502
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-08-31 15:47:29 +00:00
Alexander Thomas 1acf5dea46 [infra] Add dart_ci scripts to Dart SDK DEPS
* Remove find_base_commit.dart script, this script will be supplied via
  the CIPD package instead.
* The packages use "latest", to stay in sync with the current
  infrastructure rather than pinning them to an old version.

Bug: b/242960194
Change-Id: Iafa229e26b8926bc406758a79d22fe1410e1db96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255681
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-08-31 13:10:18 +00:00
Kallen Tu e0884c91f1 Eliminate dynamic call of .createElement in html_dart2js.
Change-Id: I76ab0063eee4213f20483172c16f86e651536945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256740
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-08-30 15:48:40 +00:00
Kallen Tu 2bb03e4344 Eliminate .style and ._initKeyboardEvent from html_dart2js.
Change-Id: I16ea832e8eff2b2aea02fb73e1cf7ee9702923af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256581
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-08-29 20:06:45 +00:00
Ryan Macnak 84a39b064f [infra] Disable Goma on dartk-linux-release-riscv64-qemu.
This is faster than Goma's local fallback.

Change-Id: Ieedfaf773279270ed6138d189d3b6b5ab6bbc8d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256242
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-08-24 21:09:01 +00:00
Lasse R.H. Nielsen b35b436cf5 Change : to = in tools/ and DOM templates.
Change-Id: Id0257e4d00ca4a7acc759d7f06fa5b64c744894b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256126
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-08-24 14:21:01 +00:00
Devon Carew 66208f5d66 [deps] rev package:file to the latest
Change-Id: I1b561e1825258d570b72a0dad263d9de1dc1daf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256020
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-08-24 00:36:10 +00:00
Kallen Tu fa7ffc9ac1 Eliminate dynamic calls in SVGElement.
Change-Id: I60c48145fb8ffe5cc5d1c20f86cfa9f067c2705c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256026
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-08-23 18:21:40 +00:00
Kallen Tu 64c3ea27da Eliminate dynamic calls to remove and tagName.
Additionally, fixed the template for html_dart2js so the generator would generate the correct code.

Change-Id: I2172bb10db413169b86690faa027365ff72e3d68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255763
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-08-22 17:27:39 +00:00
Ilya Yanok 4f504e4533 Revert "[deps] rev crypto, file, http, test, web_socket_channel, and webdev"
This reverts commit 0715df3d00.

Reason for revert: Could we please revert this temporarily? This breaks copies into G3 (b/243151015). Ivan will be back on Monday and hopefully we will fix it.

Original change's description:
> [deps] rev crypto, file, http, test, web_socket_channel, and webdev
>
> Change-Id: Icc92e4dce84183bac747375b644922845fe908a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255767
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=devoncarew@google.com,nbosch@google.com

Change-Id: I6b14d00ce3227995f8e285a559d8ba9968452961
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255860
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-08-19 19:31:55 +00:00
Srujan Gaddam 9f10a3bc16 [pkg:js] Add JsInteropChecks to Wasm backend
Also cleans up and unifies some behavior across the backends:

- avoiding reinstantiating JsInteropChecks for every library
- having the native classes as a member instead of recomputing on dart2js

Now that these checks exist, we can add lib/js/static_interop_test to
the test directories the wasm trybot runs.

Change-Id: I912aae988afe7915e80cc13d00b8c47818dfa520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255760
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-08-19 17:48:38 +00:00
Devon Carew 0715df3d00 [deps] rev crypto, file, http, test, web_socket_channel, and webdev
Change-Id: Icc92e4dce84183bac747375b644922845fe908a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255767
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-08-19 17:10:45 +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
Ilya Yanok d3f30dc3c6 Revert "Reapply "Avoid computing the URI scanner tables at runtime.""
This reverts commit 4c7110332e.

Reason for revert: Still breaks the same tests, see b/242715525

Original change's description:
> Reapply "Avoid computing the URI scanner tables at runtime."
>
> This reverts commit 855e1cd975.
>
> The blocking issue in internal test code is assumed fixed.
>
> Change-Id: I74e0be130d149a45f77dc90c354916308b76b741
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255248
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Auto-Submit: Lasse Nielsen <lrn@google.com>

TBR=lrn@google.com,kustermann@google.com

Change-Id: I391d2eb6dd9ae7367f656eaaaa7f9aeb1c31e0f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255254
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-08-16 16:46:28 +00:00
Lasse R.H. Nielsen 4c7110332e Reapply "Avoid computing the URI scanner tables at runtime."
This reverts commit 855e1cd975.

The blocking issue in internal test code is assumed fixed.

Change-Id: I74e0be130d149a45f77dc90c354916308b76b741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255248
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
2022-08-16 14:53:07 +00:00
Jens Johansen 8a1dbb160f [parser] Parse record literals
This is the first stab at implementing the record expressions from
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md

Change-Id: I2adb6cb3cd50d4ee45e144e86ec7011d046f6170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253783
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-16 06:36:36 +00:00
Riley Porter 01fafe5f28 [dart:html] Script to generate the prototype JS interop CSS properties
Generates a `tools/dom/scripts/prototype_css_properties.dart` file
with a JS interop extension with the intersection of all the dart:html
CSS property getters and setters from CssStyleDeclaration and
CssStyleDeclarationBase.

Change-Id: Ic616cdd5111eb169206a31c40e62356a7fb32150
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254561
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-08-11 21:12:30 +00:00
Alexander Thomas 58c4a9f14c [dom] Pin python version to 3.8
The scripts fail when run with the latest python3 versions. This uses
vpython to pin the python version to 3.8.

Change-Id: I71217a61f577f336728f99f22a255ea9a33c3af4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254420
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-08-10 15:29:28 +00:00
Johnni Winther 1662441541 [cfe] Enable alternative-invalidation-strategy by default
Change-Id: If9f08f883318a5f0487beaa0f7dbd73366ed5074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251107
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-08-10 14:57:18 +00:00
Pierrick Bouvier 1fed9b5bed build: recognize python architecture for Windows on Arm ("ARM64")
Closes https://github.com/dart-lang/sdk/pull/49611

GitOrigin-RevId: 93ba2c7c4975f45969d3d68eecab020659d1c64e
Change-Id: I73973eec8b635ef6e43e2c4d786ad8b128e4bfe3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253905
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-08-08 16:08:30 +00:00
Srujan Gaddam 409b426cfc [dart:html] Add SharedArrayBuffer constructor and slice
Fixes https://github.com/dart-lang/sdk/issues/35344

Change-Id: I5742adddf1fe01bfe40860a734a4c930091d8472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253563
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-08-03 01:04:25 +00:00
Erik Ernst 1c2c6ea1cd Adjust spec parser to use exit code 0 when parsing no files
Invocations of the spec parser used to exit with an error code (245)
in the case where no files were specified. This was considered to be a
useless type of invocation, and the spec parser would print out a help
message.

However, it is perfectly possible for a Gerrit CL to give rise to
invocations like that, e.g., when the CL deletes some files and does
nothing else. Also, it causes no known issues to report a success exit
code (0) in the case where no files are specified, and hence this CL
changes the spec parser accordingly.

Change-Id: I9bd75839f1a8052b3daa62fa5440451e46fb59e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253280
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-08-01 23:29:44 +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
Sigmund Cherem b62e612dc8 [dart:html] Deprecate custom element registration APIs.
The `registerElement` APIs in `dart:html` are legacy APIs based on a
deprecated Web Components v0.5 specification. These methods don't work
on modern browsers and can only be used with a polyfill.

The latest Web Components specification is supported indirectly via
JSInterop and doesn't have an explicit API in the `dart:html` library.

This change marks these APIs as deprecated. We intend to remove them in
the future (see https://github.com/dart-lang/sdk/issues/49536)

Fixes https://github.com/dart-lang/sdk/issues/48973

Change-Id: I2e96d36e95c9971b59cde80bc4da49b63d12b17c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252840
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-07-28 16:07:30 +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
Alexander Thomas 5249cd9294 [release] Bump version to 2.19
Tested: Standard CQ
Change-Id: Ic52d4d38a5b117dfcdc778dedfac08315ca30a54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251541
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-14 14:14:55 +00:00
Alexander Thomas 3e74df1fbc [infra] Un-shard vm-kernel-precomp-mac-product-x64
Fixes: https://github.com/dart-lang/sdk/issues/49174
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-mac-product-x64-try
Change-Id: I6e6c95e50ca4fdf9316e5a370de4c60e017e6a6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251262
Reviewed-by: William Hesse <whesse@google.com>
2022-07-13 10:34:05 +00:00
Ahmed Ashour 99f0fb5b70 Fix typos
Fixes #49364

TEST=ci

Change-Id: Ic643819c9cdd7b56690981b96b854b1e8d622fff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-12 19:35:22 +00:00
Lasse R.H. Nielsen 3fc0bf7e59 Retire the 2.17 language feature experiment flags.
Remove them from tests.
(They should have been removed from tests before launcing 2.17.)

Change-Id: I546f6cb90fdf9e6ed1bb560f3715f9db163b7c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-07-11 13:02:22 +00:00