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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>