Commit Graph

113698 Commits

Author SHA1 Message Date
Danny Tuppeny 8f30cb7e43 [analysis_server] Support prompting for name for "Add Import Prefix" refactor
If the client supports Interactive Forms, this will allow prompting for a name for the import prefix instead of using "prefix" (or "prefix1", etc.).

Includes moving some boilerplate out of each refactor into `ParameterizedRefactoringProducer` and support for a custom validation function for form fields (to validate the import prefix name in this case).

Change-Id: I7150664a18944c723eeeac0a309341af2860201f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-04 10:41:15 -07:00
Konstantin Shcheglov 43f3a50349 CQ. Replace _evaluateConstant() with _topLevelVar().
So that we don't have to repeat manually what already happens in
the element model.

Change-Id: I31cdfb98d316641496c017d7ac70e5be5d5d5853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509163
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-04 09:57:00 -07:00
Johnni Winther a90efd6794 [PrimaryConstructors] Add language test for issue 63506
This adds a regression test for issue 63506, testing that constant primary constructors with explicit super initializers compile correctly.

Change-Id: I4ca6e4115df41a343c0af289d1be04c9d96de9bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509280
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-04 09:52:40 -07:00
Konstantin Shcheglov f9f9023516 Augment. Report positional / optional / named formal parameters shape mismatch.
Change-Id: Ia218cc02024a0a12f35a9c8fdba8b1e65f691244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509161
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-04 08:50:36 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com 98e5936588 Roll gn from 3357c4f51b1a to 6f8c0328ee29
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: Ie945c8aeadd7c4375cdf05ab3ab76f1a497536bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508600
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-04 07:39:17 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com e79c0f1b83 Roll Fuchsia SDK from 32.20260526.7.1 to 32.20260601.5.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: I9da734dbed9c688be57064ab48f61cc7fe7ab4fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508261
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-04 07:21:08 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com 42878c2e21 Roll BoringSSL from f449f7206f62 to 047c29fe2c3e (28 revisions)
https://boringssl.googlesource.com/boringssl.git/+log/f449f7206f62..047c29fe2c3e

2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 11/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 10/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 8/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 7/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 6/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 5/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 4/N
2026-06-01 chlily@google.com Documentation: Change |...| to `...` for code references in comments 3/N
2026-06-01 rpolzer@google.com CI/CQ custom libc++: enable bounds checked containers.
2026-06-01 rpolzer@google.com CI/CQ custom libc++: enable unspecified sorting order randomization.
2026-06-01 rpolzer@google.com armv8 assembly: do not branch to global symbols.
2026-06-01 davidben@google.com Rewrite add_cert_dir's directory string parsing
2026-06-01 davidben@google.com Turn SSL_CTX into an opaque struct
2026-05-31 davidben@google.com Test that X509_LOOKUP_hash_dir ignores duplicates
2026-05-31 chlily@google.com Update style guide to change |...| to `...` for code in comments
2026-05-30 chlily@google.com Documentation: Change |...| to `...` for code references in comments 2/N
2026-05-30 chlily@google.com Documentation: Change |...| to `...` for code references in comments 1/N
2026-05-29 davidben@google.com Fix SSL_OP_LEGACY_SERVER_CONNECT with TLS 1.3
2026-05-28 davidben@google.com Add some tests for file and fd BIOs
2026-05-28 rpolzer@google.com Add the proper limit to PKCS5_PBKDF2_HMAC.
2026-05-28 rpolzer@google.com Fix limits for AES-GCM-SIV.
2026-05-28 rpolzer@google.com AES-CTR-HMAC: Apply the 64 GiB limit to open operations too.
2026-05-27 davidben@google.com Release name_list if SSL_set0_client_CAs does nothing
2026-05-27 davidben@google.com Fix OBJ_dup's handling of malloc failures
2026-05-27 davidben@google.com Restore the SSL_OP_LEGACY_SERVER_CONNECT option
2026-05-27 rpolzer@google.com CBB_cleanup: null out the buffer pointer if it was freed.
2026-05-27 rpolzer@google.com Fix uninitialized data read by AES-GCM-SIV assembly.
2026-05-27 rpolzer@google.com EVP_CTRL_GCM_IV_GEN: reject if the IV length is <8.

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: Ie5ccbd48411358c59f0894ca5cc2bc2ab4afb936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508204
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-06-04 07:14:46 -07:00
Danny Tuppeny f024b20e9a [analysis_server] Fix filters + resource type for Move to File in Interactive Forms
1. The `filters` field is specified/implemented as just file extensions, not patterns
2. We need `type: FileType.Regular` to stop you selecting directories as the target for the move

Change-Id: I39397ff844c91bbbfbbd8c070bc29ce2db371d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508921
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-04 06:54:49 -07:00
Alexander Markov 3060ea57d7 [modular_aot] Handle parallel moves when the same source location is used multiple times
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: Iffa54fdfd3b221ed5f25c49214aa920b2ae590ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509064
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-04 06:20:20 -07:00
Jens Johansen 0fcf5363b3 [analyzer] Avoid more _SlowSetRange
This CL updates 3 places where ints are added to a (growable)
`List<int>` just to be (slow) copied to an `Uint32List` or `Uint8List`.

Before:

```
    39,419,429,182      instructions:u
    39,419,418,402      instructions:u
    39,419,444,064      instructions:u
```

With changes to `pkg/analyzer/lib/src/fine/manifest_ast.dart`:

```
    39,400,298,496      instructions:u
    39,400,111,564      instructions:u
    39,400,122,931      instructions:u
```

+ changes to `pkg/analyzer/lib/src/summary2/informative_data.dart`:

```
    39,377,663,819      instructions:u
    39,377,615,760      instructions:u
    39,377,658,088      instructions:u
```

+ changes to `pkg/analyzer/lib/src/summary2/reference.dart`:

```
    39,354,886,990      instructions:u
    39,354,710,428      instructions:u
    39,354,958,987      instructions:u
```

Combined, 10 run benchmarks:

Normal GC:

```
page-faults:u: -0.3153% +/- 0.1113% (-598.70 +/- 211.30) (189905.10 -> 189306.40)
instructions:u: -0.3646% +/- 0.0032% (-208298550.90 +/- 1831771.41) (57125057089.00 -> 56916758538.10)
maxRssKbytes: 0.3099% +/- 0.0124% (1916.40 +/- 76.62) (618475.60 -> 620392.00)
maxRssBytes: 0.3099% +/- 0.0124% (1962393.60 +/- 78455.89) (633319014.40 -> 635281408.00)

Comparing GC data:
MarkSweep(   promotion) goes from 15 to 17
MarkSweep(   old space) goes from 1 to 0
Notice combined GC time goes from 3528 ms to 3552 ms (notice only 1 run each).
```

Disabled GC:

```
page-faults:u: -0.1178% +/- 0.0170% (-1398.70 +/- 201.62) (1187291.70 -> 1185893.00)
instructions:u: -0.1647% +/- 0.0015% (-64920618.80 +/- 609688.86) (39419968252.50 -> 39355047633.70)
branch-misses:u: 4.6312% +/- 4.5821% (5247477.70 +/- 5191850.50) (113307038.50 -> 118554516.20)
maxRssKbytes: -0.1211% +/- 0.0069% (-5769.20 +/- 331.11) (4765063.60 -> 4759294.40)
maxRssBytes: -0.1211% +/- 0.0069% (-5907660.80 +/- 339060.21) (4879425126.40 -> 4873517465.60)
```

Change-Id: I78d2f61d82a993b8d1d76ab5f13230d8b6507ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508564
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-04 03:28:19 -07:00
Jens Johansen 0c2d7decd7 [analyzer] Avoid _SlowSetRange in Scanner.tokenize
The analyzer makes a copy of `lineStarts` without the last element,
and copying it in to a `Uint16List` or an `Uint32List` depending on
what's needed (to avoid using more ram than necessary).

Because the (actual) scanner (`AbstractScanner`) does the same trick
with `Uint16List`/`Uint32List` the linestarts output from the scanner,
while a `List<int>`, is actually a `LineStarts` class, and copying that
into a `Uint16List` (or `Uint32List`) goes into
`_TypedIntListMixin._SlowSetRange` which as the name suggests is slower
than it has to be.

This CL puts the copying into the `LineStarts` class where it actually
has a `Uint16List`/`Uint32List` already, and doing the copy from that
instead avoids the slowdown.

Numbers from `perf stat`:

Before:

```
    39,552,191,101      instructions:u
    39,552,058,132      instructions:u
    39,552,065,649      instructions:u
```

After:

```
    39,419,426,977      instructions:u
    39,419,429,914      instructions:u
    39,419,441,613      instructions:u
```

Saving: about 132 million instructions.
Change-Id: Ibf6c7f6cc9324a54d2bd99c37058103af106164c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508580
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-04 00:07:49 -07:00
Brian Wilkerson 984ce37109 Fix convertToInitializingFormal to rename references to the parameter
The fix was previously missing logic for renaming references to the
parameter when the field name is private. This CL should fix that.

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

Change-Id: Ic4435414adbbf7a625b2c7c47e0a41136c4c58b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509160
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-03 21:10:21 -07:00
Ryan Macnak 9f9be9d3ea [dartfuzz] Fix flag_fuzzer_dart2js AOT steps.
Change-Id: I1f5834fcf16c1636949492d4d5e529daed68e9db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509100
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2026-06-03 20:14:54 -07:00
Srujan Gaddam 4ac9926090 Revert "Rev package:web to latest to include various helpers"
This reverts commit fc537d0b28.

Reason for revert: Duplicate event getters broke google3

Original change's description:
> Rev package:web to latest to include various helpers
>
> Change-Id: Ib139c65a0bec116a0ee9267598b43d835269adf4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508360
> Auto-Submit: Srujan Gaddam <srujzs@google.com>
> Commit-Queue: Kevin Moore <kevmoo@google.com>
> Reviewed-by: Kevin Moore <kevmoo@google.com>

Change-Id: I7e958dceb8250ed74bc7e581d5e6a71f9d035ed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509201
Reviewed-by: Kevin Moore <kevmoo@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2026-06-03 19:06:29 -07:00
Konstantin Shcheglov 9c69609406 Augment. Rename ExecutableFragmentImpl.isCompleteDeclaration to isComplete.
Change-Id: I47d70e93da6e16e4019d61cf62533aba7818b7c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509140
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-03 18:05:12 -07:00
Konstantin Shcheglov d54a54d976 Augment. Rename FragmentImpl.isCompleteDeclaration to isComplete, text only.
Change-Id: I12bbec91d0498ba4a2cc428e3a2321875fcdba5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509101
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-03 18:03:42 -07:00
Ryan Macnak 468092ff63 Add blank devtools builder configs.
Change-Id: I330a73ac3de9104563c9e19b656599e1a0250b26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509164
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-03 17:15:16 -07:00
Sam Rawlins 5a94256582 meta: Introduce TargetKind.importDirective
Fixes https://github.com/dart-lang/sdk/issues/63467

Change-Id: I02f048405878d9ca578f8cbea318c59697f2811b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-03 13:34:57 -07:00
Ryan Macnak ca02d3f1d6 [infra] Rebalance Linux ARM64 JIT versus AOT shards.
Change-Id: I4bba3ec82baade734b7c24d7234ffa5b2747796d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506503
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-06-03 13:08:46 -07:00
Ryan Macnak 40acd32778 [build] Remove unused "exec_script" mode from gn_run_binary.py.
Change-Id: Ie7d184dfe1694985fdff318736f34b45267a5bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509141
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-03 12:33:31 -07:00
Alexander Markov 42ebe08081 [modular_aot] Fix simplification of string interpolation
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I6404c761f9849a50ee25c0387557c20c7b4d632c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508700
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-03 12:12:19 -07:00
Alexander Markov 8b77454b37 [modular_aot] Fix LiveRange.findRegisterUseAfter
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I6a599d32001d6df31e61b8ea5c68569792cc82bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508704
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-06-03 12:10:01 -07:00
Alexander Markov 6b9aecbe5f [vm,aot] Fix parameter type checks in the implicit setters of covariant-by-class fields
Implicit setters of covariant fields (both covariant by declaration and
covariant by class aka generic-covariant-impl) need to perform a type
check of their argument.

It means that inferred type of the field cannot be used as inferred
type of parameter of such setter. This change removes such uses of
an inferred type of the field, which restores parameter type check
which was previously incorrectly optimized out.

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

Change-Id: Ie313dbaab51dff15d60ce4390e7e41bdc66ad59d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509020
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-03 11:32:28 -07:00
Alexander Markov 021068bb3d [modular_aot] Serialization of UndefinedConstant in module snapshots
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I94509fe61830174eecaec6ccfaeb13c6d20c4c27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508707
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-03 11:32:19 -07:00
Johnni Winther 4af16be8f0 [cfe] Add test for issue 63506
This adds a test for the problem reported in #63506. The problem has been fixed recently in https://dart-review.googlesource.com/c/sdk/+/507401

Closes #63506

Change-Id: I568ba16bc6ec62f3b45cd6742ef5f84c7066b230
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508920
Reviewed-by: Paul Berry <paulberry@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2026-06-03 11:17:48 -07:00
Konstantin Shcheglov 22f451c4ac CQ. Use assertDartObjectText() with raw multi-line string in more places.
Replace ad hoc assertions over DartObjectImpl with
assertDartObjectText() in constant evaluation and resolution tests. This
makes the expected constant value shape explicit, including invalid
results, variables, constructor invocations, type arguments, and
superclass fields, instead of checking only selected fields.

Use raw multi-line strings for these expectations so expected text can
be copied and maintained consistently without escaping interpolation or
other Dart string syntax.

Remove the now-unused null assertion helper and analyzer implementation
imports that were only needed by the direct assertions.

Change-Id: Ib734c1d428dd69104403484534b60af918944d13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508705
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-03 11:13:59 -07:00
Ryan Macnak 165dd4d04e Revert "[build] Use ad-hoc code signing by default."
This reverts commit 1d5057e94d.

Reason for revert: breaks sanitizer builds

Original change's description:
> [build] Use ad-hoc code signing by default.
>
> Change-Id: I00b483581a04bfb4a4ed0d6212c767d67c003f83
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508164
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

Change-Id: Iaa21b281ac56c7e6f1cd94c42602c6a17eb6a38b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509080
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
2026-06-03 10:27:18 -07:00
Konstantin Shcheglov f8ef9fdb61 Patterns. Fix for parsing nested pattern assigment: 'v2 = (v1) = 0'.
Change-Id: I4b3460dd57834eb52b4703c983ca6f8ed60fe270
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508684
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-03 08:52:55 -07:00
Danny Tuppeny f1ceed2ba7 [analysis_server] Add command/resolve to support using Interactive Forms in refactors
This adds support for the `command/resolve` request to support the new Interactive Forms functionality, and updates the refactor processes to use it instead of the original protocol when the client indicates support.

Currently only the "Move to File" refactor uses this functionality (matching the previous version) and it requires the `dart.experimentalInteractiveForms` setting be enabled for it to be used (in case we find bugs while developing the front-end that require incompatible changes).

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

Change-Id: I414a41fa2958ca9dcefe097f35ba28f3fa2fe367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508121
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-03 08:47:33 -07:00
Paul Berry 189f25b873 [front_end] Update CFE code generators to use new constructor decl syntax.
(Part of https://github.com/dart-lang/sdk/issues/63288)

This change makes the code generators in the front_end package emit
code that uses the new constructor declaration syntax, described in
https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md#abbreviations-of-in-body-constructor-declarations.

This avoids the need for `ignore_for_file:` comments and gives us a
bit more testing of the new feature.

Change-Id: Ica5c13018a286cd274dba2cf946304446a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-06-03 07:27:41 -07:00
Jens Johansen 7cc5515a6a [vm] Mark _OperatorEqualsAndHashCode._hashCode for inlining
In a valgrind "profile" of a run of an aot-compiled version of
`pkg/analyzer/tool/stable_analysis.dart` I noticed that
`_OperatorEqualsAndHashCode._hashCode` was called 40,288,281 times,
costing - by itself, i.e. without the actual cost of getting the
underlying hashCode - 723,483,274 instructions - about 1.79% of the
total cost.

Interestingly `_OperatorEqualsAndHashCode._equals` wasn't there, so that
one must be inlined (whereas the `_hashCode` isn't). Stepping via GDB
confirms both things.

Via the inlining tracing in the vm via

```
out/ReleaseX64/dart-sdk/bin/dart \
compile aot-snapshot --verbose \
--extra-gen-snapshot-options="--print_inlining_tree" \
pkg/analyzer/tool/stable_analysis.dart
```

I found

```
Inlining into: 'dart:_compact_hash___Map&_LinkedHashBase&MapMixin&_HashBase&_OperatorEqualsAndHashCode&_LinkedHashMapMixin@3099033_[]='
    growth: 0.000000 (9 -> 0)
  NO 14 __Map&_LinkedHashBase&MapMixin&_HashBase&_OperatorEqualsAndHashCode@3099033._hashCode@3099033 - Heuristic fail (no small leaf)
  NO 16 __Map&_LinkedHashBase&MapMixin&_HashBase&_OperatorEqualsAndHashCode&_LinkedHashMapMixin@3099033._set@3099033 - Not inlinable
```

In `runtime/vm/compiler/backend/inliner.cc` I saw that I could avoid
this "no small leaf" thing by marking it for inlining.

Running stable_analysis through `perf stat` without and with this CL I
get:

```
Without CL:
    39,552,232,456      instructions:u
    39,552,392,619      instructions:u
    39,554,905,123      instructions:u
```

```
With this CL:
    39,024,836,004      instructions:u
    39,022,158,372      instructions:u
    39,022,782,198      instructions:u
```

So this "only" saves something like 527 million instructions (~1.3%),
i.e. less than the ~723 million instructions hoped for, but I'll take
it.

Change-Id: I07a8fb097e46ab48c26bcf7896b12c7312ededc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509000
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-06-03 07:11:18 -07:00
Nourhan Hasan 80f770eb57 [vm/service]: Add _readNativeMemory RPC and OS::SafeReadMemory for safe native memory inspection
- Declare OS::SafeReadMemory in os.h
- Implement using pread64(/proc/self/mem) on Linux and Android
- Add _readNativeMemory VM Service RPC with pre-checks for null
  and address overflow

TEST=runtime/vm/service_test.cc

Cq-Include-Trybots: dart/try:vm-asan-linux-release-x64-try,vm-asan-mac-release-arm64-try,vm-asan-win-release-x64-try,vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-linux-debug-arm64-try,vm-linux-debug-ia32-try,vm-linux-debug-simriscv32-try,vm-linux-debug-simriscv64-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-release-simarm-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-tsan-linux-release-x64-try,vm-tsan-mac-release-arm64-try,vm-ubsan-linux-release-x64-try,vm-ubsan-mac-release-arm64-try,vm-ubsan-win-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try
Change-Id: Id15a82bf478bc4822c08d7fdf0a5c8bfd71a1fe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505781
Auto-Submit: Nourhan Hasan <nourhan.m.hasan@gmail.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2026-06-02 23:09:24 -07:00
Ryan Macnak 1b3e9d510e Fix Fuchsia build.
Don't need to maintain testonly for the main Fuchsia tree anymore.

TEST=gn
Change-Id: I99c513dac5aa09ef47a6b6666c934ad63fe4a874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508823
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-06-02 16:47:34 -07:00
Ryan Macnak 152d83492f Reduce GCC build set.
runtime is not a proper subset of create_sdk.

Change-Id: Ieb393029481475e866daf4eb2aa3280045c17d3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508703
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-02 16:32:29 -07:00
Srujan Gaddam dd60262f06 [DEPS] Update Chrome and jsshell
Change-Id: Ie72b337bb0896ebe73a9520e40b90401da235108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508820
Reviewed-by: Nate Biggs <natebiggs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-06-02 15:38:03 -07:00
Sam Rawlins 23ad0dc770 linter: Deprecate avoid_public_typedef_functions and one_member_abstracts
Work towards https://github.com/dart-lang/sdk/issues/59524

* avoid_private_typedef_functions - Doesn’t meet any sufficient
  criteria? I think a private typedef can certainly make local code
  more readable.
* one_member_abstracts - Low impact. This is maybe here for Java
  developers? It encourages users to use top-level functions.

Change-Id: I829acda8af0bc2bb265553e1297cd1740761b4da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-02 15:08:43 -07:00
FMorschel ab017d3bda [linter, DAS] Adds new diagnostic opposite of unnecessary_await_in_return
Bug: https://github.com/dart-lang/sdk/issues/62555
Change-Id: Ica84ea93efcb2c74d2fd260cdceebbf6558e7bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477660
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: FMorschel <git@fmorschel.dev>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-02 15:06:00 -07:00
Ryan Macnak 0ae45fcc7e Reduce Android build set.
Change-Id: I810fd52726eb177e91b1425644373e52c4d871c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508500
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-02 14:46:08 -07:00
Paul Berry 95b1b8d756 [front_end] Migrate to new constructor decl syntax.
(Part of https://github.com/dart-lang/sdk/issues/63288)

This change migrates the front_end package to use the new
constructor declaration syntax, described in
https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md#abbreviations-of-in-body-constructor-declarations.

This change was performed in an automated fashion, by (a) enabling the
lints `unnecessary_type_name_in_constructor` and
`unnecessary_const_in_enum_constructor`, (b) fixing the resulting lint
failures using `dart fix`, and then (c) reformatting the affected
files.

To ease code review, I've reverted unrelated formatting changes.

Change-Id: I6b48c0f1c762c3fa132fbd79382496ca6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508368
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-06-02 13:34:17 -07:00
Ben Konyi 0e535e710b [vm_service] Fix socket exhaustion in resume_shutdown_race_test
The resumer in `resume_shutdown_race_test.dart` was running in a tight
`do-while` loop, hammering the VM server with `getVM` and `getIsolate`
requests to check if all isolates are paused at exit. During VM
shutdown, this rapid sequence of requests could cause socket exhaustion,
especially on Windows, or trigger transient connection errors.

This is fixed by adding a 10ms delay using `Future.delayed` at the end
of each iteration, and wrapping the loop's HTTP request block in a
`try-catch` block to gracefully log and ignore transient connection or
request errors during VM shutdown.

Change-Id: I1bfcad7505254a1feb59dfb654421547efc02d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508720
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2026-06-02 13:22:38 -07:00
Martin Kustermann 3f7dd5c075 [dart2wasm] Do not use CFE lowering for constructor tear-offs
The CFE constructor tear-off lowerings introduce extra static methods.
Tear-off constants refer to them as `StaticTearOffConstant`s. They
just forward the call to the actual generative, factory or
redirecting factory constructors.

We can avoid these intermediary methods by not using the CFE lowerings.

Change-Id: I1dc1203d6b3023cf1f13bc204a2628ec8a3aebc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508562
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-06-02 13:21:23 -07:00
Brian Wilkerson a75be76daf Fix bug in convertIntoBlockBody
I ran across this bug while testing to see what work was already done.
I didn't take the time to create an issue.

The bug is that an assist was being offered for `class C ^{}` to
convert the class body into a block. The result, for an empty block,
was just to add an extra space before the block body. For a non-empty
block, the result was to delete everything inside the block.

Change-Id: I0342b681ef67b5e659a00126a998d63d593223fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508702
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-02 13:04:55 -07:00
Ben Konyi 3c0e8ac2fb [vm_service] Fix http_auth_get_isolate_rpc_test not actually testing with authentication codes
When `useAuthToken` is true, the VM Service URI includes the
authentication token as a path segment (e.g.,
`ws://127.0.0.1:8181/auth_token/ws`). Previously,
`http_get_isolate_rpc_common.dart` converted `service.wsUri` to an HTTP
`serverUri` by only copying the host and authority, stripping out the
auth token path segments. This caused all subsequent HTTP request
helpers to fail with a missing or invalid authentication code error.

This is resolved by:
1. Enabling `useAuthToken: true` in `http_auth_get_isolate_rpc_test.dart`.
2. Updating
`http_get_isolate_rpc_common.dart` to extract and preserve the path
   segments from `service.wsUri` (excluding the trailing `'ws'` segment) and
   ensuring a trailing empty segment so that `buildRequestUri` correctly
   formats the final HTTP request path.

Change-Id: I773d402af05c451d2ed776a9660c0bc04f4c672c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508381
Commit-Queue: Mark Zhou <markzipan@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2026-06-02 12:51:23 -07:00
Ben Konyi ab6780d13e [dds][dart_runtime_service] Dynamically allocate ChromeDriver ports and fix SSE test flakiness
This change addresses flakiness in SSE tests caused by port conflicts
and race conditions during connection teardown.

Key changes:
- Dynamically allocates ChromeDriver ports in `sse_smoke_test.dart` and `sse_client_test.dart` instead of using a hardcoded port (4444). This avoids conflicts when tests run in parallel on CI bots.
- Adds support for locating ChromeDriver via the `CHROMEDRIVER_PATH` environment variable in both test suites.
- Updates `sse_smoke_driver.dart` to introduce a brief delay before closing connections. This ensures the client-side SseClient has sufficient time to flush its final POST request to the server, avoiding "Bad state: No element" errors.
- Modifies `test_helper.dart` to filter out `--mark_main_isolate_as_system_isolate` from arguments forwarded to spawned testee processes. This is necessary under modern `dart test` runners to ensure processes pause at start as expected.

Change-Id: Idf45cd69f366ec6b6f81cfed955aea337b277dcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508343
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2026-06-02 12:46:31 -07:00
Konstantin Shcheglov d8fab3228b Augment. Support for function-typed formal parameters in augmentations.
Change-Id: I665810aaeeb96dceb0045c98d426493a0fc75892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507960
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 12:24:36 -07:00
Ben Konyi 2b4ba49f0d [vm_service] Fix socket leak in makeHttpServiceRequest
In `http_request_helpers.dart`, `makeHttpServiceRequest` was not closing
the created `HttpClient` instance if an exception was thrown during the
HTTP request, response parsing, or JSON decoding. This could cause
socket leaks in tests that invoke this helper.

This is resolved by wrapping the HTTP request, response, and parsing
logic inside a `try-finally` block, ensuring that `httpClient.close()`
is always executed.

Change-Id: I40d5fb8d2c2cd9c16d83418e71a7dc0d67ef2cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508740
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2026-06-02 12:23:10 -07:00
Konstantin Shcheglov 73d499369a Augment. Report defaultValueAlreadySpecifiedInAugmentationChain.
Change-Id: I0e12de28aea3f767bcd6e5f36a61c544c69e102b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-02 12:12:20 -07:00
Konstantin Shcheglov 54ea451b36 CQ. Migrate more tests from parseStringWithErrors() to parseTestCodeWithDiagnostics().
Change-Id: Ifa7b7302fb6c059cf628f06d519f8391b510427c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508370
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 12:08:10 -07:00
Konstantin Shcheglov 33d4f1dff7 CQ. Migrate ToSourceVisitorTest from parseStringWithErrors() to parseTestCodeWithDiagnostics()
Change-Id: I902b4162f68acb2c220a2ee8c4ab8bcc47e3a3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508423
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 12:03:14 -07:00
Konstantin Shcheglov 68b3e3c9a0 Augment. Remove a few 'abstract' modifiers from classes.
These were previously added because the parser did not support
abstract fields without diagnostics, IIRC.

Change-Id: Iba654bbfba3828e9823a65cc2b28f11a9ae0144a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 11:58:59 -07:00