Commit graph

101865 commits

Author SHA1 Message Date
Srujan Gaddam 1c534e5fd5 [dart2wasm/ddc/dart2js] Lower Function.toJS and JSExportedDartFunction.toDart
Lowers these extension methods to some helper functions instead of
allowInterop to improve performance and get consistent semantics.

Specifically:
- Function.toJS no longer gives you the same JSFunction when calling
toJS on the same function multiple times in the JS compilers.
- Adds fast calling syntax for functions with 0-5 args in the JS
compilers.
- Allows additional args to be passed to converted functions that
are omitted in the JS compilers.
- The static type now determines the number of args that can be
passed to the JS function in the JS compilers.
- Fixes an issue in dart2wasm where if too few arguments are
passed, the call may succeed due to conversion of undefined to
null.
- Adds throws when a user tries to wrap a JS function that
returned from Function.toJS in the JS compilers.

Closes https://github.com/dart-lang/sdk/issues/55515
Addresses https://github.com/dart-lang/sdk/issues/48186

CoreLibraryReviewExempt: Changes to docs only in API surface.
Change-Id: I41d864dc5e02b597d9f1c16c88e3c04872f28225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368065
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-26 23:06:36 +00:00
Ben Konyi 4b88698e48 Revert "[ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer"
This reverts commit 64d4689a78.

Reason for revert: Platform.executable doesn't return a path, just an executable name, which can cause breakages.

TEST=ci

Original change's description:
> [ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer
>
> TEST=pkg/dds/test/control_web_server_starts_dds_test.dart
>
> Change-Id: I2e51783592912e5a719685f2ab5e7537b7a59586
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366560
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Derek Xu <derekx@google.com>

Change-Id: I4ceaee4b5ca8f5557e90cd914ee69fe9aa5f85a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373381
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-06-26 22:36:09 +00:00
pq 7d22d99b9b quick fixes for EXPECTED_BODY diagnostics
* `EXPECTED_CATCH_CLAUSE_BODY`
* `EXPECTED_CLASS_BODY`
* `EXPECTED_EXTENSION_BODY`
* `EXPECTED_EXTENSION_TYPE_BODY`
* `EXPECTED_FINALLY_CLAUSE_BODY`
* `EXPECTED_MIXIN_BODY`
* `EXPECTED_SWITCH_EXPRESSION_BODY`
* `EXPECTED_SWITCH_STATEMENT_BODY`
* `EXPECTED_TRY_STATEMENT_BODY`
* `MISSING_ENUM_BODY`

See: https://github.com/dart-lang/sdk/issues/55917


Change-Id: If33df1e9b3e93c7aaff30565f6d61dc56c24e491
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-26 22:21:11 +00:00
Srujan Gaddam b8402f5c27 [dart:js_interop] Make ExternalDartReference generic
Closes https://github.com/dart-lang/sdk/issues/55342
Closes https://github.com/dart-lang/sdk/issues/55536
Closes https://github.com/dart-lang/sdk/issues/56015

- Adds a type parameter T that extends Object? to
ExternalDartReference to capture the type of the value
that was externalized.
-- In the JS compilers, the representation type of
ExternalDartReference is now T.
-- In dart2wasm, the representation type is now JSValue?.
- ExternalDartReference no longer implements Object.
- Return type of toDartObject is now T.
- ObjectToExternalDartReference and
ExternalDartReferenceToObject both now are on a T that is
bound to Object?.
- Internal patches for WeakReference and Finalizer are
updated.

Change-Id: Ic2dc834b17ec6a4eb2122cba3c495a6e0a1eae6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370663
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-06-26 21:53:53 +00:00
Konstantin Shcheglov 2653075ac8 Macro. Issue 55931. Add new classes first, as AugmentationLibraryBuilder does for code.
Bug: https://github.com/dart-lang/sdk/issues/55931
Change-Id: Ice846b41ad4a8b08393346ef973b8ca5410b21ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-26 21:49:09 +00:00
Konstantin Shcheglov c64cd5f394 Macro. Add more operation performance details.
Bug: https://github.com/dart-lang/sdk/issues/55784
Change-Id: Ibe83b4eee8bbf47ee79193244f9233cdb1b6aece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373161
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-26 20:37:47 +00:00
Konstantin Shcheglov aea99e79ae Augment. Report AUGMENTATION_TYPE_PARAMETER_NAME
Change-Id: Icd455e26ec11f2daa9907e996df2706bd8f7d9f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-26 20:05:29 +00:00
Parker Lougheed 8e4c2d6cee [vm] Fix link to learn more about missing main function
The previous link no longer lead to a relevant destination. While I can add a client-side redirect on dart.dev, this CL updates the link to a redirect we can better guarantee as up to date in the long term.

TEST=vm/cc/DartAPI_RootLibraryMissingMain

Change-Id: I1e9dbf7a32c1468c308e9cf00d96575ba3c24695
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373322
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-26 19:58:11 +00:00
DEPS Autoroller d06fb0c54e Roll gn from f284b6b47039 to b2afae122eeb
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/gn-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com,dart-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in gn: https://bugs.chromium.org/p/gn/issues/list
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: I80361ebd889b1843beb71d59132cffd8508f5d31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373060
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-26 19:52:52 +00:00
Ben Konyi 4abd615d32 [ CLI ] Update checkArtifactExists check to allow for Links in addition to Files
Related issue: https://github.com/dart-lang/sdk/issues/56080

Change-Id: I9b630ea3488e3f030cd92c593a4ee3bb4d718dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373380
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-26 17:18:17 +00:00
Konstantin Shcheglov 18a90180de Augment. Report AUGMENTATION_TYPE_PARAMETER_BOUND
Change-Id: Ie6c4e223f0fa85dadf0c3fe7902db67a55021b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-26 17:11:48 +00:00
Keerti Parthasarathy c5ef526828 Test case with workaround for data driven fixes on extensions
Change-Id: I3e6d13ab110b84bd3f87c3bbd84ccb44d9ea5bc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373160
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-26 16:20:18 +00:00
Ömer Sinan Ağacan d33c948e1c [dart2wasm] Use unsafeCast in a few places
If a `String` is not a `StringBase` it must be a `JSStringImpl`.

Using `unsafeCast` instead of `as` improves generated code as it avoids
calling the "as" function for casting to `JSStringImpl`.

Change-Id: Idba4f44fc44b7715c4433262dd0eab25d062d2d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373244
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-26 13:37:42 +00:00
Martin Kustermann f3e1b210de [dart2wasm] Make --shell-option work in pkg/dart2wasm/tool/run_benchmark script
Change-Id: Ib7de19a936c211fd593fa81d37764e734193eac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373260
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-26 12:08:19 +00:00
Daco Harkes 8f962bdff6 Reland "[vm] Move ResolveUri to bin"
This is a reland of commit 1a614b1d86
Bug: b/348315159

This CL removes the native assets fallback from the VM.

TEST=pkg/dartdev/test/native_assets/build_test.dart
TEST=tests/ffi/native_assets/asset_relative_test.dart

Closes: https://github.com/dart-lang/sdk/issues/55523
Closes: https://github.com/dart-lang/sdk/issues/55925

Change-Id: Ib40d3a8c7d4b7c6226b6e4db4b3016cc32591239
Cq-Include-Trybots: dart/try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-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,vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-msan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372500
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-06-26 11:10:06 +00:00
Johnni Winther 8b45eef446 [cfe] Don't use NeverType in _inferNeverInvocation
- the receiver could be a type variable whose _bound_ is Never

Closes #56079

Change-Id: I6871b418ab0b9646d8de79654b84bbb2f4e60dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373243
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-06-26 10:58:38 +00:00
Johnni Winther 01ca0b842d [cfe] Add ProblemReporting interface
This adds an interface for the addProblem method and uses it to remove
dependency on SourceLibraryBuilder from OutlineBuilder.

Change-Id: Ied3ecad46359d437aef133bb2745fd97ba9d175a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373081
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-26 10:45:05 +00:00
Ömer Sinan Ağacan b1fcd83be1 [dart2wasm] Use unchecked codeUnitAt in first/lastNonWhitespace
Change-Id: I2d9a7b60df3a1b89904b55f3a8d9f907223ce5cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373242
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-26 10:41:41 +00:00
Martin Kustermann 25c02559af [DEPS] Update commandline shells & firefox
Change-Id: I7300be6c45abb89381640df6dce9e858d77483e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373240
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-26 10:22:38 +00:00
Martin Kustermann f5d478be4c [DEPS] Update binaryen to tip g3 version
Change-Id: I65f21132c39fdcb9b41b53512e924bbdaf6f8a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373222
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-26 10:03:37 +00:00
Chloe Stefantsova 957106e29d [null-aware-elements] Add experiment flag 'null-aware-elements'.
Part of https://github.com/dart-lang/sdk/issues/55949
Closes https://github.com/dart-lang/sdk/issues/55926

Change-Id: Ic8c6a9226bcad54daf99e01746044045937376b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369960
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-06-26 09:28:16 +00:00
Kevin Moore 06a7c30b9d changelog: drop workspace reference from 3.5
Not ready to announce it (yet)

Change-Id: Icc7fbdaa2564511429a1b5601afcce065a5663f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373162
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
2024-06-26 09:12:36 +00:00
Jens Johansen a8314dac74 [kernel] Fix crash in dart_scope_calculator when all scopes are artificial
Fixes https://github.com/dart-lang/sdk/issues/55986

Change-Id: Icc7e6dbb4272613e838b0bd2ef9ac4764dd068f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373200
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-26 08:23:59 +00:00
Ömer Sinan Ağacan 01cf48f653 [benchmarks] Remove dynamic invocations in BigIntParsePrint benchmark
The dynamic invocations `sink1.codeUnits` and `sink2.isEven` can be slow
on dart2wasm.

They are done once in a few iterations, but the noise can still be
eliminated with a `if (runtimeFalse)` guard around the code that makes
sure the benchmarked code won't be optimized away.

Change-Id: Id85013fa4be1912d1c710cd119e9f6f1e77bcff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373040
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-26 08:07:11 +00:00
Sam Rawlins 1e84b64a0e DAS: Move DartChangeWorkspace to the analysis_server_plugin package
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I79f43d06b48149b1d9dec30c5f5a77fdfd57ce4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373143
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-26 02:17:59 +00:00
Ryan Macnak 3180d95453 [vm, gc] Don't add large arrays to the deferred marking list.
Write barriers are not eliminated for large arrays, and deferred marking them is expensive.

TEST=IsolateSendExitLatency
Change-Id: Ifeefb0d86e15d096ae45f8e8ff6aa3d9db4cb9ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373141
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-25 21:12:28 +00:00
Konstantin Shcheglov e0ad0db26f Augment. Use InvalidType if InstanceElement(s) that has wrong number of type parameters.
Change-Id: Ib4dab3c55473f6cabbd99561f2de899cb5ef3c49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-25 20:38:51 +00:00
Ben Konyi 50972b8224 Remove extra null check in control_web_server_starts_dds_test
Follow up to https://dart-review.googlesource.com/c/sdk/+/366560

Change-Id: I4057f491aca1b480db3b5360c5f5713e03360b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373180
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-06-25 20:03:09 +00:00
Keerti Parthasarathy ee5881bd58 Suggest static members when visiting contructor name.
Fixes https://github.com/dart-lang/sdk/issues/56056.

Change-Id: I97cded39b83f70305a9ceec8af7b1f07b63e43de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-06-25 18:48:55 +00:00
Keerti Parthasarathy ddbae48ae6 Mention adding experiment flag in new feature template
Change-Id: I8ee00b2a70f97e60dca4a3a09efed8ab7d6481d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-06-25 18:27:47 +00:00
Srujan Gaddam 1550539558 [dart:js_interop] Make not and isTruthy return JSBoolean
Since these operators can't be written by users, prefer
to keep them as JS types.

Closes https://github.com/dart-lang/sdk/issues/55267

Change-Id: Ifb9b581fb82e057ba14c669a5a3934f9c502d06f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359181
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-06-25 17:50:33 +00:00
Srujan Gaddam 0b761229cc [dart:js_interop] Change importModule to accept JSAny
Closes https://github.com/dart-lang/sdk/issues/55429
Closes https://github.com/dart-lang/sdk/issues/55508

Objects like TrustedScriptURLs can be passed to the dynamic import
function, and therefore importModule should accept any JS value.

Change-Id: I43ce9aeb1e8fbd628bc768a16b246ba19470b1dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363504
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-06-25 17:50:33 +00:00
Devon Carew 6d26948874 Bump web to 6b8a46561b82de9b20d77d9ac491844d303ca08f
Changes:
```
> git log --format="%C(auto) %h %s" 2fe754f..6b8a465
 https://dart.googlesource.com/web.git/+/6b8a465 Account for typedef nullability (257)
 https://dart.googlesource.com/web.git/+/f6a7d38 Emit double as return value instead of num (256)
 https://dart.googlesource.com/web.git/+/6d22294 Add Float16Array alias (255)

```

Diff: https://dart.googlesource.com/web.git/+/2fe754fb396cb9b87010f0318cfbfc5408346c48..6b8a46561b82de9b20d77d9ac491844d303ca08f/
Change-Id: I1bc60ab8d6b71c645e4c80a26fd3e46b38d9c26d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373140
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-25 17:40:25 +00:00
Brian Wilkerson 4cade6496b Add documentation related to adding experiment flags
Let me know if there's any information missing. We can either add it
now or later.

Change-Id: I9b0792e9e614eadc3a570c3ac0155e8b91ba8489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373101
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-06-25 17:16:48 +00:00
Ben Konyi 64d4689a78 [ Service ] Start DDS and serve DevTools when the VM service is started via dart:developer
TEST=pkg/dds/test/control_web_server_starts_dds_test.dart

Change-Id: I2e51783592912e5a719685f2ab5e7537b7a59586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366560
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-25 16:25:33 +00:00
Ben Konyi defd81e31d Update pinned SDK to 3.5.0-278.0.dev
Change-Id: I668fd8b0fde215f53dec3c69b3f5b356c97ae5e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372921
Reviewed-by: Matan Lurey <matanl@google.com>
Commit-Queue: Matan Lurey <matanl@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-25 16:05:27 +00:00
Jumpaku 0abc42ed0e fix typo "no key was not found"
Closes https://github.com/dart-lang/sdk/pull/56073

GitOrigin-RevId: 39caf86d2d37b1f15657af68ce39282ef6ae55f7
Change-Id: Ice8b4246915ebd5b1ea6c766723036c5bde2aa7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372842
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-25 15:11:39 +00:00
Alexander Markov efab897725 [vm,aot] Fix type check in implicit setter of a covariant field
Inferred type of a covariant field should not be used as
an argument type of an implicit setter, as setter of a covariant
field performs a type check before assigning value to the field.

Correct such uses of covariant field types in unboxing
and AOT type propagation in order to avoid incorrect removal of
a type check in the implicit setter of a covariant field.

TEST=runtime/tests/vm/dart/regress_56051_test.dart
Fixes https://github.com/dart-lang/sdk/issues/56051

Change-Id: I55bfedfd96e918aac9597706c6eab1b81e1202ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372721
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-06-25 14:34:20 +00:00
Johnni Winther 874c6104fd [cfe] Move libraryTypeParameterScopeBuilder to SourceCompilationUnit
Change-Id: Ie56319e75d276d6598c06648fadedced7d0b2c73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372504
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-06-25 13:57:58 +00:00
Martin Kustermann 3f977f0ca6 [dart2wasm] Fix handling of arguments to main
This fixes an issue with runtime blob that created arguments
array for `main()`: the JS referenced a now (after [0]) no longer
existing `stringToDartString` function.

Instead of having a runtime blob at all for the dealing of `main` we
simply give the JS array to the `invokeMain` function which can use
normal JS interop to transform it to a `List<String>`.

=> This avoids the need to export `$getMain`, `$makeStringList` and the
`buildArgsList` JS function.

[0] https://dart-review.googlesource.com/c/sdk/+/372660

Change-Id: I665e60ab93a4f8ed9de5fc135ed0e68514f2af5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372461
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-25 13:09:29 +00:00
Jonny Wang 751c03b95b [docs] Add instructions for building on Fuchsia
Change-Id: Ibfbbdd8152c91ebc5ceffdcdad62b130fce0bb90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372980
Commit-Queue: Jonny Wang <jonnywang@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Jonny Wang <jonnywang@google.com>
2024-06-25 12:59:19 +00:00
Martin Kustermann 09a7e4f52b [dart2wasm] Optimize String & Byte transfer across WasmGC<->JS boundary
Leads to 30-50% improvements across variety of WasmDataTransfer.*
benchmarks.

[0] https://dart-review.googlesource.com/c/sdk/+/372660

Change-Id: I57aa9e9679e2bdb413783591f4dc9cf9ced1966e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372780
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-25 12:05:25 +00:00
Ömer Sinan Ağacan af9067061c [dart2wasm] Remove unused JSCM typed data lib
Change-Id: I3ba9842e431ad880186e550d8d602ee9274c9fe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-25 11:00:49 +00:00
Johnni Winther 8df57398c9 [cfe] Move src/fasta/ subfolders to src/
Part of removing uses of 'fasta'.

TEST=existing

Change-Id: Ice027678e11b7da8c1a7e756a1e1c8c8284722bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372623
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-06-25 10:05:21 +00:00
Devon Carew 75c15c1e2e [repo] delay issue triage by 2 minutes
Change-Id: If6badbe77f5fd8099d419496dc084231eb5a852f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373020
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-06-24 23:50:16 +00:00
Konstantin Shcheglov 1b57d51908 Macro. Move updating types for GenericFunctionType and TypeParameter to declarations.
This saves us about 120 ms out of 2000.

Change-Id: Ib352a78b39706b07fc2ee0d5b2c3e6e77d98119c
Bug:https://github.com/dart-lang/sdk/issues/55784
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 22:41:39 +00:00
Ryan Macnak 452de7b098 [vm, isolate] Remove some large safepoint pauses from send-and-exit validation.
- WeakTable rehashing
 - worklist in the root set

Apply the pattern from object_graph_copy of maintaining the worklist as a heap object to avoid bloating the root set, and using a hash table that can safepoint in the middle of rehashing by not using address-based hash codes.

TEST=IsolateSendExitLatency
Change-Id: I2a632327102b0cc88ccdcffb024d813aa8e355f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372161
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-24 22:40:51 +00:00
Derek Xu 6209c47239 [VM/Debugger] Force valid breakpoints to resolve by ensuring functions are compiled
TEST=breakpoint tests in pkg/vm_service/test

Fixes: https://github.com/Dart-Code/Dart-Code/issues/4734
Issue: https://github.com/dart-lang/sdk/issues/55268
Change-Id: Ifb56ab9bbc062952d2b08b2feb4c7d7b87aa19f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338740
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-06-24 22:00:28 +00:00
Derek Xu 47b9e95ec7 [VM/Debugger] Prepare for Debugger::FindCompiledFunctions to return an ErrorPtr
In this CL, Debugger::FindCompiledFunctions always just returns
Error::null(), but when eager compilation of functions is implemented
(https://dart-review.googlesource.com/c/sdk/+/338740), it will introduce
the possibility of Debugger::FindCompiledFunctions truly returning
errors. So, this CL adds the error propagation logic in advance to
avoid making the eager function compilation CL too large.

TEST=this is effectively just a refactor, so CI

Change-Id: Ibedbebf19fed306c8b93c98ba71b7cc57b90e174
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369161
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-24 22:00:28 +00:00
Derek Xu 539d6b8665 [VM/Debugger] Delete Debugger::SetBreakpointAtLine
It is dead code. Breakpoint requests that only have a line number are just handled by passing column_number=-1 to SetBreakpointAtLineCol.

TEST=CI

Change-Id: I44fb9f805c364edb074bf9cdbd3fcbe3888b3bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369160
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-24 22:00:28 +00:00