Timer events and perhaps other events are throttled when a Chrome tab
is in the background or not visible. This may be causing flaky timeouts
in Dart web tests that rely on many timers. In local testing, these
flags completely eliminated the problem.
IntensiveWakeUpThrottling is a web standard feature, and
TimerThrottlingForBackgroundTabs is a Blink-specific feature.
Bug: https://dart-review.googlesource.com/c/sdk/+/324203
Change-Id: I38904015b043768689be3a05bea5a50ad32df434
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325780
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This updates the generator of experimental flags to only refer to one
location for the current default language version.
Semantically the change does nothing, but it could make CLs that bump a
version smaller and easier to revert/patch.
Change-Id: I1c18c8e8105dfb33a302949ad2cfa159dae2addf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325660
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This splits ConstantVisitor(1) into a pure interface and a
ConstantVisitor(1)DefaultMixin with the base implementation. This is
a step towards avoid having an accidental default implementation where
a static error would have been preferable.
Also removes BodyVisitor1 which was unused.
TEST=existing
Change-Id: I265754e13e0ebcce5c154b16c7ee36854f4ce9fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325400
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
These are supported but there synthesized names conflicted.
TEST=pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_member_conflict.dart
Change-Id: I952907eb83d7e496eb7d53f5c6b67d8f1e87308b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324680
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
It allows the compiler to propagate this information in TFA - which
may be beneficial for cases when those methods aren't inlined.
TEST=ci
Change-Id: I55711806800e2a56e83a42cd51be705b68c3a4f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324701
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
There was a bug in source map generation introduced by this deferring. A map from JS Nodes to source map info is being shared between these two operations and in order to look up nodes in the map, the Node objects must be the same.
This gives up some but not all of the gains from deferring these function bodies. I'm working on a more long term fix that combines these two passes of the AST.
Bugs: https://github.com/dart-lang/sdk/issues/53466
Change-Id: If25d1b24dd32456155e8802725d480454c71d2b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325600
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
There are a couple of small format changes, but they are minimal
enough that we might not need to land a pre-built SDK with this.
Change-Id: I1d258c8a782e5db24c2048f407a8b7cf7b948eef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325580
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Strings are the most likely use case of getting and setting
properties, and therefore we should make that easier to use.
This CL also renames the extensions in dart:js_interop_unsafe
to a more relevant name and to avoid conflicts in dart:js_interop.
CoreLibraryReviewExempt: Backend-specific library.
Change-Id: Ia8ce6593167c648f9710b47cfe27f80c854be407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324572
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
This makes elf_loader.cc consistent with the other compilation units containing Dart_* functions. Addresses a Mac linker warning that these functions match the export glob but have hidden visibility.
TEST=build
Change-Id: I868c9940a7027c466c1173aa2db2fbeff6fe8999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325362
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Before running CP find all branches of form `Branch(v eq C)`,
where `eq` is one of `===`, `==`, `!==` or `!=` and `C` is
a constant and insert a redefinition of `v` in the true
successor which captures the information that `v` is equal
to `C` guaranteed by the branch.
SCCP algorithm can then use this information when propagating
constants. After SCCP all redefinitions inserted are removed
again.
We don't actually replace `v` with `C` in the dominated code
because this might lead to issues later, for example
it might result in redundant phis `phi(C, v)` (`C` flowing
from a predecessor where `v == C`) which are complicated
to eliminate again.
TEST=vm/dart/comparison_canonicalization_il_test
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-android-release-arm64c-try
Change-Id: I388dddb97b5e35f09d9904000c585864f27400f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324980
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Change-Id: I8fccc19af7ed2895b710e00feae3145e6ff8e401
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325480
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`.
dartdoc (f5750f5..dd28f4c):
dd28f4ce 2023-09-11 dependabot[bot] Bump actions/cache from 3.3.1 to 3.3.2 (#3497)
2ac7e323 2023-09-11 dependabot[bot] Bump actions/upload-artifact from 3.1.2 to 3.1.3 (#3496)
ecosystem (2e6c3ec..e96fbdb):
e96fbdb 2023-09-12 Moritz Try a fix for the health check socket issues (#164)
4cc5005 2023-09-11 Alexander Thomas Add missing license header to license.dart (#166)
3fbab6c 2023-09-10 Moritz Fix boolean condition in `publish.yaml` (#163)
http (7fb6fd6..de19214):
de19214 2023-09-12 Sam Rawlins Avoid passing a nullable value to Completer<nn-type>.complete (#1015)
native (a2dfedc..5177659):
5177659 2023-09-12 Daco Harkes [native_assets_builder] Speedup builds for 0 or 1 packages with native assets (#129)
7f30f4b 2023-09-12 Daco Harkes [native_assets_builder] Take packageLayout for build and dryRun (#127)
a7cd31e 2023-09-12 Daco Harkes `PackageLayout` constructor for already parsed `PackageConfig` (#126)
9f24b64 2023-09-11 Daco Harkes [native_toolchain_c] Fix MSVC x86 toolchain resolution (#124)
07e1de5 2023-09-06 Daco Harkes Reenable example on CI + roll dep (#122)
387f894 2023-09-06 Gabriel Terwesten [native_toolchain_c] Default handling for PIC/PIE compiler flags (#121)
0a4e5f8 2023-09-06 Gabriel Terwesten Add support for defines to `CBuilder` (#120)
test (27dcae1..6449495):
64494959 2023-09-11 Jacob MacDonald skip failing wasm tests (#2091)
83ae0d9f 2023-09-07 Jacob MacDonald Fix running browser tests that use deferred loading (#2090)
tools (2c8cbd6..fa01f9b):
fa01f9b 2023-09-11 Elias Yishak `--disable-telemetry` --> `--disable-analytics` (#145)
webdev (9487a45..6b21ecf):
6b21ecf0 2023-09-11 dependabot[bot] Bump actions/labeler from 4.2.0 to 4.3.0 (#2177)
78a5fece 2023-09-11 Sam Rawlins Avoid passing a nullable value to Future<nn-type>.value or Completer<nn-type>.completer. (#2205)
6f282432 2023-09-11 Parker Lougheed [webdev] Hide `--null-safety` option (#2206)
1c5a7bc7 2023-09-11 Parker Lougheed Replace deprecated lints (#2208)
f0656b4a 2023-09-11 Parker Lougheed Fix a few minor spelling mistakes (#2209)
158223b2 2023-09-11 Parker Lougheed Update old dartlang.org links to new .dev equivalents (#2210)
a8d114c5 2023-09-11 Elliott Brooks Update the comment for lookupResolvedPackageUris
76e050c6 2023-09-11 Elliott Brooks Clear the map of relative URIs on DartUri.clear()
38a17ced 2023-09-11 dependabot[bot] Bump dart-lang/setup-dart from 1.3.0 to 1.5.0 (#2212)
cca9e56d 2023-09-11 Elliott Brooks Reset Webdev after release (#2227)
824dcef7 2023-09-11 Elliott Brooks Reset DWDS after release (#2225)
45c09a80 2023-09-08 Elliott Brooks Prepare Webdev for release to 3.0.8 (#2224)
805d3b7e 2023-09-08 dependabot[bot] Bump actions/cache from 3.2.2 to 3.3.2 (#2223)
85d4e760 2023-09-08 Elliott Brooks Prepare DWDS for release to version 21.0.0 (#2221)
a3757f06 2023-09-08 Anna Gringauze Run monorepo generate (#2222)
c991e85a 2023-09-07 dependabot[bot] Bump actions/checkout from 3.2.0 to 4.0.0 (#2219)
9851c23c 2023-09-07 Parker Lougheed Update SDK constraints for Dart 3.0 and 3.1 stable releases (#2207)
Change-Id: I0caf74af171916d30eb8ee2ab78c15acaebaa229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325560
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Minimum SDK version is increased in order to be able to use Dart 3.0
language features in pkg/vm.
TEST=ci
Change-Id: I4ef1139b2f8ba8acc7dbcf9bc0fe77f663cc427d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325541
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This reverts commit 5a4b252252.
Reason for revert: Causing Flutter engine unit test failures, see https://github.com/dart-lang/sdk/issues/53506
Original change's description:
> [dart2wasm] Replace `struct.new_default` with `struct.new` for object
> allocation.
>
> When using the `struct.new_default` instruction for object allocation,
> fields are always nullable and mutable. By using the `struct.new`
> instruction instead, class fields can now have the same mutability and
> nullability in Wasm as declared in Dart. In addition, the class ID and
> type parameters (which are also stored in an object's struct), can now
> be immutable and nonnullable as well.
>
> To do this, object construction is now split into three functions:
> (1) Initializer: evaluates initializers for instance fields and
> constructor initializers (this constructor before super constructor).
> (2) Constructor body: executes the constructor body (super constructor
> before this constructor), with `this` pointed to the constructed object.
> (3) Constructor allocator: which calls (1), allocates the object using
> `struct.new`, then calls (2).
>
> Because fields now have the correct mutability and nullability in Wasm,
> this removes unnecessary null checks for nonnullable fields, and may
> allow for better optimisations by Binaryen.
>
> Fixes https://github.com/dart-lang/sdk/issues/51492
>
> Change-Id: Ib26046686f772a70509a870301217e9b1c91b77e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315820
> Commit-Queue: Jess Lally <jessicalally@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
Change-Id: I034d3acf3715abadc6811a7393ba780bee974329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325445
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This function did not handle raw types correctly: it assumed that
TAV is always non-null, but VM replaces TAVs of form
`<dynamic, ..., dynamic>` with `null`. We needed to handle
this case specially.
Fixes https://github.com/dart-lang/sdk/issues/53453
TEST=service/evaluate_variable_of_raw_type_test
Change-Id: If0a2669fd722fb0e0871138a68814a751888f4b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325420
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
The `EfficientLengthIterable` is an internal marker interface
that allows the SDK to more efficiently check, effectively,
`v is List || v is Set || v is Queue`, and some other
known internal types, which allows it to assume that `.length`
is efficient and doesn't iterate the iterable.
It's not intended for external use, but the current design
both has the name mentioned specifically in the declaration
of the public types `List`, `Set` and `Queue`,
and possibly allows the type to leak through the
least-upper-bound algorithm.
This change moves the mention of `EfficientLengthIterable`
from the public types to an anonymously named private type,
and ensures that the private type is never the result of
a least-upper-bound computation, by adding another
interface with the same depth that all the public
types implementing `EfficientLengthIterable` also implement.
(A longer term solution to `EfficientLengthIterable` looking
like it's a public name could be combining the collection-
related code from `dart:collection`, `dart:core` and
`dart:_internal` into a single `dart:_collection_impl`,
and exporting the relevant types from there. Then
we could make the interface be `_EfficientLengthIterable`
again.)
Change-Id: I717743f0ca253782162be0ad9ff05036fdf57159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322320
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
This adds an assert to `FastaErrorReport.reportByCode` to help avoid
missing errors because the parser error was accidentically ignored.
Special-casing is added for the messages currently skipped but
reported elsewhere.
Change-Id: I3944569bb858a1956b91c3343a4e982882afb803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
`IsTrivial` is supposed to return true iff `ToCompileType` would
produce a trivial (dynamic) type. However `IsTrivial` was taking
some of the irrevant parts of the `InferredTypeMetadata` into
account - meaning that it returned `false` where it should have
returned `true`.
This lead us to assign useless `dynamic` result type to various `StaticCall`, some of these calls can later be lowered to
`LoadIndexed` instructions, which will then also get the `dynamic`
result type. This useless type will then take priority over more
precise element type which could be inferred by
`LoadIndexedInstr::ComputeType`
TEST=vm/dart/load_indexed_trivial_type_il_test
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-android-release-arm64c-try
Change-Id: I69ee965ba0d0ac85ede3989680371f0dda19d8a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325302
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>