Commit Graph

113698 Commits

Author SHA1 Message Date
Jens Johansen 90d89a0ca1 [CFE] Remove unused enableUnscheduledExperiments
Change-Id: I9d3b498ec0b4ae631cc2240dfad589166eae0c4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510340
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-09 05:25:53 -07:00
Daco Harkes bf82bf3d38 [dartdev] Fix test package resolution
Change-Id: I6d0d9fd29dd7eafcbf7d451b3f91ca66cc8c7fe7
Cq-Include-Trybots: luci.dart.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
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510300
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2026-06-09 01:26:43 -07:00
Jens Johansen daadde51d8 [CFE] Remove unused compiler option 'declaredVariables'
Change-Id: I78cf7fafa64310e600e864b17b64c4aa3faa7aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509981
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-06-09 00:10:30 -07:00
Alexander Aprelev 9306b8796c [infra/android] Automatically reboot android devices stuck in fastboot mode.
Should help with performing dart gardening duty, taking care of the bots stuck in fastboot mode manually. Like this: https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-android-release-arm_x64/7497/overview.

Change-Id: I20f142190a2987c4b76f85ad27f5adfaa047f5a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510191
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2026-06-08 20:52:24 -07:00
Sam Rawlins 6fd091c444 analyzer: Avoid two-step constructors for TypedLiteralResolver
Change-Id: I13d9c5ef3b49d1112e1eb2c503b9d571fa458da0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510183
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-08 17:29:20 -07:00
Ryan Macnak 37609ccba2 [build] Fix cross builds.
Change-Id: Ia2b8faa9023086ce5d7387178ac9451ade939230
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510220
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 16:11:42 -07:00
Keerti Parthasarathy 9bbfa6ffd9 [primary contructors] Fix use_declaring_parameters to ignore fields with doc comments.
Closes https://github.com/dart-lang/sdk/issues/63518

Change-Id: I51fb1a07a758e3d94a212537bc5560e66c483982
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-08 15:13:54 -07:00
Sam Rawlins d7d118f75e linter: Fix bug in no_dynamic_casts w.r.t. Object? for-loop variable
I discovered this bug while migrating Flutter to the new lint rule.

Change-Id: I7944adff58299907e50bf0b2af3b992ec25721ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510142
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-08 15:04:42 -07:00
Ryan Macnak 52f1a4ef54 [build] Too many deps!
- Break false dependency of non-VM platforms on VM platform
 - Break false dependency of bootstrap gen_kernel on VM platform
 - Extend precompile_tools to gen_kernel steps
 - Rename intermediate kernel files so JIT versus AOT is visible in ninjatracing

TEST=ci
Change-Id: I07011abe8303597af61d2b8c73e788b661482cc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510060
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 14:27:51 -07:00
Jake Macdonald fb2c85c973 udpate analyzer to allow the latest package_config version
Change-Id: Ib73a378a30ab297ecc45218a57cfedfa62c75f8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510120
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2026-06-08 14:26:58 -07:00
Ryan Macnak 7b62c1be57 Revert "Remove the JIT entitlement from gen_snapshot."
This reverts commit 8dd61ee24b.

Reason for revert: gen_snapshot still flakily setting executable permissions?

Original change's description:
> Remove the JIT entitlement from gen_snapshot.
>
> gen_snapshot doesn't need the instructions it's generating to actually be executable.
>
> TEST=ci
> Change-Id: I6c542d4a07f6e6659feb22f77aca3819d7d26c78
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509060
> Reviewed-by: Tess Strickland <sstrickl@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I91ed61d719a3d9eefa66b32b535079a07c92ab59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510080
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 14:05:04 -07:00
Konstantin Shcheglov 3a85655f91 CQ. Migrate more tests from assertErrorsInCode().
Move another batch of analyzer tests away from offset-based
assertErrorsInCode() expectations. Put expected diagnostics and context
messages directly in the source snippets instead, including multi-file
cases that need context markers in supporting files.

This keeps each diagnostic expectation next to the code that produces
it, making the tests easier to read and less fragile when surrounding
code changes. It also removes now-unused diagnostic imports and helper
parameters that were only needed for explicit ExpectedDiagnostic lists.

Update the diagnostic expectation utilities so stripping generated
marker lines preserves the retained source lines correctly.

Change-Id: Ibe3890b9ff5e2b2e102e13e5ecc243bdf80c5f4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509682
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 13:47:41 -07:00
Ryan Macnak 9b8d908379 Speed up RISCV QEMU testing.
- Skip/delete some large tests.
 - Reduce some large tests.
 - Explicitly choose the CPU features, which seems to be disabling something expensive.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/63465
Cq-Include-Trybots: luci.dart.try:vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try
Change-Id: Ifa591d6600da3e20c9de4d123906a7747029df7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509200
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 13:27:27 -07:00
Martin Kustermann 9edafc75f7 [dart2wasm] Disallow inlining of static field initializers
Static field initializers are only run once and as such are cold code.
They should never be inlined into hot code that accesses the static
field.

Though right now `wasm-opt` will inline the static field initializers
e.g. if there's only one use of a static field (as it makes size a bit
smaller if we avoid the extra wasm function). That has the problem that
it may inline cold code into hot code. That hot code in return then gets
big and may not be allowed to be inlined into it's caller.

One can instruct binaryen to only inline functions with one caller up to
some size by passing `--one-caller-inline-max-function-size` (see [0]).
Though that can regress size.

So instead we specifically mark the function we know are cold to not be
inlined, namely static field initializer functions above a certain size.

This changes performance of a benchmark from [1] from
  cascadeUnhoisted: 390000 us
to
  cascadeUnhoisted: 138000 us

NOTE: This will cause some size regressions for e.g. e main module by
0.4-0.5% - but seems to be the right thing to do.

[0] https://github.com/WebAssembly/binaryen/issues/8619
[1] https://github.com/dart-lang/sdk/issues/63484

Change-Id: I626b8cd879a804aef638901ede190f74276d8e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509960
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-06-08 12:21:42 -07:00
Ryan Macnak 8189bdd83b Reduce build sets for most bots.
The front-end, dart2js, dart2wasm, ddc and analyzer bots do not need the cross-compilation or sanitizer tools, nor the VM test binaries.

Change-Id: I2f5a1041b1b29c562bace7210830e9904a31c397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510040
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 11:07:41 -07:00
Ryan Macnak 5955f2b806 [build] Skip unnecessary read when using incbin.
Change-Id: I7eb56ec2a29ecaf4f4ce578f9666436969cbe15d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510041
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2026-06-08 11:05:48 -07:00
Alexander Markov 28d7984e31 [modular_aot] Use primary constructors
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I7476ec7e66edd958c66e31dabcd6ab8d818594e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509640
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-06-08 10:32:03 -07:00
Ryan Macnak fd7d13ed8c [build] Use ad-hoc code signing by default for non-sanitizer builds.
Cq-Include-Trybots: luci.dart.try:vm-asan-mac-release-arm64-try,vm-tsan-mac-release-arm64-try,vm-ubsan-mac-release-arm64-try
Change-Id: Ie2eb29167cafd265dcee8467ac6f4f4a694d2356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509062
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 09:13:26 -07:00
Parker Lougheed a1160684d9 [analysis_server] Remove class modifiers in convert_class_to_enum fix
The class modifiers aren't valid on the resulting enum declaration.

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

Change-Id: Idd8ed4fcfae071d21f25811b2158cfad3178fef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509880
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-08 09:11:55 -07:00
Konstantin Shcheglov a4ced20e50 CQ. Simplify WrongNumberOfParametersForOperatorTest.
Change-Id: Id2c4736ea41c821c40c6ef9f4abc46409487f745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509600
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 09:09:29 -07:00
Sergey G. Grekhov 0604582ff3 [co19] Roll co19 to a2237e4186bc0cfd8890eb46c6840c011dc3de0b
2026-06-08 sgrekhov22@gmail.com Fixes dart-lang/co19#3846. Fix typos, add expected errors (dart-lang/co19#3848)
2026-06-03 sgrekhov22@gmail.com dart-lang/co19#3315. Add tests for abbrevations. Part 2. (dart-lang/co19#3840)
2026-06-03 sgrekhov22@gmail.com dart-lang/co19#3315. Add tests for abbrevations. Part 1. (dart-lang/co19#3838)
2026-06-03 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 6.0.2 to 6.0.3 in the github-actions group (dart-lang/co19#3839)
2026-06-02 sgrekhov22@gmail.com dart-lang/co19#3315. Add some more tests for primary constructors (dart-lang/co19#3837)
2026-06-01 sgrekhov22@gmail.com Fixes dart-lang/co19#3822. Don't print extensions in applying_augmentations_A01_t01.dart (dart-lang/co19#3836)
2026-06-01 sgrekhov22@gmail.com Fixes dart-lang/co19#3833. Remove duplicated default values, fix typos (dart-lang/co19#3835)
2026-06-01 sgrekhov22@gmail.com Fixes dart-lang/co19#3832. Update expected errors locations in static_processing_A30_t*.dart (dart-lang/co19#3834)
2026-05-29 sgrekhov22@gmail.com dart-lang/co19#2145. Add/update/delete tests for variables. (dart-lang/co19#3818)

R=athom@google.com, eernst@google.com

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,dart2js-minified-linux-d8-try
Change-Id: I7562b9104ba752dcff5d7b5b4adf9ed426c1fcf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509982
Auto-Submit: Sergey Grekhov <sgrekhov22@gmail.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2026-06-08 08:51:36 -07:00
Konstantin Shcheglov a6d53d7aaa CQ. Align UseOfVoidResultTest names with analyzer AST.
PS5: only renames.
PS7: sort

Change-Id: I32e0820dc776c54b2146f32a2537a1c758ef3b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 08:41:43 -07:00
Konstantin Shcheglov 83c245288c Augment. Remove unecessary test_isComplete_ tests.
This property is already heavily tested by existing tests.

Change-Id: I84a2f0ff1c56d77f2e5ee66c18aa9df0f93a3e14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509800
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 08:40:30 -07:00
Ryan Macnak 20ffc508e0 [infra] Enable sharding for Windows ARM64.
Change-Id: I73d0b5c48b84c50b2f83ae3a81c04bcfcceac4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504160
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 08:39:29 -07:00
Ryan Macnak 8dd61ee24b Remove the JIT entitlement from gen_snapshot.
gen_snapshot doesn't need the instructions it's generating to actually be executable.

TEST=ci
Change-Id: I6c542d4a07f6e6659feb22f77aca3819d7d26c78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509060
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-08 08:13:39 -07:00
Alexander Markov 7df4ef0cf1 [modular_aot] Fix number of optional named parameters when reading function types from module snapshot
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: Iaa38ca6c62f9899d2c3f0363c484dbe15e0a9859
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509523
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-06-08 07:36:51 -07:00
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