Commit Graph

113225 Commits

Author SHA1 Message Date
Brian Wilkerson 069849df14 Update the presubmit script to stop running a removed test
The test was removed in https://dart-review.googlesource.com/c/sdk/+/503620.

Change-Id: I271fbff176816c526d8221e0e8cbd3f52dcfbef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503666
Reviewed-by: Paul Berry <paulberry@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2026-05-18 07:13:11 -07:00
Johnni Winther e30cd0322c [cfe][Contexts] Split VariableDeclaration and VariableStatement
This separates VariableDeclaration from Statement. VariableDeclaration no longer implements Statement and variable declared in a block or in a for-statement are now wrapped by a VariableStatement.

Currently there are two VariableStatement implementations; LegacyVariableStatement for variables in the current model, called LegacyVariable, and VariableInitialization for variables used in the new, still experimental, encoding that supports scope computation.

This CL is a step towards realigning the AST nodes to the new model in which each kind of variable has its own distinct subclass. (LocalVariable, PositionalParameter, NamedParameter, SyntheticVariable, etc.)

Note that it is not the intent to use VariableStatement in ForStatement going forward but that will be handled in a follow-up.

TEST=existing.

Change-Id: I5b309cd62c9b138f95b74fb054686edffa49a393
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502681
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-05-18 05:49:28 -07:00
Nourhan Hasan 046d473d5e [vm/service]: use a map for service ID zones to avoid ID reuse and unbounded growth (#62205)
Replace the growable array with a hash map so that zones are truly
removed on deletion and IDs are never reused.

TEST=Manually tested with test_zones.dart (IDs increase, map size
toggles); existing service tests pass

Fixes: https://github.com/dart-lang/sdk/issues/62205
Change-Id: I0bbec4a0fc0aef9ed8679a3aa5ce832fea9bfde8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489720
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Nourhan Hasan <nourhan.m.hasan@gmail.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2026-05-18 03:57:44 -07:00
Modestas Valauskas ace4bb1ad6 [benchmarks] Add BitArray benchmark
Adds a benchmark exercising int.oneBitCount and int.trailingZeroBitCount
(landed in CL 498041) and a representative set of Int32x4 SIMD bitwise
kernels, through a small bit-array implementation built on a Uint32List
word store.

Kernels:
- cardinality: popcount across the array.
- forEachSetBit: Brian-Kernighan iteration via ctz.
- select(k): position of the k-th set bit using popcount + ctz.
- complementCardinality: popcount of bitwise-NOT per word.
- totalBitLength: sum of int.bitLength per word.
- intersection / union / xor / difference: pair-op bitwise kernels using
  Int32x4 SIMD with a scalar tail.
- complement: single-input bitwise NOT via Int32x4 XOR-with-all-ones.

Each kernel has a Swar baseline using portable bit-twiddle code and an
Accelerated variant that uses the new int getters or Int32x4 SIMD, so
the speedup attributable to the hardware/intrinsic path is visible
directly. main() first runs a correctness check that asserts both
implementations agree across a representative range of sizes and bit
densities, then reports timings via the standard BenchmarkBase harness.

Work towards https://github.com/dart-lang/sdk/issues/1053 (efficient
BitSet implementation).

Bug: https://github.com/dart-lang/sdk/issues/52673
Change-Id: I5ae5bc0b9d07f6de3e11907ac1fae80f02e77119
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503020
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Modestas Valauskas <valauskasmodestas@gmail.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-05-18 03:21:30 -07:00
Tess Strickland 181f581345 [vm,dyn_modules] Drop initializing formals/wildcards from local vars info.
Also don't emit source positions for every StoreFieldTOS instruction,
instead explicitly emit them where appropriate in the BytecodeGenerator.

TEST=co19/VM/primary_constructors_t07

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

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try
Change-Id: Ic34cd27ca57791e8bd69c0e46e3777bfe5dcfe27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503340
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2026-05-18 03:13:30 -07:00
Martin Kustermann 5ae8a02eec [dart2wasm/infra] Add dart2wasm-linux-mac builder to tools/bots/test_matrix.json
The configuration was already added long ago in [0]

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

Change-Id: If78a1d40311bda1ed3d2c1325cbc3063685ab9c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-05-18 01:26:32 -07:00
Konstantin Shcheglov 6c76594af1 Augment. Skip field augmentations when checking for duplicate members.
Treat field fragments marked as augmentations like other augmented
members when collecting local member names. Do not add their getter and
setter fragments to the instance or static duplicate scopes, because
they augment existing declarations rather than introduce new local
members.

This avoids secondary duplicateDefinition and conflicting member
diagnostics when a field augmentation targets an existing declaration.
Non-augmenting declarations in augmentation blocks are still checked as
new declarations, so real duplicates continue to be reported.

We don't have yet checks for completed getter / setter from fields and
variables, so tests miss several errors.

Change-Id: I6901aea1770891917c966c11b59cb647aaf4ed86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-05-16 07:53:18 -07:00
Sam Rawlins d12a4095a4 linter: flutter_style_todos: add test for multiple series of slashes
Fixes https://github.com/dart-lang/sdk/issues/59342

Change-Id: Ia633769c51131ca1cb258826cc6cddbebc85253f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503961
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2026-05-15 18:25:40 -07:00
Parker Lougheed 5883c3559a [changelog] Clean up and fixes for 3.12 and 3.13 entries
Change-Id: Ib065e2abf76f36cc9223edbb01c613eeea0a7083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503920
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-05-15 16:50:03 -07:00
Sam Rawlins 8f07aef955 linter: always_specify_types: add test with type parameter with bound
Fixes https://github.com/dart-lang/sdk/issues/57665

Change-Id: Idced0de7de239de8f46712dc8d48025caa88a7a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503621
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-15 11:36:25 -07:00
Ben Konyi 0aa709e8cc [dds] Update expected DevTools title in path strategy test
DevTools recently updated their index.html to include "The Flutter Authors" in the copyright header instead of "Dart DevTools" in the body. This updates the test expectation to match.

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

TEST=pkg/dds/test/devtools_server/devtools_server_path_strategy_test.dart

Fixed: 63375
Change-Id: I83b8fc4101501ffbbf1e3a84ca797c7b18c0d9b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503820
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-05-15 10:32:53 -07:00
Konstantin Shcheglov 7b4ca03c82 CQ. Migrate resolution tests to resolveTestCodeWithDiagnostics. AB.
Change-Id: I7aaed1e340ab7a3086f1b5ca78019b811e06c56e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-05-15 09:33:46 -07:00
Keerti Parthasarathy 98c3699f32 Add test for inlining a getter.
This test confirms that https://github.com/dart-lang/sdk/issues/45997 is fixed.

Change-Id: Iafdd8be922a770d2bc11260a94237845df336d4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503660
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-05-15 09:28:17 -07:00
Keerti Parthasarathy 001a3ba29b [data-driven]Support for replacing a deprecated library.
Bug: https://github.com/dart-lang/sdk/issues/62849


Change-Id: I2eb323319264ded024acf3b3ede2460eae974a83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2026-05-15 08:55:14 -07:00
Paul Berry aaa48e2247 [deps] Roll prebuilt Dart SDK to 3.13.0-103.1.beta.
This will allow use of Dart 3.13 features (such as primary
constructors) within the SDK itself.

Note that some generated files required benign updates due to
formatter behavior changes.

Change-Id: I595554e9cff3dbaa3f11da407d6c26036a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503662
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-15 08:23:09 -07:00
Konstantin Shcheglov 56706b715d Augment. Report incomplete augmented executable declarations.
Report new diagnostics when an introductory function, member, or factory
constructor is still incomplete after applying all augmentations.

Keep the existing missing-body diagnostics for declarations that have no
augmentations, but report augmentation-specific diagnostics when an
augmentation chain exists and none of the fragments provides a body or
factory redirection.

Move the checks into error verification so that extension and extension
type members can participate in augmentation completion before reporting
the existing abstract-member diagnostics. Also suppress the
corresponding shared parser diagnostic when it is reported by the
verifier.

Consolidate body-related tests by declaration shape instead of by
individual diagnostic. This keeps missing bodies, external bodies,
augmentation completion, and already-complete checks side by side,
making the interaction between these rules easier to review and extend.

Move the constructorAlreadyComplete coverage from its dedicated test
file into constructor_body_test.dart, and add the factory body
completeness cases there as well. Add executable_body_test.dart for
function and member body coverage, including top-level declarations,
static members, extension members, and extension type members.

Add diagnostic definitions and fix-status entries for the new
diagnostics.

Change-Id: I9ee803c1e767ff47a608c86413ef7ffc71518cfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503540
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-05-14 15:08:39 -07:00
Sam Rawlins 433b4fa3c8 analyzer: Consider "Immutable" annotations the same as "immutable"
Fixes https://github.com/dart-lang/sdk/issues/57670

Change-Id: I5a9ecd153c4e4de21e00860a7743f946096b0849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-05-14 13:36:58 -07:00
Konstantin Shcheglov 61a266f8dc CQ. Index and search '// [diag.fooBar]' inside analyzer tests.
Teach the analysis index and referenced-name computation to recognize
`// [diag.foo]` expectation comments embedded in string literals in
analyzer tests. Resolve `foo` through the analyzer diagnostic library
and record it as a qualified reference to the diagnostic variable.

This lets reference search find diagnostics that are used only in test
expectation strings, when developing analyzer itself.

Change-Id: I91fa020ccd2cfe49fa6e890c8f6796a5b8ca4d1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503663
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-14 12:59:18 -07:00
Brian Wilkerson a667cde7c1 Add a fix for initialize_in_field_declaration
The correction producer implements a fix. Pending discussion we might
choose to extend it to produce an assist, either in addition to the fix
(if we keep the lint) or instead of a fix (if we drop the lint).
Whatever we choose, I'd like to do that in a separate CL because I want
this to be available for testing purposes as soon as possible.

Change-Id: Icdd17ba0130149fc785c196be69e9ef990529800
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503520
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2026-05-14 12:11:59 -07:00
Sam Rawlins f35be6757d analyzer: Remove unused imports
I'm honestly unsure why this is not reported by my IDE, or CI. But it
is reported internally in Google. I'm sure it has to do with the SDK
starting to add some extension methods in the core libs, which were
previously only available in package:collection. But this is still safe,
as analyzer's minimum SDK is Dart 3.11.0.

Change-Id: Ibbb0078e463df03b31749296e1d2f474afb183ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503582
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-14 11:40:36 -07:00
FMorschel 058b623fb7 [analyzer] Adds warning for missng await in return in try block
Bug: https://github.com/dart-lang/sdk/issues/62555
Change-Id: Ic152d89e94739aefd79f71972691722d4cdd0946
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486920
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Auto-Submit: FMorschel <git@fmorschel.dev>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-05-14 10:23:47 -07:00
Sam Rawlins cbd61d792e DAS plugins: Make better use of the analysis driver
Fixes https://github.com/dart-lang/sdk/issues/62649

This change overhauls what the PluginServer does when it receives requests from DAS like watch events, overlay changes, setting context roots, and setting priority files, to use the AnalysisDriver APIs. These APIs provide a much smarter, more fine-grained mechanism for determining which files need to be re-analyzed.

This requires a lot of changes that really don't seem obvious (or just,
to me, they are not intuitive), because they relate to Streams being
processed, drained, read, etc. So I'll summarize as much as I can:

* In order to track that results coming from AnalysisDriver are
  definitely for the same AnalysisSession we are concerned with, at
  any given time, we add `_filesBeingAnalyzed` and
  `_filesBeingResolved`. These two maps are cleared any time the plugin
  isolate is notified of changes, so there is not a memory concern.
* We add a `waitForIdle` method which is just used by tests
  occasionally, in order to ensure analysis is complete.
* We tackle a related bug mentioned in the issue thread regarding
  adding or removing overlays without changing the source contents.
  There are now a few checks that old-content is not equal to
  new-content.
* Due to the more async nature of reading events off of the analysis
  driver, we have to be more particular in tests about sending
  `AnalysisSetContextRootsParams` and reading from the notification
  stream, so there are a lot of changes in tests to re-position these
  calls.

This results in massive savings in re-analysis time. Using the example in https://github.com/dart-lang/sdk/issues/62649, typing in the
`build_runner/lib/src/logging/build_log_logger.dart` file, I see the
following:

* Before this fix, every keystroke results in 183 files being
  re-analyzed by the plugin (always 183).
* After this fix:
  * keystrokes that do not result in a summary change (or maybe
    fine-grained deps analysis), like whitespace, results in 1 file
    being re-analyzed (the file I'm editing).
  * A keystroke that results in slightly changed summary, like changing
    an import to something invalid, results 2 or 4 files being
    re-analyzed.
  * A keystroke that changes the name of class BuildLogLogger (large
    change to summary) results in 9-10 files being re-analyzed.

Change-Id: Ie35053b0d90457b5b4b53bc8803188def0308d2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-05-14 09:57:59 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com eba959d86e Roll Fuchsia SDK from 32.20260508.4.1 to 32.20260513.2.1
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-sdk-dart-sdk
Please CC fuchsia-3p-engprod@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Fuchsia SDK: https://bugs.fuchsia.dev/p/fuchsia/issues/list
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try;luci.dart.try:vm-fuchsia-release-arm64-try
Change-Id: I26afd0e03689aed82468a66cd94093c1b763fe22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503300
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-05-14 09:54:16 -07:00
Danny Tuppeny ef731d75e5 [analysis_server] Fix Go-to-Definition on extension overrides
Fixes https://github.com/Dart-Code/Dart-Code/issues/6043

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

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

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

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

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

To file a bug in BoringSSL: https://crbug.com/boringssl/new
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-vm-gardener@rotations.google.com
Change-Id: I448a0e80491cf7c03145de40ebe1d46ec852921e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503180
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-05-14 08:51:30 -07:00
dart-autoroll@skia-public.iam.gserviceaccount.com 119b6853b3 Roll gn from 78e67afc82fa to 068dd892acb2
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/gn-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@rotations.google.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in gn: https://bugs.chromium.org/p/gn/issues/list
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-linux-arm64-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: I3666c8515b37c13a8ebe6b98413e8d68b9a18fd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502640
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2026-05-14 07:49:22 -07:00
Daco Harkes 56ce30612d [deps] Roll dart-lang/native
Change-Id: Ifb68db76a1ddc6447a4b431c1e8dbd880e84cae8
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503421
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2026-05-13 17:16:16 -07:00
Sigmund Cherem 53219f95e6 [dyn_modules] end-to-end test for dynamic calls.
This change introduces the dynamic_call test in pkg/dynamic_modules.

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

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

This means not all file URIs are correctly normalized.

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

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

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

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

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

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

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

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

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

Bug: b/448095881

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

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

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

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

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

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

TEST=Existing tests

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

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

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

Change-Id: Ieae534dbf64135129b9891b7db047f5617401021
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501121
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-05-13 08:35:17 -07:00