Konstantin Shcheglov
8779d4e9a7
Breaking changes for analyzer version 14.0.0
...
Change-Id: I3bd6b1bbf60bb1b45f46e62ebf448f27f103f98e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2026-06-11 11:59:47 -07:00
Kallen Tu
0f9e6da044
API - Deprecate the excludedPaths parameter in AnalysisContextCollection.
...
Path exclusions should ideally be defined inside a project's
`analysis_options.yaml` file, rather than being added programatically.
Plus, there's a bug with the constructor that causes this parameter to
be completely ignored anyways, so it's been obsolete and non-functional
for a while now. `getExcludedGlobs` in the `_ContextLocator` handles
parsing and adding excluded paths from the analysis server already, so
we should look into deprecating and removing this parameter.
Change-Id: I6c023041c7bb5fa4cb9dedc629afa4ea6ecb63d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511160
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 11:15:16 -07:00
Konstantin Shcheglov
dbeb7e1e5b
Prepare to publish analyzer 13.3.0, _fe_analyzer_shared 103.0.0, analysis_server_plugin 0.3.18, analyzer_plugin 0.14.12, analyzer_testing 0.3.2
...
Change-Id: I0a5bf96733f2908160a6ef2ee99f54ef25f11547
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2026-06-11 10:59:52 -07:00
Konstantin Shcheglov
4b10d3e1d3
CQ. Remove GatheringDiagnosticListener.
...
Change-Id: I1d45d3ea4bf0e556851bf943b95076c11158d9cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511300
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2026-06-11 10:52:47 -07:00
Konstantin Shcheglov
47ba94ebea
CQ. Switch ErrorReporterTest to simpler RecordingDiagnosticListener.
...
Change-Id: Iaf5a243ed0b35c369e254e5541448aab06c48b6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511280
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 10:51:44 -07:00
Konstantin Shcheglov
4473de2a5d
CQ. Use inline expected diagnostics in PubspecDiagnosticTest(s).
...
Change-Id: Id6f8305c0f5e92ee48cf9c0ac1adc5c2e3a2d490
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511240
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 09:51:05 -07:00
Konstantin Shcheglov
c3c2986b82
CQ. Remove low value test/src/lint/lint_rule_test.dart
...
These tests only checked that MultiAnalysisRule.reportAtNode / reportAtToken
forward the supplied DiagnosticCode into DiagnosticReporter.
Change-Id: Iade193431ab28ff4c2ac5f9f77874f1dd3c821cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511200
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 08:59:53 -07:00
Konstantin Shcheglov
96c0be6601
CQ. Simplify LineInfoTest, stop using GatheringDiagnosticListener.
...
Change-Id: I7d859f80eb36b9d2e29ccdd013bcdc4c04ed8219
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2026-06-11 08:55:58 -07:00
Konstantin Shcheglov
d22b566c31
CQ. Migrate ManifestValidatorTest to inline expected diagnostics.
...
Change-Id: I499057965ea93aae9f550b9a383033ea6072db41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511140
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 07:53:15 -07:00
Konstantin Shcheglov
be4df1a869
API. Add Folder.getFile/Folder, deprecate getChildAssumingFile/Folder
...
This aligns names with ResourceProvider.getFile/Folder.
Change-Id: I30383ef1fa6f7cbe60b187338e25b8ca75806730
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511120
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jonas Jensen <jonasfj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 07:46:21 -07:00
Konstantin Shcheglov
649a56d6e4
CQ. Switch analysis options tests to inline expected diagnostics.
...
Change-Id: I2c33dbd645bd8611836cbcbab597a23165d1fb9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511060
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-11 07:45:07 -07:00
Konstantin Shcheglov
78f9ab6cb8
Start analyzer 13.3.0-dev, analyzer_plugin 0.14.12-dev, analyzer_testing 0.3.2-dev, analysis_server_plugin 0.3.18-dev
...
Change-Id: I2a9e762e2f5b3fd4762ee0d0eb22296db0f3dff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2026-06-10 13:03:15 -07:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Konstantin Shcheglov
9c69609406
Augment. Rename ExecutableFragmentImpl.isCompleteDeclaration to isComplete.
...
Change-Id: I47d70e93da6e16e4019d61cf62533aba7818b7c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509140
Reviewed-by: Paul Berry <paulberry@google.com >
2026-06-03 18:05:12 -07:00
Konstantin Shcheglov
d54a54d976
Augment. Rename FragmentImpl.isCompleteDeclaration to isComplete, text only.
...
Change-Id: I12bbec91d0498ba4a2cc428e3a2321875fcdba5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509101
Reviewed-by: Paul Berry <paulberry@google.com >
2026-06-03 18:03:42 -07:00
Sam Rawlins
5a94256582
meta: Introduce TargetKind.importDirective
...
Fixes https://github.com/dart-lang/sdk/issues/63467
Change-Id: I02f048405878d9ca578f8cbea318c59697f2811b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2026-06-03 13:34:57 -07:00
Konstantin Shcheglov
22f451c4ac
CQ. Use assertDartObjectText() with raw multi-line string in more places.
...
Replace ad hoc assertions over DartObjectImpl with
assertDartObjectText() in constant evaluation and resolution tests. This
makes the expected constant value shape explicit, including invalid
results, variables, constructor invocations, type arguments, and
superclass fields, instead of checking only selected fields.
Use raw multi-line strings for these expectations so expected text can
be copied and maintained consistently without escaping interpolation or
other Dart string syntax.
Remove the now-unused null assertion helper and analyzer implementation
imports that were only needed by the direct assertions.
Change-Id: Ib734c1d428dd69104403484534b60af918944d13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508705
Reviewed-by: Paul Berry <paulberry@google.com >
2026-06-03 11:13:59 -07:00
Konstantin Shcheglov
f8ef9fdb61
Patterns. Fix for parsing nested pattern assigment: 'v2 = (v1) = 0'.
...
Change-Id: I4b3460dd57834eb52b4703c983ca6f8ed60fe270
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508684
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2026-06-03 08:52:55 -07:00
Konstantin Shcheglov
d8fab3228b
Augment. Support for function-typed formal parameters in augmentations.
...
Change-Id: I665810aaeeb96dceb0045c98d426493a0fc75892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507960
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2026-06-02 12:24:36 -07:00