Commit graph

97124 commits

Author SHA1 Message Date
Sam Rawlins 10da52b016 linter: Move sized_box_shrink_expand tests
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>
2023-09-12 22:16:59 +00:00
Konstantin Shcheglov eeebd36a42 Augment. Use AugmentableElement<T> to share implementation.
Change-Id: Iccd84409eb198995e1a0e014cfb3d706fba99675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325542
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-12 22:16:52 +00:00
pq 3a24a90cdd add a primaryConstructor getter to ExtensionTypeElements
Change-Id: Ib77fb3caebe2039062063ad75f56947f07487fa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325446
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-09-12 21:47:33 +00:00
Devon Carew 4722e4deca [deps] rev dartdoc, ecosystem, http, native, test, tools, webdev
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>
2023-09-12 20:27:57 +00:00
Alexander Markov 3ec9cc86c8 [pkg/vm] Bump language version to 3.0 and cleanup experimental flags
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>
2023-09-12 20:18:59 +00:00
Jackson Gardner 67f0d4daf0 Revert "[dart2wasm] Replace struct.new_default with struct.new for object"
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>
2023-09-12 20:16:56 +00:00
Sam Rawlins 45930e3d62 linter: Mark use_build_context_synchronously stable
Fixes https://github.com/dart-lang/linter/issues/3915



Change-Id: I4909b6440859174852f85084fef4c847f0f46a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325365
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-09-12 19:50:09 +00:00
Sam Rawlins cdf016c6ab analyzer: Support animation doc directive; refactor classes
Work towards https://github.com/dart-lang/sdk/issues/52705

Change-Id: Idc77bf866beace85b40b30d464ff4c7c62e19735
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325360
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-12 19:40:38 +00:00
pq ba70bed261 @literal support for extension types
See: https://github.com/dart-lang/sdk/issues/53434

Change-Id: I2668b74e2037176d0ac6e6da22300be29ba14d8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325444
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-12 19:04:19 +00:00
Kenzie Schmoll 83b27b8bcf Add a retry to the DevTools handler for static files
Change-Id: Iced8093f894afd5574e3ae898e07f237e02002bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325323
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-09-12 18:52:01 +00:00
Brian Quinlan f0632629c3 [io/doc]: Provide more references to SocketOption.tcpNoDelay.
Bug: https://github.com/dart-lang/sdk/issues/52102
Change-Id: I759735acfb0a67a3c0e359d6cf4c0ecab97c6c2a
CoreLibraryReviewExempt: doc-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325443
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-09-12 18:15:08 +00:00
Sam Rawlins 252bfcb27a Move UNIGNORABLE_IGNORE from HintCode to WarningCode
Work towards https://github.com/dart-lang/sdk/issues/50796

Change-Id: Idb8d04eb07beeb4f201ca69d0543d85305d62ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325127
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2023-09-12 17:26:29 +00:00
Ryan Macnak df54b81dd1 [vm] Remove dead ARMv5 code.
TEST=build
Change-Id: I44b41bb783b5f5cad221d4508fee18ff0a23afe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325144
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-09-12 16:22:19 +00:00
Johnni Winther df89d602ee [cfe] Make TypeDeclarationBuilder and DeclarationBuilder sealed
Change-Id: I4f61e6ff41bb7505b22c3449f92088ca9f353e41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324060
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-09-12 12:23:33 +00:00
Vyacheslav Egorov 1a0e5dea69 [vm/service] Handle raw types in CollectStringifiedType
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>
2023-09-12 12:09:06 +00:00
Lasse R.H. Nielsen c15f054809 Hide the existence of EfficientLengthIterable better.
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>
2023-09-12 11:08:42 +00:00
Johnni Winther f7090efca0 [analyzer] Ensure converted errors are reported
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>
2023-09-12 09:17:57 +00:00
Sergey G. Grekhov 05d04c79f9 [co19] Roll co19 to 5b9b08fb3210ee83a92ab4afe2268326761dd9a9
2023-09-08 sgrekhov22@gmail.com Fixes dart-lang/co19#970. Don't use Process.kill() to exit a process (dart-lang/co19#2266)
2023-09-08 sgrekhov22@gmail.com dart-lang/co19#2258. Reapply review changes (dart-lang/co19#2267)
2023-09-08 sgrekhov22@gmail.com dart-lang/co19#2258. Update private fields promotion tests according to the new spec. Part 1 (dart-lang/co19#2263)
2023-09-08 sgrekhov22@gmail.com dart-lang/co19#1400. Add late instance variable test (dart-lang/co19#2264)
2023-09-06 sgrekhov22@gmail.com dart-lang/co19#1400. Add promotion of a representation variable test (dart-lang/co19#2262)
2023-09-05 sgrekhov22@gmail.com dart-lang/co19#2258. Rename and reorder private fields promotion tests (dart-lang/co19#2260)
2023-09-05 sgrekhov22@gmail.com dart-lang/co19#2258. Update assertions of private fields promotion tests. Add new ones (dart-lang/co19#2259)

Change-Id: I905f37237a432fa5a6488dbfc4bdddd45cf6c91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325220
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-12 08:44:26 +00:00
Vyacheslav Egorov 7ff975c2e5 [vm/compiler] Fix InferredTypeMetadata::IsTrivial
`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>
2023-09-12 08:13:12 +00:00
Jens Johansen cef9865586 [CFE/DDC] Fix leak caused by cached diagnosticReporter
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>
2023-09-12 06:11:28 +00:00
Zijie He 5282f6e33f [Fuchsia] Create CFv2 support
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>
2023-09-12 01:40:52 +00:00
Sam Rawlins 6f5606d442 Bump dartdoc to f5750f502fdbb887c93cd29aca1e573a92342c53
Change-Id: Iea45fb207114d9284fdba65857cea23f877c3b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-09-12 00:31:40 +00:00
Sam Rawlins 84655ea85d analyzer: Move FileSystemEntity methods to FileSystemEntity
Change-Id: I029203dbca21e96e5e57d2b347b9577223d32b84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325324
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2023-09-11 23:54:30 +00:00
Kallen Tu f2e11bdeee [analyzer] Allow spreads between const lists and sets in the const evaluator
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>
2023-09-11 23:39:30 +00:00
Keerti Parthasarathy 4a04ec3201 Wire up use of deprecated export.
Bug:48997
Change-Id: I440fb8ebfe63ae785571f7927c5cdab625eee0cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325363
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-09-11 23:24:19 +00:00
Sam Rawlins 02dba4189f linter: Move prefer_foreach tests
Change-Id: I0a6beae9d4983c8bef3445b569fc163c41f66faa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325361
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2023-09-11 23:17:30 +00:00
pq 2f90ee8cf1 validate @visibleForOverriding extension type targets
See: https://github.com/dart-lang/sdk/issues/53434

Change-Id: I931a7cdff990ca19f6ec3267340031ca5fa7b814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325322
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-11 23:16:10 +00:00
Liam Appelbe d5555377ed Add changelog entry for NativeCallable
Bug: https://github.com/dart-lang/sdk/issues/53322
Change-Id: I458ea1a920f68e3de23008649748a24602bb5e0e
Fixes: https://github.com/dart-lang/sdk/issues/53322
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324180
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
2023-09-11 22:25:06 +00:00
Tess Strickland 3f53d22d43 [vm/compiler] Create leaf runtime entry for memmove.
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>
2023-09-11 21:25:09 +00:00
Brian Quinlan 8a91749e42 Fix parsing of folded header field values.
Bug: https://github.com/dart-lang/sdk/issues/53227
Bug: https://github.com/dart-lang/sdk/issues/53185
Change-Id: Ibbdbdf9c8f2875e8f687244982810fffee20e69c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320920
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-09-11 21:13:58 +00:00
Ryan Macnak a4381f127c [vm, lib] Fix out-of-bounds access in BigInt.>>.
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>
2023-09-11 21:05:38 +00:00
Nicholas Shahan 1cce9b8052 [ddc] Avoid adding raw type parameters to type table
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>
2023-09-11 21:00:47 +00:00
Jackson Gardner db214e8c81 Revert "[dart:js_interop] Re-enable type checks on external APIs"
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>
2023-09-11 19:31:20 +00:00
Konstantin Shcheglov c47f1b02ab Augmentation. Support for top-level functions.
Change-Id: I5fff9739c8159678b63a393d5d4c00f55b45a007
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325125
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-11 19:08:12 +00:00
Nicholas Shahan 20c8756bc8 [ddc] Bump pubspec SDK constraint to 3.0.0
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>
2023-09-11 19:07:02 +00:00
Danny Tuppeny ccbc3d95dc [analysis_server] Add additional tests for file delete/create with overlays
Change-Id: Iec6a158f394611a84bce6e4bf107039fbf82241e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-11 18:26:15 +00:00
Danny Tuppeny f2eee8bf71 [analysis_server] Don't flush diagnostics for deleted files that have overlays
Fixes https://github.com/dart-lang/sdk/issues/53475

Change-Id: I5eaba2192e8d9d141cbee02f4c9bbe941db026f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325262
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-11 18:16:38 +00:00
Danny Tuppeny 3bf8a233a5 [analysis_server] Add a preview flag for surveys
Change-Id: Iaacdeb24a222df3cf6d730641c7c4cf7355f0f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-11 18:08:06 +00:00
Danny Tuppeny c11697af90 [analysis_server] Migrate remaining LSP tests to new set() methods for capabilities
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>
2023-09-11 18:00:10 +00:00
Konstantin Shcheglov c3af85fe47 Augmentation. Support for fields.
Change-Id: I57a9975c3c6516a310fccd069a1231f139e58296
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-11 18:00:03 +00:00
Parker Lougheed f91a4cf1b0 [linter] Link to docs for more context on enhanced enums
Change-Id: Iacfda3ea97bfe7025f0d415f06ef2b342df37dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-11 17:52:07 +00:00
Parker Lougheed 08a1093cd4 [linter] Focus omit_local_variable_types on type itself
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>
2023-09-11 17:51:59 +00:00
William Hesse 979f5d097c [linter] Remove special handling of linter package in generate_package_config
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>
2023-09-11 17:18:05 +00:00
dependabot[bot] 79f650c4f8 Bump actions/upload-artifact from 3.1.2 to 3.1.3
Closes https://github.com/dart-lang/sdk/pull/53482

GitOrigin-RevId: 5044cd9750ccff25a4dfef3a680986bda3b16e9a
Change-Id: I5a1edba320c1e9eef1ecc2f499100d6f51857091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325124
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-09-11 17:02:56 +00:00
dependabot[bot] d998492b9b Bump actions/checkout from 3.6.0 to 4.0.0
Closes https://github.com/dart-lang/sdk/pull/53483

GitOrigin-RevId: c1cb9106ffcb16dc9534172bf3354ad9954102cd
Change-Id: I66e543e1f9b7d784930cca736909dd0c327074e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325141
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-09-11 17:02:40 +00:00
Jake Macdonald 0ffd54738a add declarationKind for extensions and libraries, support augmenting extensions and add test
Change-Id: I510976cac641800e664e92e7db786962d539ec9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325021
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-09-11 15:56:23 +00:00
Parker Lougheed 0ac6f0846a [analyzer/linter] Remove linter rule maturity
Change-Id: I08a064acf5911ea20d1e3a90e9e54b5837296540
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325160
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-11 15:30:02 +00:00
Johnni Winther 4c1a94c0d3 [cfe] Embed tearoff in Extension(Type)MemberDescriptor
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>
2023-09-11 13:35:10 +00:00
Ömer Sinan Ağacan 5865e6db9f [dart2wasm,smith] Add options support in test_matrix.json, jscm builder
- 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>
2023-09-11 10:50:22 +00:00
Jens Johansen c49f87382b [vm] Use specialized int set in heap snapshot tool
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>
2023-09-11 10:48:46 +00:00