Commit Graph

113622 Commits

Author SHA1 Message Date
Alexander Markov ea1360fbaf [modular_aot] Fixes for code generation of TypeCast
* Use exact code pattern for calling TTS which is expected by
  the VM at runtime.
* Always set instantiator/function type arguments registers for TTS.
* List all registers potentially clobbered by TTS.

Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I011bcfc8b755864271877cc36d365ba2b5f10648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509480
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-08 07:17:10 -07:00
Johnni Winther 19db32f041 [cfe][InternalNodes] Add InternalCatch
This is a step towards separating Variable from InternalVariable.

Change-Id: I5941148e55ae7105a5798df557db512fce3d8255
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509941
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-06-08 05:45:44 -07:00
Johnni Winther 8492bfd7ac [cfe][InternalNodes] Use InternalPattern in PatternForInElement
This changes PatternForInElement to use InternalPattern. With this change InternalPattern is now detached from Pattern and used exclusively as the input to inference.

Change-Id: I62e4255a0f981784fef07ac91f283161f02e3d31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509940
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-06-08 05:45:44 -07:00
Parker Lougheed 95b8f52f9f [modular_aot] Fix swapped opcodes in comparison simplification
Updates the simplification of moving constat operands of comparisons to the right to correctly use the strictly swapped operand rather than the negated operand.

Also change the `flipOperands` function to a `swapped` getter to avoid confusion and be clearer that it returns a new value, rather than changing the current one. This better aligns with the Effective Dart guidelines for when to use a getter and how to name them.

TEST=pkg/cfg/testcases/simplification.dart

Change-Id: Id2c19b7cfcbc1586413251b2b9d6d54abcf590c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509840
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2026-06-08 05:34:33 -07:00
Mateus Felipe C. C. Pinto 890e259cfd Update release date for version 3.12.0
Closes https://github.com/dart-lang/sdk/pull/63502

GitOrigin-RevId: b2797fd02dc2e513c86f4c10d0e6badd40ba821f
Change-Id: Ic92dcac5bab13220b8b1241d208bd4dcb2273527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508563
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-06-08 02:38:40 -07:00
Johnni Winther 27ece1a4b6 [cfe][InternalNodes] Add internal nodes for pattern related statements and expressions
This add internal nodes for nodes related to patterns. This prepares for splitting Variable and InternalVariable.

Change-Id: Idd7f2ced9405491fc9690114494e230a9e88e9b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509320
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-06-08 02:24:59 -07:00
Kevin Moore 23a289417d [dart2wasm] Fix unsound type-argument check optimization on covariance checks
When casting a getter return value that requires a covariance check, the
CFE inserts an AsExpression where both the operand type and
tested-against type are statically identical (the instantiated member
return type, e.g. Callable<void Function(num)>).

The types.dart optimizer previously assumed that because the static
types matched, the runtime type arguments must also match, and optimized
away the type-argument checks. However, in a covariance check, the
dynamic value returned is a supertype (e.g. Callable<void
Function(int)>) due to class parameter covariance.

This change safely rewrites the static operand type of a covariance check
by preserving the InterfaceType structure but using calculateBounds to
rewrite its type arguments to their upper bounds (falling back to Object?
or Object for non-interface types). This allows us to keep class-check
optimizations active while remaining sound.

TEST=tests/language/covariant/callable_class_field_getter_test.dart
Fixes https://github.com/dart-lang/sdk/issues/53091

Change-Id: Ia64ea90b1bad2f7c1dab81cc3385103507b97b3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508425
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-06-07 21:51:07 -07:00
Konstantin Shcheglov a21f54e771 CQ. Migrate remaining parser tests from parseStringWithErrors() and remove it.
Change-Id: I12f74a0222a2e066f27862898e1ed091f99e154c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509563
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-05 18:04:24 -07:00
Konstantin Shcheglov 778a860a2a Add ElementAnnotation.isValidAtElement()
Bug: https://github.com/dart-lang/sdk/issues/63503
Change-Id: Iadc096c244607edcb773d70338f1b5b769c25128
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-05 18:02:28 -07:00
Konstantin Shcheglov 9a769de4b7 DeCo. Only regular formal parameters can be defining.
Bug: https://github.com/dart-lang/sdk/issues/63529
Change-Id: I5d9b0862d52e3d01dd15f1eb9845baad45fa0104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509542
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-05 17:59:36 -07:00
Srujan Gaddam 3955564590 Rev web to 19d0315df54225d3aa3c11531619a55bbd4d30be
Change-Id: If46a65c757a6eae1d3c5a053a80d08c9944db2d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509525
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2026-06-05 13:41:48 -07:00
Sam Rawlins d33ce2f88d linter: Introduce no_dynamic_casts replacing strict-casts
Work towards https://github.com/dart-lang/sdk/issues/63527

We will want to deprecate the `analyzer/language/strict-casts` setting,
but we first need to ship an SDK to Flutter that offers the lint rule,
before we deprecate the setting, which will cause CI to fail (like a
Dart->Flutter roll).

When the deprecation is enabled, we can also ship the automated fix.

Change-Id: I0e9651171b721577acbd416d254bca3d0324f3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-05 07:02:01 -07:00
Martin Kustermann 56e0c9fca3 [dart2wasm] Exclude value types from deferred loading partitioning
This reduces e main module by around -0.4% uncompressed
and -0.5% compressed

Value types don't have identiy, they are compared by value. As such
there's no need to have a unique int/double box for the same value -
each module can have their own box: The box identity cannot observed.

That in return means also we avoid exporting those from main module &
importing into deferred modules.

Change-Id: Ib63949b59263b7381396323210b4218662f56525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509321
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2026-06-05 02:10:35 -07:00
Martin Kustermann e3cf529f87 [dart2wasm] More compact encoding of deferred load lists
Measured on size of e main module (baseline is we don't embed
it in application code):

* embedding before: +16.5% uncompressed / +9.1% compressed
* embedding with this CL: +4% uncompressed / +4.3% compressed

When embeddeding deferred load list information into the app
(as opposed to a separate json file) we now use a more compact
encoding.

Specifically: Instead of encoding it as an array of an array of
strings (which are module names), we encode it as an array of an
array of module ids and construct the module name from the id.

To make the array of module ids more compact we utilize the fact
that we can sort them and encode in delta encoding (i.e. instead
of absolute module ids, encode the diff between previous module
id in the list).

We put the encoded module id lists in a data section and create
`WasmArray<WasmI8>`s from them at startup. When we trigger a load
we then decode them into the list of module names.

There's more opportunity to optimize it, but it's good to do
this as a first step.

Change-Id: I293fb8879d992fc370786f6c9b258ccd27e1559b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508980
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-06-05 00:50:46 -07:00
Sam Rawlins 9d41f28545 DAS plugins: document that a git URI can be used
Change-Id: I8bcac6d4816af2ba3b27f271cf39959371d3da2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509544
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-06-04 21:09:29 -07:00
Sam Rawlins 4c6fe56ae3 linter: Introduce no_raw_types replacing strict-raw-types
Work towards https://github.com/dart-lang/sdk/issues/63516

I have code here to deprecate the `analyzer/language/strict-raw-types`
setting. But I disabled it, as I realized we first need to ship an SDK
to Flutter that offers the lint rule, before we deprecate the setting,
which will cause CI to fail (like a Dart->Flutter roll).

When the deprecation is enabled, we can also ship the automated fix.

Change-Id: I17d1ea9aba96063059e37891c05d4a8bd3f02737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-04 14:12:28 -07:00
Kallen Tu 2e682b9e9d [deps] Bump benchmarks_internal_rev for primary constructor related fixes.
Bump the deps to include fixes caused by the new primary constructor
feature. https://dart-internal.googlesource.com/benchmarks-internal/+/02b00ba22d77dc489e481c33b279edf5d008e0cd

This CL removes the `final` modifier in parameter lists.

Change-Id: I1b066ca8b6da49ccc000a09cc3165838dd42e2bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509540
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2026-06-04 13:00:46 -07:00
Konstantin Shcheglov 4da9a9133e Augment. Report augmentationPositionalFormalParameterName.
PS1: rename the test file.

Change-Id: I0e38a25c9c6d2b573766eb9a088fadbc8a4fc5b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509202
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-04 12:52:55 -07:00
Konstantin Shcheglov 46bb00bfae Start analyzer 13.2.0-dev, analyzer_plugin 0.14.11-dev, analyzer_testing 0.3.1-dev, analysis_server_plugin 0.3.17-dev
Change-Id: I08c2d7d8829ebe0eba147baa52a754e71b43c145
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-04 12:51:41 -07:00
Nate Biggs dc4f2db4cf [agents] Add rule to enforce license header on new Dart files
Enforces the inclusion of the standard copyright and BSD-style
license header with the current year at the top of newly created Dart files.

TAG=agy
CONV=03fa0bca-5bc4-4526-8592-707d62f64410

Change-Id: I0b4a085e3f2d69a3459dee84336f0be36499e4cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509440
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-06-04 12:06:58 -07:00
Danny Tuppeny 6fed0f7527 [analysis_server] Remove some unnecessary code related to original interactive refactors
When we built the added the original interactive refactors support, we supported the client telling the server which field kinds it can prompt for, so that if there were questions the client didn't support that did not have default values, the refactor could be hidden.

However, we only implemented one such refactor (Move to File) and the only field (destination URI) has a default value, so the client capabilities never have any effect.

Since we're replacing this support with the new "Interactive Forms" and don't intend to create any new refactors using the old system, this code is all redundant and therefore can be deleted.

Change-Id: Ic940dc54e325ccab05b28f496dbedee76e17e0b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509460
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-04 11:29:49 -07:00
Konstantin Shcheglov 050afdb4ae Prepare to publish analyzer 13.1.0, _fe_analyzer_shared 101.0.0, analysis_server_plugin 0.3.16, analyzer_plugin 0.14.10, analyzer_testing 0.3.0
Change-Id: I61d4d2e2da18ed1ea2c1eaf78138a32774535be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-04 11:21:35 -07:00
Parker Lougheed 42aa5e71f0 [linter] Add diagnostic doc for unnecessary_await_in_return
Bug: https://github.com/dart-lang/site-www/issues/7210
Change-Id: I7f98ec3f76476bc6eede32e40b11f9a552105682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Connie Ooi <connieooi@google.com>
2026-06-04 10:44:04 -07:00
Danny Tuppeny dbe61d2ece [analysis_server] Support prompting for name for "Add Constructor Name" refactor
Similar to the previous CL for Add Import Prefix, this adds support for prompting for a name for "Add Constructor Name" if Interactive Forms are available.

Change-Id: I952695df03016a549345f329ac04961d7c279af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-04 10:41:49 -07:00
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