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>
In 8f4e5c8194 the `DiagnosticReporter` was cached in
`DevCompilerTarget` which introduced a memory leak.
Unfortunately our weekly bot that looks for leaks has been out of
commission, but is now coming back online.
This CL fixes the leak by overwriting the field every time, meaing we
don't save a reference to the first one (which is a leak).
Maybe ideally we shouldn't save it as a field at all, but that's a
potential for another day.
Change-Id: Ic740a212c436c475688a1de73c55a2344301e688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325260
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This change created a CFv2 build target and provided two
implementations of the FuchsiaEmulator, so that I can continually work
on both CFv2 build and test script integration independently.
The v2 target can be built with
```
tools/build.py --os fuchsia --mode release fuchsia_ffi_test_package_cfv2
```
And v2 FuchsiaEmulator implementation can be triggered with
FUCHSIA_CFV2 environment variable.
Bug: #38752
Change-Id: I31936a2ca967fbfeb2bc5628e2f005aef6762687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322583
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
The change allows const lists to be in the spread of a const set and vice-versa. It also reports the correct error if we use a map in a list/set (and vice-versa) which is necessary when we combine all the error reporting in the `ConstantVisitor` to one location.
Adds some additional tests to make sure the behaviour we want is still working.
Change-Id: I0f64d58c857bd905ac8521346cd34a113b6d4a40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323780
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Instead of making a StaticCall to _TypedListBase.nativeSetRange
inside _memMoveN, make a CCall to the memmove leaf runtime entry.
Rename _TypedListBase._nativeSetRange to _setClampedRange, since
it's now only used when per-element clamping is necessary.
Fix the load optimizer so that loads of unboxed fields from freshly
allocated objects do not have the tagged null value forwarded
as their initial post-allocation value.
TEST=co19{,_2}/LibTest/typed_data lib{,_2}/typed_data
corelib{,_2}/list_test
vm/cc/LoadOptimizer_LoadDataFieldOfNewTypedData
Issue: https://github.com/dart-lang/sdk/issues/42072
Change-Id: Ib82e24a5b3287fa53099fffd3b563a27d777507e
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-msan-linux-release-x64-try,vm-msan-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-x64-try,vm-linux-release-x64-try,vm-mac-release-arm64-try,vm-kernel-precomp-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324080
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
The library code and the intrisic code disagreed about the capacity of the result digits array. Compare similar adjustment for <<.
TEST=ci
Change-Id: I81395a242965d53de3a30f87637a6f1588300969
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325122
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
There is no need to add a single type parameter to the type table
because it is already represented as a local variable in the scope
where it appears.
Change-Id: I4553d54304a2e3b82e856b8511fdce81cda0653e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324901
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This reverts commit 2a669c571f.
Reason for revert: Failing dart -> Flutter Engine roller. We need to make some changes on the engine side to prepare for re-enabling these checks.
Original change's description:
> [dart:js_interop] Re-enable type checks on external APIs
>
> External APIs when using dart:js_interop should only allow
> primitives, JS types, and other static interop types. This
> was previously checked in a more restrictive mode called
> "strict mode" but is not checked everywhere where dart:js_interop
> APIs exist.
>
> Change-Id: Ic82a3ec0bf6062c25d7f8933e503820a21bc191f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316867
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
Change-Id: I54caf06976e215b2b576cedfc0013ee79c6682f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324902
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Update abstract classes into proper mixins since that how they are
used.
Change-Id: I8ce43f873a2aacab48d859de633f531f091e58e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325143
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
No functional changes, just flattening capabilities into using set...() methods instead of providing them inline to the `initialize` method.
Change-Id: I0182a7dfa6ad2a3b3d83519b7a90f296722d05b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324523
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The lint was being reported on the entire expression, making it potentially hard to identify the source of the lint. This change moves the range to the type itself, now matching the existing behavior of the lint in for each loops.
Change-Id: Id4a7c487aadb6282515c7ef5bb0fd8ebf923d8eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The linter is moved from third_party to pkg, and the old copy has
been removed from DEPS for weeks now. Remove the workaround that
ignores an old copy of linter in third_party/pkg/linter.
Users who have updated without running gclient sync -D will
now get an error that they have two copies of the
linter package, and they will get a message that they should
run gclient sync -D when they run gclient sync.
This completes the migration of the linter package into the SDK
source repository.
This reverts most of https://dart-review.googlesource.com/c/sdk/+/321722
leaving a small refactoring cleanup in place.
Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: Id5cdb3485e42e78743303d64370bc9f7899ad00e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325301
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: William Hesse <whesse@google.com>
This simplifies handle the constructor/member and its corresponding
tearoff as a pair. Also it prepare for supporting tearoff of
extension type constructors and methods with the same name.
TEST=existing
Change-Id: Iea6cbc0250c8df6bd0f825068c1f3e865d938427
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324202
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
- Add dart2wasm_options syntax to test_matrix.json.
- Add a new builder for the JavaScript compatbility mode
(`--js-compatbility`).
Change-Id: I32642e932f1d4a8a74b5b75f7783117520d51f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322281
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Currently the heap snapshot tool uses a regular Set<int> for storing
ints between 0 and the number of objects (n).
This CL instead introduces a specialized int set backed by a Uint8List
where each bit represents a number between 0 and n.
This specialized set is then created to fit the number of objects, so
even an empty set takes the same amount of space as a full set: about
125 kb per million possible values (or ~6 mb per 50 million).
For small sets thats a lot worse than before, but for big sets it's a
lot better. Runtime is also a lot better.
"Benchmarks" on a snapshot that's ~1.5GB:
Runtimes:
Before:
closure roots (or all after the first one): ~30s, ~19s, ~20s
eval and: ~5.5s, ~6.3, ~5.6
eval or: ~7.3s, ~6.5s, ~6.4s
eval minus: ~4.5s, ~6.4s, ~6.5s
With CL:
closure roots (or all after the first one): ~7.7s, ~4.3s, ~4.1s
eval and: ~0.2s, ~0.3s, ~0.2s
eval or: ~0.6s, ~0.6s, ~0.6s
eval minus: ~0.3s, ~0.2s, ~0.3s
Memory usage:
Before:
after loaded:
$ grep -E "VmPeak|VmSize|VmRSS" /proc/588700/status
VmPeak: 10293036 kB
VmSize: 9896880 kB
VmRSS: 9260604 kB
after all = closure roots
VmPeak: 12354840 kB
VmSize: 9529612 kB
VmRSS: 8898088 kB
after 2 x closure all
VmPeak: 13068580 kB
VmSize: 12478236 kB
VmRSS: 11891620 kB
after 3 x eval and
VmPeak: 18377540 kB
VmSize: 18376520 kB
VmRSS: 17803032 kB
after 3 x eval or
VmPeak: 19621712 kB
VmSize: 18114376 kB
VmRSS: 17491808 kB
after 3 x eval minus
VmPeak: 21522780 kB
VmSize: 21522272 kB
VmRSS: 20907724 kB
With CL:
after loaded:
$ grep -E "VmPeak|VmSize|VmRSS" /proc/594718/status
VmPeak: 10293560 kB
VmSize: 9967036 kB
VmRSS: 9323404 kB
after all = closure roots
VmPeak: 10293560 kB
VmSize: 9805272 kB
VmRSS: 9137364 kB
after 2 x closure all
VmPeak: 10868740 kB
VmSize: 10867208 kB
VmRSS: 10199784 kB
after 3 x eval and
VmPeak: 10906236 kB
VmSize: 10905728 kB
VmRSS: 10238424 kB
after 3 x eval or
VmPeak: 10925496 kB
VmSize: 10924988 kB
VmRSS: 10257388 kB
after 3 x eval minus
VmPeak: 10944756 kB
VmSize: 10944248 kB
VmRSS: 10276672 kB
Change-Id: I8d0b65fa51ac2bd4696c4d2782c4423966a7fbae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324682
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>