Commit Graph

56600 Commits

Author SHA1 Message Date
Brian Wilkerson 594efdd63c Add documentation for another warning
Change-Id: If31cfea7c3dc3379cc0e8eda454ac9fdec4a348d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503942
Reviewed-by: Connie Ooi <connieooi@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2026-06-10 12:21:26 -07:00
Danny Tuppeny ff0cd5e0d6 [analysis_server] Don't warn on renames of private named parameters
Fixes https://github.com/dart-lang/sdk/issues/63433

Change-Id: I6e39d3b8c9379df07a677cabfcd9028a7bca79db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510840
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-10 11:57:21 -07:00
Konstantin Shcheglov bf71251dcd CQ. Remove ResolutionTest.error/message, all goes through inline expected diagnostics now.
Change-Id: I46fd2efe14e1bb46fa7ec12423c19fcf551bdca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-10 11:25:41 -07:00
Konstantin Shcheglov cb41c7b055 CQ. Remove assertErrorsInList().
Change-Id: I51afa9bce21992d6093935d303034551e135c94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 11:25:01 -07:00
Konstantin Shcheglov 8267ce6fff CQ. Use more inline expected diagnostics.
Change-Id: I83743fee43718133df71dd33093056543dc83094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510482
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 10:57:43 -07:00
Konstantin Shcheglov e4ef831dfc Prepare to publish analyzer 13.2.0, _fe_analyzer_shared 102.0.0, analysis_server_plugin 0.3.17, analyzer_plugin 0.14.11, analyzer_testing 0.3.1
Change-Id: I534e30c37570cf5fdc194eb9668d37747823aa82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510480
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 10:52:25 -07:00
Konstantin Shcheglov 6d86b39595 Fine. Store formal parameter default values separately from FunctionType(s).
A type is just a type, it should not attempt to carry element semantics.

Bug: https://github.com/dart-lang/sdk/issues/63555
Change-Id: I9dacc4f5cc4060d862f7e1bb1ececdd9dc1a303c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510420
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 10:29:28 -07:00
Konstantin Shcheglov 24cf34371a CQ. Stop using assertErrorsInList() in AnalysisDriverCachingTest.
Change-Id: Icac933eb6cfd61798a163daa906348f68b7c2616
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 09:57:10 -07:00
Sam Rawlins 088614d11b DAS plugins: Export types from analyzer_plugin for convenience
Fixes https://github.com/dart-lang/sdk/issues/61821

Change-Id: Ibb2737553de713aeef725a19417e09202bee8ac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509543
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2026-06-10 09:38:40 -07:00
Danny Tuppeny eb979c2f0c [analysis_server] Don't show field modifiers in signature help for primary constructors
Fixes https://github.com/dart-lang/sdk/issues/63560

Change-Id: I2c93e4a1011075e103d9165d0664f588f3109c40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510821
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-10 09:03:48 -07:00
Parker Lougheed 44bb92f49a [dartdev] Provide no installation feedback in dart installed
Updates `dart installed` to provide feedback if nothing is installed. If they didn't specify `--all` but there are inactive tools, provide a suggestion to specify the `--all` flag as well.

Resolves https://github.com/dart-lang/sdk/issues/61626

Change-Id: I7d68fe91a29650c113047065e673e7a1139df847
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510020
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2026-06-10 08:26:03 -07:00
Jake Macdonald 7c3c71ae4d Don't lint on raw types in constant patterns if the matched type is of type Type.
The issue does not have total consensus but I do feel strongly and the
fix was trivial and so I am just sending this out.

Feel free to push back if you feel strongly, or I should go through some
formal process.

Bug: https://github.com/dart-lang/sdk/issues/59334
Change-Id: I7c5e25e9754c4cebd427b8dc9ccfbe8daa57e71a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510460
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2026-06-10 08:23:43 -07:00
Kilian Schulte dd4f983cee fix location tracking transformer for use in flutter
Closes https://github.com/dart-lang/sdk/pull/63551

GitOrigin-RevId: a14cbbd88c605d193e2a1b744727765c45d38278
Change-Id: Ied6c2fc4ee3b5343c6ab8e38080542d667175f4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510160
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2026-06-10 04:15:37 -07:00
Martin Kustermann 034b90af5d [dart2wasm] Allow using experimental dart:ffi in deferred modules
The experimental `dart:ffi` support predates deferred loading
implementation. Any use of FFI features would lazily import `ffi.memory`
into the (fixed coded) main module.

This CL now lazily imports the `ffi.memory` module into all modules that
operate on the memory.

=> This will now allow a flutter app that is compiled with dart2wasm
   in deferred loading mode to possibly defer parts of flutter
   engine code that uses FFI into deferred modules.

Issue https://github.com/dart-lang/sdk/issues/56952

Change-Id: Idf821ce2dd92c36ac1be9dae24307516a1ae86d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510760
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2026-06-10 02:34:44 -07:00
Jens Johansen abd32d5449 [analyzer] Fix _OverlayFile.writeAsBytesSync
Change-Id: I3b4d7ad2b7a781c49abebef307a44dd9b3381b37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510361
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-06-10 01:08:18 -07:00
Johnni Winther fa2e23b83c [cfe][InternalNodes] Remove unused precise messages
These messages where never used. This was revealed through the separation of Variable and InternalVariable.

Change-Id: I96d337f941d300cc5437c9fa5c9341abe4889176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510380
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-06-10 00:27:50 -07:00
Jens Johansen 26e4018188 [parser] Rename _reportInvalidConstantPatternOperator -> _checkForInvalidConstantPatternOperator
Follow-up to https://dart-review.googlesource.com/c/sdk/+/510320.

Change-Id: I90fcf18fbaf63600c40409ca420030e749180242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510360
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-06-09 23:51:55 -07:00
Nate Biggs 92ae8b61ec [dart2wasm] Fix switch statements that include a Type expression case.
'canInvokeTypeEquality' was assuming that if a single case was a Type expression, then type equality should be used for the whole switch statement. This is incorrect because if a single case is a type expression but the rest are, for example, ints (as in the fixed test) then the int cases should be compared with identical while only the type expression should be compared with ==.

More importantly, the expected type of the case expression constants should be top type rather than the Type type. Top type is the union of Type and the other case type.

Switches that only include Type expressions will now use "top" type as well but in general switching on a Type expression is an antipattern we shouldn't optimize for. And the impact of not specializing the switch type to Type should be very minimal.

Fixes: https://github.com/dart-lang/sdk/issues/63476
Change-Id: Ib96172f157d8cf3093199e5127d4835e7b25011c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509920
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2026-06-09 20:39:04 -07:00
Nate Biggs 6282b35c4c [dart2js] Fix labeled jump target resolution in SSA builder
When generating SSA jump instructions (HContinue and HBreak) for AST break statements, ensure that we only select labels from the target's label list that are explicitly marked as valid continue (isContinueTarget) or break (isBreakTarget) targets.

Previously, handler.labels.first was selected indiscriminately if non-empty, which caused unlabeled continue statements inside loops that had an outer break label to incorrectly generate labeled continue jumps targeting the break label.

Fixes: https://github.com/dart-lang/sdk/issues/63456
Change-Id: Ic497776141a192edb0930f4585cdaae2feecb3d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510280
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2026-06-09 19:23:06 -07:00
Konstantin Shcheglov f8d286d4d2 CQ. Migrate from assertInvalidTestCode() to resolveTestCodeWithDiagnostics() and remove it.
Change-Id: Id1306cef4434ee4f61fa3df8a33aa4009698203f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510189
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 12:34:43 -07:00
Konstantin Shcheglov a7c437e4d8 CQ. Remove SdkConstraintVerifierTest, assertErrorsInCode()
Change-Id: I563d661c70faa6c3cedf64df442f06aa688864c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510186
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-09 12:26:39 -07:00
Brian Wilkerson 9f47e3186d Add an unnecessary_primary_constructor_body lint
The lint will fire even when there is a comment in the body, such as
```dart
class C() {
  this { /* comment */ }
}
```

I think this is the right behavior because I can't think of any useful
comment that wouldn't be better somewhere else, but let me know if you
disagree.

This doesn't yet have a fix, but it should.

Change-Id: Ia5ffa6b06c75a6a7400ec32a9d22209c08a9c73d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510401
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2026-06-09 11:39:04 -07:00
Kallen Tu 2a3c26806f [migrate] Allow additional force enabled codes in BulkFixProcessor.
This CL allows the BulkFixProcessor to handle additional force-enabled
codes that may not be enabled in the existing analysis options of the
current project.

Change-Id: I346a1fba8a25d7ebc6a2d95828796e7f7c0ff52c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509681
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-09 11:29:45 -07:00
Konstantin Shcheglov fa78f9f947 Augment. Deprecate MethodDeclaration.isAbstract, add isComplete to ConstructorDeclaration, FunctionDeclaration, MethodDeclaration.
Change-Id: I3d5c884870ef183f54e59cd0a5c735373cbe71a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509900
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-09 11:28:23 -07:00
Varad Raj Agrawal 6a678d1f49 Quick fixes that create constructors use new-style syntax when primary_constructors is enabled
Closes https://github.com/dart-lang/sdk/pull/63534

GitOrigin-RevId: 345471bc33c002bbca9cea9c6626a05f481f70e3
Change-Id: If8d533ab0bbb4e6dff51a4256101fb8cb0490fb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-09 10:57:01 -07:00
Konstantin Shcheglov e15ccdd9be CQ. Remove not useful PubSuggestionCodeTest, tweak for encoding test.
Change-Id: I08f5da69db285395566e71463e4e357ea4227ac2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510201
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 10:48:56 -07:00
Konstantin Shcheglov ea50ec6486 API. Deprecate FormalParameterElement.formalParameters and typeParameters.
For clients outside the library the useful property in
`FormalParameterElement.type`, not *how* this type was specified
syntactically: `void f(int a<T>())` vs. `void f(int Function<T>() a)`.
This way, we have to think about these type parameters and formal
parameters only locally, like for example about local variables - they
exist, enclosed in a fragment, but don't leak outside into the element
model of a method.

I found this while working on the augmentations: that formal parameters
have to have the same types in the introductory declaration, and in
augmentations.

Change-Id: Ie4e92ebd0cd0204c4ba80200a9497e95859cc3e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 09:51:14 -07:00
Konstantin Shcheglov 55dcbad483 Augment. Hide augmentation recovery elements from signatures
Do not expose recovery type parameter and formal parameter elements
through the public element model. Recovery fragments are still needed
internally to link augmentation chains with mismatched shapes, but they
should not change the effective arity or callable signature of the
declaration being augmented.

Filter fragments marked as originating from another enclosing fragment
when computing executable formal parameters, executable type parameters,
and instance type parameters. This keeps function types, class arity,
and constructor or method signatures based on the real declaration
rather than on synthetic recovery elements introduced for invalid
augmentations.

Change-Id: I455a8a18bc07cdae30006754e069d687659aab1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510182
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 09:34:12 -07:00
Konstantin Shcheglov b6785856fe CQ. Remove stale tests.
These are either ancient syntax, or are about Object and actually not
checked, and there is no reason to check.

Change-Id: I5869aeea4012c6dee0bc158337eecf02e479c365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 09:31:01 -07:00
Johnni Winther 1109842c55 [cfe][PrimaryConstructor] Avoid leak of default value token
This changes to handling of default value tokens on primary constructor fields to eager read the token of the fragment. This avoid leaking the token when field type inference isn't needed for the declared field.

Change-Id: I1cd7a2de7020bd403b843e1f0a456ab26a98e5ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510342
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2026-06-09 06:20:23 -07:00
Jens Johansen ba90c83168 [parser] Mark a few methods for inlining
Some recent changes to the parser looked like they should have cost
basically nothing but ended up costing a little bit anyway.
This CL marks the new functions for inlining recovering at least some of
the cost.

Change-Id: I599d557eb25bee892c8975d794618e837fec0caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510320
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-06-09 05:41:32 -07:00
Johnni Winther ac477b9233 [cfe][InternalNodes] Add more internal nodes
This adds internal nodes for VariableStatement, VariableDeclaration, Let, and ForStatement. The prepares for separating Variable from InternalVariable and allows for the removal of Variable.asVariableDeclaration.

Change-Id: Ib0593f64b3d22ce99c187ab4af32c8dc8cbea6e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509980
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-06-09 05:27:48 -07:00
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
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
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
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
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
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
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
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