So, that we don't send analyzing/idle during drivers dispose.
Change-Id: I589cc368b2877baa0878d405f7ab3ca7daf31f3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This happened to work in both type systems because the property of the
same name exists in both, but technically `unwrapType()` is part of
the old type system and will be deleted soon.
Change-Id: I5620c5f409f0c6fe486b9a4c7a6872ee8deabc09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348800
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This is the first of many such CLs. We need to record the completion
everywhere that `OpType` is computing it in order to eventually be able
to stop using `OpType`. I have temporary code that compares the two
computations in order to ensure that they're the same, but I can't
commit it into prod, nor will it be useful beyond this transition.
In addition to recording the completion location in more places, this
also better handles the case when the offset is immediately before the
first character of a top-level declaration. I believe that we need to
do something similar when immedately after the last character, when
before and after class members, and when before an after statements.
Change-Id: I046675c56243981762cd06db4cd35c17989ccf27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Too much has changed to enumerate it all, but we can highlight a few new features. This help developers know what's possible now and also can boost their confidence that Dart is continuing to improve.
Change-Id: I6aa39dbc6276dfddb7bcc595277ca40a9308371f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348541
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
- Initial and final marking no longer visit all of new-space, reducing the STW pause for major GC.
- A scavenge during concurrent marking must forward / filter objects in the marking worklist that are moved / collected, increasing the STW pause for minor GC.
- Unreachable intergenerational cycles and weak references are collected in the next mark-sweep instead of first requiring enough scavenges to promote the whole cycle or weak target into old-space.
- Artificial minor GCs are no longer needed to avoid memory leaks from back-to-back major GCs.
- reachabilityBarrier is now just a count of major GCs.
TEST=ci
Change-Id: I1e653c9b5d3e02e45b280302c832157a75788db6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345350
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
mach_absolute_time uses the same clock as CLOCK_UPTIME_RAW. There are privacy concerns that boot time can be used for device fingerprinting. Dart doesn't not need to know boot time, only some monotonic clock.
TEST=ci
Change-Id: I57acd080bb93ce9cf51b4b90aec09bb7cab7f7af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348044
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
`package:ffi` has moved from dart-lang/ffi to dart-lang/native.
Stop pulling in dart-lang/ffi and update the revision for
dart-lang/native to include a revision with `package:ffi`
`tools/generate_package_config.dart` should automatically update
the toplevel `.dart_tool/package_config.json` to point to the new
checkout location the Dart SDK.
Also rolls breaking change in native_assets_cli:
https://github.com/dart-lang/native/pull/885
And rolls the move of the test projects:
https://github.com/dart-lang/native/pull/938
Change-Id: Ibc1c88026487bece2580a7d3d4ceb7ee50cd76d0
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-win-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346761
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Change-Id: I858db7090563cc7366d22f191b7cd3cf49047d5e
CoreLibraryReviewExempt: doc only change to the web libraries
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348182
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
The most important thing with dispatch table layout is to order classes
in depth-first pre-order numbers and make it only include concrete
classes.
* We only dispatch on concrete classes.
* Any selector of a base class is inherited by its subclasses
* Using DFS makes selector rows have few but wide filled blocks.
This CL orders class ids in a pure DFS pre-order numbering:
* DFS pre-order traversal for concrete classes
* DFS pre-order traversal for abstract classes
=> Increases dispatch table packing from 49% to 99%
=> Reduces GDT from 31k entries to 15k entries on Flute
=> Reduces Flute by around 2.1% code size.
It also prepares for implementing faster type checks by doing class-id
range checks.
Change-Id: I96744b114e8815904f7405dca1432cdca3c7fe30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348561
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Generally the test loads a big dill thats 90+% the same content as the
previous load, then verifies it.
This CL loads smarter and verifies less.
Before this CL, locally, running
pkg/frontend_server/test/frontend_server_flutter.dart took
real 24m56.080s
user 48m42.422s
sys 1m2.360s
and the suite edition (using 4 shards in isolates) took
real 15m9.196s
user 53m41.118s
sys 1m30.045s
With this CL, locally running
pkg/frontend_server/test/frontend_server_flutter.dart takes
real 5m0.206s
user 9m23.933s
sys 0m20.984s
and the suite edition takes
real 3m24.243s
user 12m0.069s
sys 0m28.131s
On the try-bot the runtime seems to have gone from ~40 minutes
to ~20 minutes, the "compile flutter tests" step from ~30 minutes to
~10 minutes and the portion of time actually running the
dart-code that compiles, loads and verifies, from ~26 minutes
to ~7 minutes.
Change-Id: I6db225c33e1c0ee817f3880327e720446150ad7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347282
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
The CIPD download puts the platform-specific executable for jsc
(JavaScriptCore) directly in the third_party/jsc directory.
Follow-up to https://dart-review.googlesource.com/c/sdk/+/347283
Bug: b/322134579
Change-Id: I6af151de10e28fee06f6ba64a288f12859516151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348642
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: William Hesse <whesse@google.com>
* Golem is now using -O3
=> remove `--omit-checks` from pkg/dart2wasm/tool/compile_benchmark.
* Dart CI is using -O1/-O2
=> remove `--optimize`/`--no-optimize` from
pkg/dart2wasm/tool/compile_benchmark and `dart compile wasm`
* Align semantics of -3 with dartjs (enable `--minify`, enable
`--omit-implicit-checks` disable `--omit-explicit-checks`).
=> This will make us see changes in benchmarks.
What remains is
* Expose remaining flags in `dart compile wasm` that are needed for
flutter (or add a generic `--extra-compiler-args` that forwards flags)
* Migrate flutter to use `dart compile wasm`.
* Remove `--omit-type-checks` from pkg/dart2wasm/lib/dart2wasm.dart
Issue https://github.com/dart-lang/sdk/issues/54675
Change-Id: I80654a3ae81bdc5f4c57e3fadccdf5612236102a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348500
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This updates the isPatch/isAugmentation flags to use an augmentation-
centric terminology.
* We use `isAugmenting` instead of `isPatch` to
mark that the origin of a builder is not the builder itself.
* We use `isPatchLibrary` on `SourceLibraryBuilder`s created as patches
* We use `isAugmentationLibrary` on `SourceLibraryBuilder`s created as
augmentation libraries.
* We use `isAugmentation` on `SourceClassBuilder`s and
`SourceMemberBuilder`s declared with the `augment` modifier.
Change-Id: If7fbf1787f2c319e71cae7521af2596dd0545fe5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348163
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Follow-up to https://dart-review.googlesource.com/c/sdk/+/347901 as it
didn't work when running the tests with out/ReleaseX64/dart.
Change-Id: I012d53217e87e087078de3fbff122dfca23b1e9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348261
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Normally it uses the AOT runtime & dart2wasm AOT snapshot, which takes
long to build. (similar reason why one doesn't want to use `dart compile
wasm` in dev cycle)
Fixes also bug in script that used $BINARYEN_FLAGS instead of
"${BINARYEN_FLAGS[@]}" - which caused wasm-opt to run without
any flags.
Change-Id: Id6e03dbc01f7dba22de380453260278858dc0aa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348480
Reviewed-by: Slava Egorov <vegorov@google.com>
When a unit test expectation fails, it is helpful to include the
location of the test code that led to the problem in the test output.
Change-Id: I56827150be2fe75a2febee6b61af49eba5c2def9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348362
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
The compiler would perform O(n) operation (where `n` is number of
classes that implement a selector) every time a GDT call is made.
Change-Id: I428a69faa0f5d83e11b3948fd7e009f49c1acba1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348400
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This reverts commit 43fb59f4dc.
Reason for revert: Breaking Dart SDK -> Flutter Engine roller. See https://github.com/flutter/flutter/issues/142253
Original change's description:
> Refactor PubWorkspace into PackageConfigWorkspace
>
> - use package_config.json as marker file for workspace.
> - workspace can have multiple packages, they can be either PubPackages (marker pubspec.yaml) or BasicWorkspace.
> - add package info (pubspec) to resolution salt.
> - removed duplication of finding package_config.json from ContextLocator, as this is now done while creating workspace.
> - some test/s setup/expectations were changed since we now use package config as marker for workspace instead of pubspec.
>
> Change-Id: I091a4a686c6b1d8c14858aefd9843a8d9c8efa25
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345346
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Change-Id: I59adf5b26d25e360bcf962323db688156774c767
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Records should be marked allocated when records get created
(e.g. record literals / constants) not when fields of records get
accessed.
Change-Id: I7b7fc5cfd71da1f501551efe948ae3a44a128b6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348381
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Closes https://github.com/dart-lang/sdk/issues/54138
Adds a helper to do better type-checks so that users don't
accidentally using is checks or have to manually do the right
typeof or instanceof checks. In order to do this, there is
some refactoring to make ExportCreator a SharedInteropTransformer
(as it's shared across all backends) so that we can reuse an
existing visitor. In the same class, we remove unnecessary setting
of parent pointers. We should clean up the fileOffsets as well,
but dart2js verifies that those are set, so we keep them as is
for now. Also adds some static errors for edge cases.
CoreLibraryReviewExempt: Helper for web-specific library.
Change-Id: I34d818ada1349b69afd15d170d3fafa0460f65fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347225
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
- use package_config.json as marker file for workspace.
- workspace can have multiple packages, they can be either PubPackages (marker pubspec.yaml) or BasicWorkspace.
- add package info (pubspec) to resolution salt.
- removed duplication of finding package_config.json from ContextLocator, as this is now done while creating workspace.
- some test/s setup/expectations were changed since we now use package config as marker for workspace instead of pubspec.
Change-Id: I091a4a686c6b1d8c14858aefd9843a8d9c8efa25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345346
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
We also temporarily make -O3 behave as --omit-type-checks (the current
golem behavior)
We can then make golem use -O3 and then make a Dart SDK CL that
reverts this change so we see the impact of e.g. --minify as change on
golem attributed to Dart SDK commit.
Change-Id: Ic74688de609e7ed720b1493a4236552963c53c2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348320
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
* Replace `.whereNotNull()` with `.nonNulls` which is now in Dart core.
* `.firstOrNull`, `.lastOrNull`, `.singleOrNull` and `.elementAtOrNull(i)` are also in Dart core and even under the same name, so simply drop the import of 'package:collection' whenever possible.
Bug: b/322159291
Change-Id: I81eb93426680dc78a608bbcc714eb26c0eca5c62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348260
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
We make the meaning of -O{0,1,2,3,4} to be similar to what dart2js has.
We also make the pkg/dart2wasm/tool/compile_benchmark accept the same flags.
Follow-up CLs will migrate Dart CI / Golem / flutter to use -O flags.
Change-Id: Id37476c596ec7483e633c7db9eec96438315e919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348165
Reviewed-by: Slava Egorov <vegorov@google.com>
This aligns the behavior of --omit-implicit-type-checks with dart2js
Change-Id: I453652339f23b89873d070422cf61eca77a2b68d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348164
Reviewed-by: Slava Egorov <vegorov@google.com>
Closes https://github.com/dart-lang/sdk/issues/54482
This is generally useful for users working around some limitations of
dart:html. While we want to encourage users to use package:web,
dart:html is not available on dart2wasm and users can use dart:html in
other ways already e.g. in an interop extension type, so it doesn't make
sense to disallow this. We also allow type parameters that extend these
types as well.
In order to make this a bit more performant (subtyping checks may be
expensive), code is refactored to cache more readily and separate the
notion of an allowed representation type vs interop extension type. We
also define the notion of a "core" interop type, which will be useful
when we want to efficiently query what interop type users are using
underneath the possible layers of extension types.
A few missing tests around typed_data are added and the error around
invalid types is reworded to include this change and be more consise.
Change-Id: I256b0cce4355d2a21853b0c5bf641166cafc523e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347224
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>