Commit Graph

113635 Commits

Author SHA1 Message Date
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
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