Commit Graph

113203 Commits

Author SHA1 Message Date
dart-autoroll@skia-public.iam.gserviceaccount.com eba959d86e Roll Fuchsia SDK from 32.20260508.4.1 to 32.20260513.2.1
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-sdk-dart-sdk
Please CC fuchsia-3p-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia SDK: https://bugs.fuchsia.dev/p/fuchsia/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:vm-fuchsia-release-x64-try;luci.dart.try:vm-fuchsia-release-arm64-try
Change-Id: I26afd0e03689aed82468a66cd94093c1b763fe22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503300
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-05-14 09:54:16 -07:00
Danny Tuppeny ef731d75e5 [analysis_server] Fix Go-to-Definition on extension overrides
Fixes https://github.com/Dart-Code/Dart-Code/issues/6043

Change-Id: I09c54fb6679c49b73f82ac017a19dd2b2ead280e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2026-05-14 09:47:39 -07:00
Konstantin Shcheglov 5723f42f69 CQ. Trim diagnostic messages in expectations.
See
https://dart-review.googlesource.com/c/sdk/+/501764/comment/6a88eca8_ab5cf6e4/

Change-Id: Ic7752669660b88003460167f9d9e3926e0d19c3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503541
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-14 09:40:43 -07:00
Sam Rawlins 54d25a757e DAS plugins: Add missing changelog entry for 0.3.15
Change-Id: Ic77b945edbf640528467ab3e3e7e5d5f905f97f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503581
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2026-05-14 09:39:36 -07:00
Brian Wilkerson 17a1b99991 Remove example/all.yaml from the linter package
This file is no longer published and has no other value. Removing it
removes one step from the process of writing a new lint, which improves
our velocity.

Change-Id: Ie81b914bfa59aa8ec2c8fb2921eec2e9963bd601
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503620
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2026-05-14 09:06:16 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com 4c2c3bc6c6 Roll BoringSSL from 9730fe2168ce to d03dbc3e5d7d (12 revisions)
https://boringssl.googlesource.com/boringssl.git/+log/9730fe2168ce..d03dbc3e5d7d

2026-05-12 jbuckland@google.com Introduce SSL_get_signature_algorithm_used.
2026-05-12 rpolzer@google.com TRUST_TOKEN: remove metadata_key.
2026-05-12 hchao@chromium.org Server Padding Extension
2026-05-12 davidben@google.com Add a document explaining what a "named group" is
2026-05-12 davidben@google.com Add SSL_CTX_set1_available_trust_anchors
2026-05-11 davidben@google.com Fix sectioning in ssl.h
2026-05-11 davidben@google.com Fix typo in benchmark name
2026-05-11 davidben@google.com Fixup some minor issues in HPKE P-256 key derivation
2026-05-11 davidben@google.com Tidy up poly1305 alignment a bit
2026-05-11 davidben@google.com Stop manually encoding various x86 extensions from perlasm
2026-05-11 davidben@google.com Clear r->neg in bn_abs_sub_consttime
2026-05-11 rpolzer@google.com Fork detection test: align the stack to 16 bytes.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/boringssl-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@rotations.google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in BoringSSL: https://crbug.com/boringssl/new
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

Tbr: dart-vm-gardener@rotations.google.com
Change-Id: I448a0e80491cf7c03145de40ebe1d46ec852921e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503180
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-05-14 08:51:30 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com 119b6853b3 Roll gn from 78e67afc82fa to 068dd892acb2
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-engprod@google.com,dart-vm-gardener@rotations.google.com,dart-vm-team@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-linux-arm64-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: I3666c8515b37c13a8ebe6b98413e8d68b9a18fd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502640
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2026-05-14 07:49:22 -07:00
Daco Harkes 56ce30612d [deps] Roll dart-lang/native
Change-Id: Ifb68db76a1ddc6447a4b431c1e8dbd880e84cae8
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503421
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2026-05-13 17:16:16 -07:00
Sigmund Cherem 53219f95e6 [dyn_modules] end-to-end test for dynamic calls.
This change introduces the dynamic_call test in pkg/dynamic_modules.

TEST=pkg/dynamic_modules/test/data/dynamic_call
Change-Id: I2425fd7925b2d7e66f919ceaaa102f4950e3a712
Bug: b/448095881
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498301
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-05-13 15:47:09 -07:00
Danny Tuppeny 4afd2e10be [analysis_server] Normalize URIs before normalizing paths in the session log
The session log normalizer replaces known paths/URIs in JSON but doesn't take into account different URI encoding between the client and the server. For example VS Code will encode ampersands whereas Dart does not:

```
file:///c:/uri&encoding&quirks
file:///c:/uri%26encoding%26quirks
```

This means not all file URIs are correctly normalized.

Adding additional groups for each potentially-encoded characters make the regex many times slower (the benchmark test here goes from around 25ms to over 1s per iteration), so instead this change has the normalizer accept the original JSON map and uses jsonEncode()s `toEncodable` option to normalize any URIs (by converting them to their file paths and then encoding using Dart's Uri class) so they will always be consistent before the replacement.

(I tried doing the replacement also in `toEncodable`, but invoking the regex many times also slowed things down a lot).

There is a small time increase (2-3ms) for a payload of 2MB. The "before" times quoted here are slightly higher than previously quoted, but that's because `jsonEncode()` was previously done inside `SessionLoggerFileSink` (and therefore excluded from the timings before), but is now done inside the normalizer to allow normalizing the URI escaping.

Replacing 250 paths in payload of 2097152 bytes
Iteration #1, First: 57ms, Rest: 40ms
Iteration #2, First: 49ms, Rest: 41ms
Iteration #3, First: 45ms, Rest: 41ms
Iteration #4, First: 47ms, Rest: 40ms
Iteration #5, First: 40ms, Rest: 40ms

Replacing 250 paths in payload of 2097152 bytes
Iteration #1, First: 59ms, Rest: 43ms
Iteration #2, First: 53ms, Rest: 44ms
Iteration #3, First: 52ms, Rest: 44ms
Iteration #4, First: 49ms, Rest: 43ms
Iteration #5, First: 49ms, Rest: 43ms

Fixes https://github.com/dart-lang/sdk/issues/63331

Change-Id: Ice2dc7ceceaa6c08e2ff634d7564efe9f0f7de44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502940
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2026-05-13 14:02:03 -07:00
James Robinson b5a613c378 [fuchsia] Use zx_port_cancel_key in Fuchsia event handling logic
This updates the IOHandle type in eventhandler_fuchsia to use
zx_port_cancel_key to cancel outstanding asynchronous waits instead of
the (older) zx_port_cancel. The cancel_key operation requires only the
key used to register the initial wait and not the originating handle.
This means that the IOHandle operation no longer has to store the
original handle or worry about its lifetime.

Tested: Patched locally in a test embedder using this logic
Change-Id: Iec0ec632a7dd438a34e482a12b5b298be56ce476
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501840
Reviewed-by: Zijie He <zijiehe@google.com>
Auto-Submit: James Robinson <jamesr@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-13 12:47:06 -07:00
Konstantin Shcheglov 426137ba6a CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. UVWY.
Change-Id: I6d64591613d6755f5a37c303e794985688888ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503440
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-13 12:01:16 -07:00
Eric Seidel a6a403c0b9 [vm, simarm64] Extract CalleeRegisterVerifier class
Closes https://github.com/dart-lang/sdk/pull/63012

GitOrigin-RevId: 56b29e0480f66e41ddd15e24249a5be75aed13ca
Change-Id: I55ed703a366aefd3b273acd74a6c99c91ed38759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491682
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-13 11:42:35 -07:00
Sigmund Cherem d65783ef59 [dyn modules] add runtime flag for checking under JIT
At this time, this flag is mainly going to be used to enable partial
testing of the JIT runtime when loading applications from kernel
snapshots.

Bug: b/448095881

TEST=none yet, will be added in upcoming CL
Change-Id: I272d43cdab0c9a9c3653cccc9e96961c1122bbd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503460
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2026-05-13 11:42:30 -07:00
Konstantin Shcheglov 2c5f7e1ab0 Augment. Don't report an error in the parser when a factory constructor has no body.
Change-Id: Ia6df688d4c13bb1ef8b73a0bf810857a1f0fe5b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-13 11:15:09 -07:00
Sigmund Cherem 782c4555b4 [dyn_modules] Expose flag in dart2bytecode to enable dcalls
This change introduces flags to allow the use of dynamic calls now that
they have their corresponding validation and runtime check. This will
enable us to add end-to-end tests next.

TEST=none yet - will be added in subsequent CL (see CL chain)

Bug: b/448095881
Change-Id: I82448824e94dd940ce5346f79554d34847ecb610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498320
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2026-05-13 10:36:05 -07:00
Konstantin Shcheglov a2be5f37b9 CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. I.
Change-Id: I47dd3fb3f6126047c4f5bec5a84be64cdbbf7261
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-05-13 09:56:26 -07:00
Konstantin Shcheglov 1c58533fae CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. RST.
Change-Id: I5a8ad5b98e5a6c73b2ee4a0d51a9b51e875f47e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503280
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-13 09:49:03 -07:00
Konstantin Shcheglov a33c0ccf84 Augment. Report constructorAlreadyComplete and functionAlreadyComplete.
Change-Id: I020a1c244b1ba31e040806103ccd83e0da851263
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502185
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-13 09:48:20 -07:00
Sigmund Cherem cca6298498 [dyn_modules] Check target of dcall from dynamic modules is valid.
Unlike other calls from Dynamic Modules, dynamic calls cannot be
validated entirely at compile time. While we check that the selector
used matches a selector that was allowed (either because a method with
that selector name was exposed as dynamically callable or because the
selector was allowlisted during bytecode compilation), the compiler
doesn't know statically whether the target of the call is exposed.

In prior changes we modified the annotator to add a pragma indicating
whether a member is dynamically-callable or
implicitly-dynamically-callable. Here we use that information to set a
bit on functions and their corresponding dynamic invocation forwarders,
which is verified by the interpreter to make sure the dynamic call is
still allowed.

TEST=none yet - will be added in subsequent CL (see CL chain)

Bug: b/448095881
Change-Id: I27acb4e690a68e08fe1f1ca94e0d77cc7dc4d11e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498300
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2026-05-13 09:40:57 -07:00
Ben Konyi 51050481c9 [Service] Support isolate/root in package:dart_runtime_service
Adds isSystemIsolate in the isolate startup message sent to the
VM service, allowing for the service to identify the first non-system
isolate as the root isolate.

TEST=Existing tests

CoreLibraryReviewExempt: dart:vmservice is internal.
Change-Id: I0a982a1fc06bd0be0426ad9d1401e89375cbed40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500000
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jessy Yameogo <yjessy@google.com>
2026-05-13 09:40:15 -07:00
Vedant Sachin Malode effea771bc [analyzer] Fix cache size counter drift in EvictingFileByteStore._cleanUpFolder
Closes https://github.com/dart-lang/sdk/pull/63127

GitOrigin-RevId: 1fbf85ae3fb5be08a6caa872e75e74aadb777a86
Change-Id: Ieffaeaa59cd5e69d2d5aca2b9616b454dcce5c59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494021
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-05-13 09:27:53 -07:00
Konstantin Shcheglov 8e49049836 CQ. Convert file paths in expected diagnostics to POSIX.
Change-Id: Ie11519f8e62448b630ddf9a265fa601ecd988216
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503122
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-05-13 09:24:01 -07:00
Sam Rawlins 61891e2667 linter: Simplify code that uses the "write or read element"
Change-Id: I565ce698939c34be0c32dbc0c0204dd6b962fe1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503141
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-05-13 09:08:03 -07:00
Konstantin Shcheglov bfca71d6d6 CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. LMNOP.
Change-Id: I4baefc8a58f94fde52bde498307a55ffa71527b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503160
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-05-13 09:07:50 -07:00
kevmoo b1fbe470a1 api_summary: marking the test as slow
Change-Id: Icfcfda87008d6db9b0ed08da950919bd2ee9c2f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503140
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2026-05-13 08:57:22 -07:00
Konstantin Shcheglov 7e42e611b7 Augment. Pre-fix functionAlreadyComplete in AugmentationReturnTypeMismatchTest.
Change-Id: I69c9f1aa31ea3cba283fef1a194a51aaa46576a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503121
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-13 08:48:54 -07:00
Sam Rawlins 6fdfcc7ed4 DAS: Use correct nullability in add_return_type
Fixes https://github.com/dart-lang/sdk/issues/54865

The nullability of return types of async and generator functions is not
based on the nullability of the returned or yielded values.

Change-Id: Ieae534dbf64135129b9891b7db047f5617401021
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501121
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-05-13 08:35:17 -07:00
Sam Rawlins 57da93ad4f linter: collection_methods_unrelated_type: Null not related to non-nullable
Fixes https://github.com/dart-lang/sdk/issues/57101

This change affects collection_methods_unrelated_type and
unrelated_type_equality_checks. For example these are now reported:

```dart
void f(Set<String> p1, int p2) {
  p1.contains(null);
  p2 == null;
}
```

Change-Id: Ib58bad2beb6b9df8fe7c71f27213055e9b8d5cb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-13 07:03:42 -07:00
Alexander Markov e09282c8f2 [modular_aot] Closures, part 2
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: Id8029dddd75b5f771ddf8197190d18aea9efd192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503080
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-05-13 05:58:22 -07:00
Johnni Winther 433ee9bb92 [cfe][InternalNodes] Sort members in internal/external_ast_helper
Change-Id: I43151f2ec03298059ce7ffc7f034173c9f0a582c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503320
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-05-13 04:21:17 -07:00
peeefour 1d80afe498 [vm/io] Range check Socket_SendMessage arguments
Closes https://github.com/dart-lang/sdk/pull/63365

GitOrigin-RevId: 344604dd1a17b73c6665026e7e75693fe0fa7ca7
Change-Id: I8f51d5735a56564f2181bcd1206c9cfdff80f077
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502960
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-05-13 03:40:04 -07:00
Johnni Winther 119d9d72b7 [cfe][InternalNodes] Use internal/external helpers to create AST nodes
This replaces the creation of many AST nodes with calls to either the internal or external helpers, to help enforce passing of needed arguments, in particular file offset which are generally not required.

Change-Id: Id9b2449f398492dd5fb8bf0c71fbe3ec04444c95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497842
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-05-13 02:11:33 -07:00
Chloe Stefantsova 999f8d4ff6 [cfe] Make Scope and VariableContext data objects, not TreeNodes
Part of https://github.com/dart-lang/sdk/issues/61572

Change-Id: Ie4f244433c320c3a72e8769034526e438dc6406c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502682
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2026-05-13 01:40:28 -07:00
Martin Kustermann 147ed24717 [dart2wasm] Explicitly model functions that do not return
Similar to [0] which recognizes functions that return always nulls, we
recognize functions that never return and

* make the wasm function have no outputs
* make call sites emit `unreachable()` after the call (to inform
  binaryen & wasm runtime that this is unreachable)

Before we had an artificial construct where we made such functions
have a `w.RefType(HeapType.none, nullable: false)` return type (i.e.
bottom, i.e. no values) and encoded that way it's unreachable.

We also change some exported wasm functions to explicitly use wasm
types in the signature (namely `WasmVoid` instead of Dart `void`).

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

Change-Id: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499240
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2026-05-13 00:23:45 -07:00
Martin Kustermann d0e0290702 [dart2wasm] Remove synthesizing values from nothing
When there's no expression on the stack but we expect something on the
stack, then the code should be unreachable.

Though the current code would just synthesize a value that matches
the expected type (`convertType(voidMarker, <some type>)`). This
is problematic: If we ever used that synthesized value we may
have incorrect program behavior.

Now there were some valid uses where we synthesize values

* A function that has `void` return type but no explicit return
  => Here we should synthesize `null`
* Synthesize `null` in cases where we know it's not going to be used
  => e.g. for CFE desugaring of `a[i] = b` is roughly
     `let tmp = b in (let ignored = a.[]=(tmp) in b)`
     where we synthesize `null` as `a.[]=(tmp)` result,
     `ignored` isn't used.
* ...

With this CL we no longer allow synthesizing a value of a type
out of thin air, instead all the places where this occurs have
to do that explicitly.

There's some impurities around how setters and index setters
are handled today (and even after this CL). Those impurities
start all the way at CFE, which treats setters and index
setters very differently. See the CFE issue [0].

For those we have two choices:

* special case all call sites that require synthesizing
  null values
* special case all call sites that require dropping an
  auto synthesized null value

This CL now marks instance setter/index-setter methods as
requiring auto-synthesizeing null values on usage sites and
make code that doesn't need them explicitly drop them.

Somewhat related to this change is how we deal with `void`
on the Dart <-> Wasm Import / Wasm Export boundary: When we
call an imported wasm function that has `void` as return
type (meaning no return values) we have to synthesize a `null`
(as the caller may "use"/"observe" the `void`).

=> We now are more strict and instead use `WasmVoid` as type
   instead of allowing `void` as type on the import/export
   functions.

[0] https://github.com/dart-lang/sdk/issues/63360

Change-Id: Ie30df3bd68553724437607bab3163c98f5467efe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501061
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-05-13 00:22:52 -07:00
Erik Ernst 96a4dd4c19 Modify property promotion: only this
https://dart-review.googlesource.com/c/sdk/+/498840 added support for
promotion of properties (private, final instance variables with a name
which isn't used much for other purposes) in the context of anonymous
methods.

This CL reduces the set of situations where this feature is enabled such
that only `this` will allow property promotions to be carried in (such
that `this._x` is promoted in `v.=> this._x` when `v` is such that
`v._x` has been promoted before the anonymous method occurs). It also
generalizes the mechanism such that property promotions are carried out
(so we can do `if (v.=> _x is int) v._x.isEven;`).

Tests has been adjusted accordingly.

Change-Id: Ibe70713d3d9c89a6d95f9c3dd28df8f147cb518d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502660
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2026-05-13 00:08:24 -07:00
Konstantin Shcheglov 3f66adee09 CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. DEFG.
Change-Id: Ic3af506661e6a67a43a6a9046fb3bddeb268c0a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502540
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
2026-05-12 19:52:21 -07:00
Sam Rawlins 5b07d332e7 analyzer: Move errorRange utilities to public API
Change-Id: Idb886a2e4b333fb1a75195da3072cba91e53ebfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483360
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-12 19:44:27 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com 1c947dd88a Roll Fuchsia SDK from 32.20260507.5.1 to 32.20260508.4.1
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-sdk-dart-sdk
Please CC fuchsia-3p-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia SDK: https://bugs.fuchsia.dev/p/fuchsia/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:vm-fuchsia-release-x64-try;luci.dart.try:vm-fuchsia-release-arm64-try
Change-Id: I1648856dfd19dbfcb713a68d7070d62ddb9b6fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502140
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2026-05-12 18:43:03 -07:00
Konstantin Shcheglov f171b1d725 CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. C.
Change-Id: I73cdfaf2e7d1ad17b386d851a058f31d42815077
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502520
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-12 18:07:20 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com f47cbc83c5 Roll BoringSSL from d589045a7726 to 9730fe2168ce (1 revision)
https://boringssl.googlesource.com/boringssl.git/+log/d589045a7726..9730fe2168ce

2026-05-11 rpolzer@google.com Disable fork detection test on qemu.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/boringssl-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@rotations.google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in BoringSSL: https://crbug.com/boringssl/new
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

Tbr: dart-vm-gardener@rotations.google.com
Change-Id: I1f54698529980d638ee2ebf3583c03698fbc5b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502561
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-12 17:55:23 -07:00
Srujan Gaddam 79b5214eca Update Chrome to v149
Change-Id: I9b31c6f0342d6ab6f6a35d8b5e2dfffc9c3505d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503123
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2026-05-12 16:29:43 -07:00
Sam Rawlins 9b1e09357b linter: Use an extension type's representation type when calculating unrelated types
Fixes https://github.com/dart-lang/sdk/issues/58838
Fixes https://github.com/dart-lang/sdk/issues/59373
Fixes https://github.com/dart-lang/sdk/issues/59299

The change is based entirely on runtime behavior. We just use the
"extension type erasure." So two instances of two extension types are
related if the representation types of those extension types are
related.

Change-Id: I3c40e072433608146f00194359c3c312b319c913
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-12 14:27:55 -07:00
Konstantin Shcheglov 245105300c CQ. Migrate diagnostics tests to resolveTestCodeWithDiagnostics. A-B.
Change-Id: I260150562d253f480f70f04b7038fc7bcdadca26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501764
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-12 13:16:41 -07:00
Nate Biggs 63d042fe0d [dart2wasm] Fix dynamic dispatch table population for multiple modules.
When deferred loading was enabled the dynamic dispatch class ID table
was incorrectly assigning class IDs to the wrong module. If a contiguous
target segment included classes/targets from different modules, all of
them were getting assigned to the module of the first class/target in
that segment.

This was causing spurious NSM exceptions as the necessary rows in the
table might not be populated for a dynamic call if the module the
segment was assigned to wasn't loaded yet.

To fix this we end the segment if the next target does not belong to the
same module as the active segment.

The new test fails with an NSM exception prior to this fix.

Change-Id: I07bc4fdb5a8bff1bfad5fe17f45c8076a965a775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502860
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-05-12 12:54:38 -07:00
Helin Shiah 405b6c5614 Send IDE and plugin info to analytics
Bug: https://github.com/dart-lang/sdk/issues/62996
Change-Id: Id2bd122acf4a40a01a7dc760e44f164b04f204ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497123
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-05-12 12:39:44 -07:00
Danny Tuppeny 26c646642d [analysis_server] Add kinds to LSP document highlights
Populates the `kind` on the Document Highlights we return. This allows colouring reads and writes differently (which it turns out VS Code does by default).

The options are a bit limited (Read/Write/Text) and using Read/Write for things like type names feels slightly odd, but the spec does seem to encourage this and it's what TypeScript is doing.

Fixes https://github.com/dart-lang/sdk/issues/62929

Change-Id: I6a53450038cde31b399b5b1aca5f964083106763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503060
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-05-12 12:04:29 -07:00
Konstantin Shcheglov cddfbfb7e3 BL-co19. Don't report nonFinalFieldInEnum for external fields.
External fields don't have storage.

Now pass:
co19/LanguageFeatures/Enhanced-Enum/grammar_A07_t01

Change-Id: Ia4dd616dd211be6c05b93f174785cb2b30644a72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502420
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-12 11:57:29 -07:00
Brian Wilkerson 2b1ed6614e Add a fix for use_declaring_parameters
This is another step toward being able to maximally convert a body of
code to using the primary_constructors features.

This CL does two things:

- Changes `convert_to_declaring_parameter` to also be a fix and applies
  that fix to the `use_declaring_parameters` lint.

- Updated the `use_declaring_parameters` lint to also flag field formal
  parameters.

Change-Id: I8b584186658abc73c025b166c145efbab95acd8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502740
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-05-12 11:56:25 -07:00