Commit Graph

193 Commits

Author SHA1 Message Date
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 4629bff7e9 Augment. Report extensionTypeAugmentationSpecifiesRepresentationField.
Add a syntactic diagnostic for extension type augmentations that declare
representation fields. Extension type augmentations may augment the
declaration, but they must not redeclare the representation.

Thread an explicit parser option through primary constructor parsing so
extension type augmentations can omit a representation without producing
the usual missing-primary-constructor diagnostics, while still reporting
an error when a representation is present.

Register the new diagnostic in the shared and analyzer generated
diagnostic tables and add it to fix status tracking.

Change-Id: I84815bb0669a76126564e590760e93096a3af046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-22 17:36:54 -07:00
Johnni Winther 01a26f9022 [parser][cfe][analyze][PrimaryConstructors] Error recovery for primary constructors on mixins and extensions
This adds error recovery for mixin and extension declarations with primary constructors. This avoids cascading errors when primary constructors are used with these declarations which do not support primary constructors.

Closes #63157

Change-Id: I17bfab4a7eabac1c75e7cfb580295dcf619c991d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-05-01 01:50:43 -07:00
Jens Johansen 4ee8852d77 [CFE/parser] Update 'end' on endLiteralString; Set offset of StringConcatenation to the start; rename 'token' to 'operatorToken' on endBinaryPatterns
* The 'end' token on endLiteralString is now the last token of the
   string, not the next unrelated token.
 * Set the offset of StringConcatenation to the start of the string,
   not the start of the next unrelated token.
 * The 'end' token on endBinaryPatterns is renamed to 'operatorToken'.

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

Tested: Existing
Change-Id: Iae788464008594c21e759570a626971d89688033
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498601
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-04-30 01:05:23 -07:00
Johnni Winther 5b0def4a87 [parser][Augmentations] Remove support for macro class and import augment
These were part of the macros experiments which has been cancelled.

Change-Id: I14071bc8e86025f273a533c313a3194c8eae5190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-04-16 02:25:05 -07:00
Konstantin Shcheglov e7c6654312 Augment. Allow abstract top-level variables.
Permit `abstract` on top-level variable declarations when the
augmentations feature is enabled. Previously the parser always reported
`abstract` as extraneous at the top level, which rejected valid syntax
and dropped the modifier before later stages could see it.

Thread the abstract token through top-level field parsing, record it on
`TopLevelVariableDeclaration`, and pass it through the front-end
builders. Reorder the field callback arguments so `augment` precedes
`abstract`, matching the augmentation grammar for incomplete top-level
variables and keeping the parser, listener, and outline plumbing
consistent.

Change-Id: I680414a746b707d483e485702685c95f28a9c9ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494564
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-04-14 16:12:24 -07:00
Johnni Winther beff8b11f2 [cfe][PrimaryConstructors] Avoid creating tear-off lowering for abstract classes
A flag that tells whether constructor is in an abstract class, enum or mixin was not correctly passed for primary constructors. This flag determines whether constructor tear-off lowerings are created for backends that use this, such dart2js and dartdevc.

The parser listener is updated to pass a DeclarationKind for primary constructors, similar to what is already done for regular constructors. The enable the CFE to pass the correct flag.

Change-Id: I114417795ae276dfeab9f10a0b0fcbcd2dbfc00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2026-03-26 00:57:59 -07:00
Paul Berry 69a1a497f1 [messages] Stop using withArgumentsOld, batch 32.
This is one of several planned batches of changes to transition the
front end (and related packages) away from the old `withArgumentsOld`
diagnostic reporting method, and to the new `withArguments`
method. The difference between the two is that `withArguments` has
named parameters rather than positional ones, so (a) it's less likely
for parameters to be mixed up, and (b) it's compatible with the
calling conventions used by analyzer diagnostics.

As part of this transition, I'm taking the opportunity to rename the
parameters themselves (since the names previously were restricted to a
very small set of possibilities based on type), and to document them
in `messages.yaml`. To avoid fatigue (both for myself and code
reviewers), I've chosen to break the change into many smaller batches.

The only changes in this CL that were manually written are those in
`messages.yaml`. The others were produced by running the standard
diagnostic message code generator, running the script
`use_new_with_arguments.dart`, and then updating front end parser
expectations.

Change-Id: I6a6a6964699f00e7e91af2e682ce1baa1846ca13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-02-04 10:05:41 -08:00
Paul Berry 50b4225636 [messages] Stop using withArgumentsOld, batch 31.
This is one of several planned batches of changes to transition the
front end (and related packages) away from the old `withArgumentsOld`
diagnostic reporting method, and to the new `withArguments`
method. The difference between the two is that `withArguments` has
named parameters rather than positional ones, so (a) it's less likely
for parameters to be mixed up, and (b) it's compatible with the
calling conventions used by analyzer diagnostics.

As part of this transition, I'm taking the opportunity to rename the
parameters themselves (since the names previously were restricted to a
very small set of possibilities based on type), and to document them
in `messages.yaml`. To avoid fatigue (both for myself and code
reviewers), I've chosen to break the change into many smaller batches.

The only changes in this CL that were manually written are those in
`messages.yaml`. The others were produced by running the standard
diagnostic message code generator, running the script
`use_new_with_arguments.dart`, and then regenerating front end parser
test expectations.

Change-Id: I6a6a696461f9184a42d646fab6a593bcb4abdf4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478000
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-02-03 14:17:32 -08:00
Paul Berry d579b03f71 [messages] Use withArguments for diagnostics translated by the analyzer.
Changes the `front_end` and `_fe_analyzer_shared` code that reports
the following diagnostics so that it uses `withArguments` rather than
`withArgumentsOld`:

- `expectedButGot`
- `expectedButGot2`
- `expectedAfterButGot`
- `expectedToken`
- `unmatchedToken`
- `constFieldWithoutInitializer`
- `finalFieldWithoutInitializer`
- `superclassHasNoMethod`
- `unavailableDartLibrary`
- `unsupportedPlatformDartLibraryImport`

These messages required special care because they are translated into
analyzer diagnostics by the analyzer method
`FastaErrorReporter.reportByCode`, and the logic to do the translation
depends on the exact parameter names used by the messages.

For some of the messages I've clarified the parameter names and
updated `FastaErrorReporter.reportByCode` accordingly. For others, I
left the parameter names as is.

Change-Id: I6a6a696481c75f4cbb198d1e012aa1ca4294ed61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476323
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-01-30 10:12:42 -08:00
Paul Berry e0ce42f22d [messages] Stop using withArgumentsOld, batch 5.
This is one of several planned batches of changes to transition the
front end (and related packages) away from the old `withArgumentsOld`
diagnostic reporting method, and to the new `withArguments`
method. The difference between the two is that `withArguments` has
named parameters rather than positional ones, so (a) it's less likely
for parameters to be mixed up, and (b) it's compatible with the
calling conventions used by analyzer diagnostics.

As part of this transition, I'm taking the opportunity to rename the
parameters themselves (since the names previously were restricted to a
very small set of possibilities based on type), and to document them
in `messages.yaml`. To avoid fatigue (both for myself and code
reviewers), I've chosen to break the change into many smaller batches.

The only changes in this CL that were manually written are those in
`messages.yaml`. The others were produced by running the standard
diagnostic message code generator and then running the script
`use_new_with_arguments.dart`.

Change-Id: I6a6a6964d05c7481d886252f77d5c90c9e63a155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-30 09:47:33 -08:00
Paul Berry ba40413d67 [messages] Stop using withArgumentsOld, batch 4.
This is one of several planned batches of changes to transition the
front end (and related packages) away from the old `withArgumentsOld`
diagnostic reporting method, and to the new `withArguments`
method. The difference between the two is that `withArguments` has
named parameters rather than positional ones, so (a) it's less likely
for parameters to be mixed up, and (b) it's compatible with the
calling conventions used by analyzer diagnostics.

As part of this transition, I'm taking the opportunity to rename the
parameters themselves (since the names previously were restricted to a
very small set of possibilities based on type), and to document them
in `messages.yaml`. To avoid fatigue (both for myself and code
reviewers), I've chosen to break the change into many smaller batches.

The only changes in this CL that were manually written are those in
`messages.yaml`. The others were produced by running the standard
diagnostic message code generator, then running the script
`use_new_with_arguments.dart`, then updating parser testcases by
supplying `-DupdateExpectations=true` to
`pkg/front_end/test/unit_test_suites.dart`.

Change-Id: I6a6a6964232d48c9e6d01accc31b5c5acbd9435f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476150
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-28 17:25:51 -08:00
Johnni Winther 0a154753c6 [parser][InternalNodes] Add handlePositionalArgument and handlePositionalRecordField
This [handlePositionalArgument] and [handlePositionalRecordField] methods to the parser listener, allowing listeners to normals arguments and record fields

Change-Id: I3947e196dafffea2ab383f797904c857db8327ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469620
Reviewed-by: Jens Johansen <jensj@google.com>
2026-01-06 02:30:12 -08:00
Johnni Winther 45679bcac9 [parser] Support new constructor syntax
This adds parser support of the new constructor syntax using `new` instead of the enclosing class name

Part of https://github.com/dart-lang/sdk/issues/61699

Change-Id: I3de50298e83f431c765a987435324b8c8931eef7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462042
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-11-19 03:05:01 -08:00
Johnni Winther 808b2512b4 [parser] Add beginConstructor
This adds a beginConstructor listener method and calls this before constructor instead of beginMethod. This makes it possible for listeners to fully separate handling of constructors from methods.

Change-Id: Ibcbcf76ccb6d97314d395c4c0efcb4f9d073519a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-11-18 05:26:52 -08:00
Johnni Winther d46bd8cf58 [parser] Merge parser listener endX methods
This merges endX methods for non-top-level members into endMethod, endConstructor, endFactory and endFields.

These methods now have a DeclarationKind parameter that can be used to distinguish them.

Change-Id: I458d37a70b6c7839612f7199dad95f9a61e76e7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462120
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-11-17 04:50:52 -08:00
Johnni Winther 7352e9c044 [parser] Remove getOrSet token from endXConstructor methods
These were never used and just confused implementations about what to handle.

Change-Id: I1fa4868e043a716b60bec107e4ba57018eee63be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460460
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-11-11 02:54:57 -08:00
Kallen Tu 2692a110f0 [parser] Declaring constructors - Parse primary constructor this body.
Added two listener calls `beginPrimaryConstructorBody` and
`endPrimaryConstructorBody` for parsing the `this` body.
No AST implementation has been done, only parsing.

Bug: https://github.com/dart-lang/sdk/issues/61699
Change-Id: I6aaf621bb3e67bfe00efe32de8097ca1e5048afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459901
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-11-07 13:14:13 -08:00
Johnni Winther a58eb47216 [parser] Support new factory constructor syntax
Part of https://github.com/dart-lang/sdk/issues/61699

Change-Id: I6afa9f4991d4b965a60d39e14618731a10a04a1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-11-07 00:45:41 -08:00
Johnni Winther be29db2621 [cfe] Update parser suites to use FolderOptions
This updates the parser suites to use the FolderOptions already used by other expectation tests. This aligns the support for configuration tests in particular wrt experimental flags.

As a consequence of this change, all parser suite enable patterns for parser. Since the test setup didn't use experimental flags previously, newly added tests didn't use the current default, which is with pattern support. Since we don't have any tests explicitly for non-pattern support, all tests are updated to support patterns as it at least aligns with the default for current and future code.

Change-Id: I80ee769b35e74a0d111135ca4690983872a63623
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459741
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-11-06 03:43:55 -08:00
Johnni Winther e055351442 [parser] Change enum listener calls
This aligns the call to `Listener.beginEnum*` with that of `Listener.beginClass*`. A `beginExtensionPrelude` is added, replacing the call to `beginUncategorizedTopLevelDeclaration` and matching the call to `beginClassOrMixinOrNamedMixinApplicationPrelude` for classes. `beginEnumDeclaration` and `endEnumDeclaration` replaces the `beginEnum`/`endEnum` pair, matching the calls to `beginClassDeclaration`/`endClassDeclaration` with the name and type parameters now available at `beginEnumDeclaration` similar to `beginClassDeclaration`. This helps supporting primary constructors in enums because the enclosing enum can be prepared in `beginEnumDeclaration` before calls to `endPrimaryConstructor`.

Change-Id: I9c1ad55db6e3fcc09ed5ac0c05f5d50db95ae608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458200
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2025-10-30 08:50:02 -07:00
Johnni Winther 02c3d9c3f0 [parser] Support declaring parameters
This allows `var int a` in primary constructors when the declaring constructors feature is enabled.

Part of https://github.com/dart-lang/sdk/issues/61699

Change-Id: I486ad8aa3ddbe09451455b024b3aa9cfbaa9a5e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-10-22 01:46:47 -07:00
Johnni Winther 49eb514005 [parser] Support primary constructor on classes, enums and extension types
This adds simple support for primary constructors in class, enum and extension type declarations. Declaring formals are not supported yet.

Change-Id: I2fb2cb3a819e38ec4ffe961da4713a871ac29a0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-10-17 01:52:11 -07:00
Jens Johansen 0dd06a287e [scanner] Better recovery for missing end brace in string interpolation
Previous recovery resulted in an outline change and very bad performance
as a result (e.g. in the analyzer).

This takes an analyzer server benchmark from:

```
$ out/ReleaseX64/dart-sdk/bin/dart pkg/analysis_server/tool/benchmark_tools/big_chain_benchmark/lsp_typing_temporarily_missing_end_brace_in_string_interpolation.dart --types=ImportCycleExportChain --sizes=1024
[...]
==================================
size 1024 / CodeType.ImportCycleExportChain:
Initial analysis: 16.173549
Completion after change: 7.824299
Fully done after change: 24.515470
peak virtual memory size: 3941 MB
total program size (virtual): 3941 MB
peak resident set size ("high water mark"): 2125 MB
size of memory portions (rss): 2125 MB
==================================
```

to

```
==================================
size 1024 / CodeType.ImportCycleExportChain:
Initial analysis: 16.989549
Completion after change: 0.332792
Fully done after change: 0.333113
peak virtual memory size: 3817 MB
total program size (virtual): 3635 MB
peak resident set size ("high water mark"): 1983 MB
size of memory portions (rss): 1803 MB
==================================
```

Change-Id: I38478acbd9b0449c6962da7543aa4bd39b22d004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-10-06 01:38:40 -07:00
Paul Berry 7edd29a89c [front_end] Convert an error message to use named arguments.
Modifies the scanner logic that reports the `AsciiControlCharacter`
error message so that it invokes it using `withArguments` (which
accepts named arguments) rather than the old `withArgumentsOld` (which
accepts positional arguments). The name of the parameter accepted by
this error message has been changed to `character`, to reflect its
usage, and parameter documentation has been added.

This is an exercise to verify that the front end's new `withArguments`
error reporting infrastructure is fully functional. In follow-up CLs,
I plan to introduce some tools to partially automate the process of
updating front end code to use `withArguments` rather than
`withArgumentsOld`.

However, if anyone wishes to start migrating error reporting to the
new scheme before that, they are welcome to do so.

Change-Id: I6a6a6964fc87d6bf551ec4891c56e6106dd9c098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448239
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-09-04 06:33:02 -07:00
Paul Berry ff5962306a [front end] Make code... objects usable as error templates.
This is part of a series of CLs that will standardize CFE error
reporting to always use `codeFoo.withArguments(...)` when reporting
errors that take arguments and `codeFoo` when reporting errors that
don't take arguments, rather than `templateFoo.withArguments(...)`
when reporting errors that take arguments and `messageFoo` when
reporting errors that don't take arguments. This change will have two
advantages:

- It will lend greater consistency to the CFE codebase, by allowing
  the same `code...` objects to be used both to name error codes
  (e.g., in test expectations) and to report errors. This will allow
  everything associated with a certain error code to be found using a
  single invocation of "Find References" in the editor, rather than
  having to search separately for uses of the code and the message or
  template.

- It should hopefully make the experience of writing code that reports
  errors more pleasant, since it will no longer be necessary to look
  up an error to see whether it takes arguments before using it;
  instead, the developer will be able to type the name of the message
  `code...` declaration, and then use autocompletion to see whether
  `.withArguments(...)` is required.

In this CL, the code generator for error messages is changed so that
both `template...` and `code...` declarations have the static type
`Template` (and, indeed, refer to the same constant
object). Previously, `code...` declarations had the static type
`Code`, and referred to a constant object with runtime type
`Code`. This will allow uses of `template...` to be replaced with
`code...`. In follow-up CLs, the uses of `template...` will be changed
to `code...`, and the `template...` declarations will be removed.

Since the `toString` methods on `Template` and `Code` differ, I had to
make some changes to ID tests and parser tests, both of which depend
on the behavior of `toString`:

- For ID tests, I was able to preserve the existing test expectations
  by modifying the `errorsToText` function (in
  `pkg/front_end/lib/src/testing/id_testing_utils.dart`).

- For parser tests, I wasn't able to find an easy way to preserve the
  existing test expectations, so I updated the expectations to match
  the new behavior.

Change-Id: I8a461d451b06dd2f88b3e59f0cb2153711b09461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442731
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-08-06 06:37:31 -07:00
Johnni Winther 9404899248 [parser] Split handleEndingBinaryExpression into handleDotAccess and handleCascadeAccess
This splits handleEndingBinaryExpression into two new listeners handleDotAccess for `.` and `?.` access and handleCascadeAccess for `..` and `?..`, both with an explicit `isNullAware` flag.

This is a step towards handling `a.b` different from `a + b` in the parser such that listeners don't have to create a value for `b` the works in both use cases; in the first is just a named operation performed on the receiver, whereas in the second case it is a full expression in its own right.

Change-Id: I04ec80401f8f2dbb8dffa86543c434e530b18cf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442821
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2025-07-31 02:02:28 -07:00
Jens Johansen 04096b9891 [parser] Shortcut more common cases in parseArgumentsRest
A few more common cases: "<identifier> <period> <identifier> <comma>",
"<identifier> <period> <identifier> <end parens>", "<string> <comma">
and "<string> <end parens>".

pkg/analyzer/lib/src/dart/ast/ast.dart:

JIT (tokens per microsecond):
4.8482% +/- 1.4622% (1.11 +/- 0.34) (22.92 -> 24.03)

AOT (tokens per microsecond):
4.5974% +/- 1.6421% (1.40 +/- 0.50) (30.53 -> 31.94)

Benchmarker (AOT):
```
msec task-clock:u: -4.7108% +/- 2.0520% (-124.92 +/- 54.41) (2651.72 -> 2526.80)
cycles:u: -4.7512% +/- 2.0346% (-546787446.10 +/- 234152251.09) (11508497283.00 -> 10961709836.90)
instructions:u: -4.5849% +/- 0.0000% (-1115885935.90 +/- 1109.34) (24338242436.20 -> 23222356500.30)
seconds time elapsed: -4.7090% +/- 2.0523% (-0.12 +/- 0.05) (2.65 -> 2.53)
seconds user: -4.8217% +/- 2.0991% (-0.13 +/- 0.06) (2.63 -> 2.51)
```


pkg/front_end/lib/src/type_inference/inference_visitor.dart:

JIT (tokens per microsecond):
11.5950% +/- 3.4217% (1.96 +/- 0.58) (16.91 -> 18.87)

AOT (tokens per microsecond):
11.7128% +/- 1.4863% (2.61 +/- 0.33) (22.32 -> 24.94)

Benchmarker (AOT):
```
msec task-clock:u: -8.9523% +/- 0.8309% (-244.45 +/- 22.69) (2730.57 -> 2486.12)

page-faults:u: 0.0503% +/- 0.0216% (5.00 +/- 2.14) (9933.10 -> 9938.10)
cycles:u: -9.0605% +/- 0.8306% (-1075717286.20 +/- 98615789.63) (11872662784.50 -> 10796945498.30)
instructions:u: -13.7568% +/- 0.0000% (-3608232664.50 +/- 836.10) (26228691068.30 -> 22620458403.80)
branch-misses:u: 6.9875% +/- 4.6549% (2539140.50 +/- 1691509.92) (36338407.60 -> 38877548.10)
seconds time elapsed: -8.9450% +/- 0.8300% (-0.24 +/- 0.02) (2.73 -> 2.49)
seconds user: -8.9919% +/- 0.8899% (-0.24 +/- 0.02) (2.71 -> 2.47)
```
Change-Id: I207a35d8107ba1604646e387e590aa19a4ccd996
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439900
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-07-31 00:41:31 -07:00
Jens Johansen 59f19d8771 [parser] Shortcut common case in parseArgumentsRest
Observation: Often when about to call parseExpression in
parseArgumentsRest we see either "<identifier> <comma>" (say, we're
passing a variable) or "<identifier> <end parens>" (same case, but last
argument).

This CL allows us to shortcut such cases avoiding a lot of calls where
we check if it's other cases which it isn't.

pkg/analyzer/lib/src/dart/ast/ast.dart:

JIT (tokens per microsecond):
5.5605% +/- 4.0086% (1.16 +/- 0.84) (20.94 -> 22.10)

AOT (tokens per microsecond):
7.1788% +/- 2.5682% (2.04 +/- 0.73) (28.44 -> 30.48)

Benchmarker (AOT):
```
msec task-clock:u: -4.4173% +/- 1.7793% (-124.29 +/- 50.07) (2813.81 -> 2689.52)
page-faults:u: 0.1064% +/- 0.0131% (10.90 +/- 1.35) (10246.00 -> 10256.90)
cycles:u: -4.4718% +/- 1.7882% (-546472914.30 +/- 218528412.28) (12220314431.60 -> 11673841517.30)
instructions:u: -10.0011% +/- 0.0000% (-2704578213.40 +/- 1611.58) (27042820700.90 -> 24338242487.50)
seconds time elapsed: -4.4160% +/- 1.7779% (-0.12 +/- 0.05) (2.82 -> 2.69)
seconds user: -4.6324% +/- 1.8285% (-0.13 +/- 0.05) (2.80 -> 2.67)
```


pkg/front_end/lib/src/type_inference/inference_visitor.dart:

JIT (tokens per microsecond):
10.1981% +/- 1.2476% (1.58 +/- 0.19) (15.46 -> 17.04)

AOT (tokens per microsecond):
8.7843% +/- 1.5781% (1.79 +/- 0.32) (20.42 -> 22.22)

Benchmarker (AOT):
```
msec task-clock:u: -5.9322% +/- 2.7532% (-181.01 +/- 84.01) (3051.38 -> 2870.37)

page-faults:u: 0.0352% +/- 0.0261% (3.50 +/- 2.59) (9930.90 -> 9934.40)
cycles:u: -6.0726% +/- 2.7273% (-805818237.40 +/- 361907438.70) (13269703092.60 -> 12463884855.20)
instructions:u: -11.9540% +/- 0.0000% (-3561054138.90 +/- 1016.14) (29789745342.80 -> 26228691203.90)
seconds time elapsed: -5.9310% +/- 2.7520% (-0.18 +/- 0.08) (3.05 -> 2.87)
seconds user: -6.1531% +/- 2.7477% (-0.19 +/- 0.08) (3.03 -> 2.85)
```
Change-Id: Ia4fbdcbd438a38a0c07b3f4423812ef3507b626c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-07-31 00:41:03 -07:00
Jens Johansen 86b65842ed [parser] Manually inline 'isNextIdentifier'
pkg/analyzer/lib/src/dart/ast/ast.dart:

JIT (tokens per microsecond):
2.1064% +/- 1.6771% (0.44 +/- 0.35) (20.97 -> 21.42)

AOT (tokens per microsecond):
No change.

Benchmarker (AOT):
```
msec task-clock:u: -1.2559% +/- 0.6202% (-35.75 +/- 17.65) (2846.58 -> 2810.83)
cycles:u: -1.3051% +/- 0.6113% (-161347113.30 +/- 75579075.11) (12362747585.00 -> 12201400471.70)
instructions:u: -0.6245% +/- 0.0000% (-169931728.50 +/- 1390.09) (27212753414.40 -> 27042821685.90)
seconds time elapsed: -1.2465% +/- 0.6111% (-0.04 +/- 0.02) (2.85 -> 2.81)
seconds user: -1.3083% +/- 0.7709% (-0.04 +/- 0.02) (2.83 -> 2.79)
```


pkg/front_end/lib/src/type_inference/inference_visitor.dart:

JIT (tokens per microsecond):
No change.

AOT (tokens per microsecond):
No change.

Benchmarker (AOT):
```
instructions:u: -0.9284% +/- 0.0000% (-279155451.00 +/- 502.76) (30068900827.90 -> 29789745376.90)
```

Change-Id: I70eaae39d156f77e5e451a8592f6f3dab2da3d67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439780
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-07-30 07:13:16 -07:00
Jens Johansen 752b760308 [parser] notEofOrValue -> notEofOrType - skip string comparison
A small one.

pkg/analyzer/lib/src/dart/ast/ast.dart:

JIT (tokens per microsecond):
1.7597% +/- 1.4621% (0.37 +/- 0.30) (20.79 -> 21.15)

AOT (tokens per microsecond):
2.2547% +/- 1.6761% (0.62 +/- 0.46) (27.67 -> 28.30)

Benchmarker (AOT):
```
msec task-clock:u: -2.4779% +/- 1.3546% (-73.29 +/- 40.07) (2957.87 -> 2884.58)
cycles:u: -2.6238% +/- 1.3918% (-337224094.10 +/- 178886541.74) (12852601263.80 -> 12515377169.70)
instructions:u: -0.9484% +/- 0.0000% (-260552753.00 +/- 375.88) (27473305680.40 -> 27212752927.40)
branch-misses:u: -8.7134% +/- 6.9328% (-3191115.20 +/- 2538992.37) (36623085.10 -> 33431969.90)
seconds time elapsed: -2.4691% +/- 1.3512% (-0.07 +/- 0.04) (2.96 -> 2.89)
seconds user: -2.4294% +/- 1.3675% (-0.07 +/- 0.04) (2.93 -> 2.86)
```


pkg/front_end/lib/src/type_inference/inference_visitor.dart:

JIT (tokens per microsecond):
No change.

AOT (tokens per microsecond):
No change.

Benchmarker (AOT):
```
msec task-clock:u: -4.3099% +/- 1.9546% (-136.28 +/- 61.81) (3162.10 -> 3025.81)
cycles:u: -4.3066% +/- 1.9530% (-592061704.80 +/- 268488936.68) (13747787475.20 -> 13155725770.40)
instructions:u: -0.5194% +/- 0.0000% (-156988901.90 +/- 1876.14) (30225890142.20 -> 30068901240.30)
branch-misses:u: -14.2999% +/- 7.5350% (-6167339.80 +/- 3249736.99) (43128654.50 -> 36961314.70)
seconds time elapsed: -4.3098% +/- 1.9527% (-0.14 +/- 0.06) (3.16 -> 3.03)
seconds user: -4.3252% +/- 1.9575% (-0.14 +/- 0.06) (3.14 -> 3.01)
```

Change-Id: Ib70398e337c482f7427debb6875e2c17ccc6bd0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439740
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-07-30 07:06:17 -07:00
Johnni Winther dced5e0482 [cfe] Add LocalTypeParameterScope
This cleans up the LocalScope interface and the handling of named function expressions.

Change-Id: Id0432910a9e65d8ae966dfab67c66248639d241a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419842
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-04-03 03:43:30 -07:00
Jens Johansen 69b32f97ba [parser] More 'typing' parser tests (with missing end-braces)
Fixes issue when "good" braces are on the same line but the (e.g.) `if`
is on another line.

Change-Id: I3e78a4c557f596eb62b51546927ee0076c8b1a82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417163
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-03-24 02:38:53 -07:00
Jens Johansen 5ba5934201 [scanner] Specialized scanner recovery for missing end curly brace
*TL;DR*

This improves scanner recovery for a missing `}` in certain situations,
reducing the risk of an in-body change causing a (temporary) outline
change (which in turn could result in the analyzer becoming unresponsive
for "no reason").

*Details*

The behavior of IntelliJ is that when typing `{` it only inserts a
matching end brace `}` when hitting enter.

Imagine you are typing an if: `if (1 + 1 == 2) {`, where you don't hit
enter quickly enough and you trigger a re-analysis at this point.

What happens then is that every method below where you are typing looks
to be local function declarations and thus the outline change. When the
outline change the analyzer has to do a lot of work: everything
(transitively) depending on the file has to be recompiled, and every
strongly connected component is compiled "in one go" where the analyzer
can't respond to queries. So if you have one or more large strongly
connected components depending on the file, or the file itself is part
of such a chain, you will (or at least might) experience that the
analyzer is slow to respond, and it will be extra puzzling because
logically you're just doing an in-body change.

For some code the user might not even naturally hit enter, e.g. `var foo
= {"I'm", "a", "set"};`.

The recovery in the scanner has always been that - upon reaching the end
of the file - it sees that we're missing a `}` and it inserts it at the
end. This CL instead tries to figure out a better place to insert it,
and if successful, will rerun the scanner, instructing it to insert it
at the better place and (hopefully) avoiding a subsequent outline
change.

It does this by looking at the indentation - which is new for recovery -
and under the assumption that the indentation was correct before, will
find the position where the start curly brace was inserted. Note that if
it finds a position it will always be between the start curly brace (the
one missing the end curly brace) and the end of file, and inserting the
missing curly end brace there can't really be "more wrong" than
inserting it at the end (if the new place is not correct it's just
"still wrong").

In the benchmark added we see how quickly we can get completion after
having typed `if (1+1==2) {`, then adding `\n ge\n}` and requesting
completion on the `ge` part, i.e. a simulation of typing

```
if (1+1==2) {
  ge
}
```

and asking for completion at the `ge`.

The change in this CL - on cycles of size 1024 - caused the time to
completion response to come in between ~5 times faster (going from ~10.2
to ~2.1 seconds) to ~18 times faster (going from ~10.3 seconds to ~0.56
seconds):

`CodeType.ImportExportCycle` goes from:

```
+------+-----------+------------+
| Size |  Initial  | Completion |
+------+-----------+------------+
|   16 |  2.019581 |    0.97504 |
|   32 |  3.028976 |   1.031008 |
|   64 |  4.422884 |   1.198383 |
|  128 |  7.612125 |   1.597091 |
|  256 | 12.860864 |   2.906553 |
|  512 | 24.391894 |   5.017093 |
| 1024 | 48.390993 |  10.243085 |
+------+-----------+------------+
```

to

```
+------+-----------+------------+
| Size |  Initial  | Completion |
+------+-----------+------------+
|   16 |  2.107213 |   0.661066 |
|   32 |  3.012952 |    0.70554 |
|   64 |  4.682508 |   0.731176 |
|  128 |  7.508434 |   0.745501 |
|  256 | 13.105477 |   0.852413 |
|  512 | 24.520184 |   1.278403 |
| 1024 | 48.804348 |    2.11903 |
+------+-----------+------------+
```

and `CodeType.ImportExportChain` goes from:

```
+------+-----------+------------+
| Size |  Initial  | Completion |
+------+-----------+------------+
|   16 |  2.059196 |   0.892082 |
|   32 |  3.080717 |    0.93232 |
|   64 |  4.647163 |   1.240303 |
|  128 |  7.377035 |   1.674859 |
|  256 | 12.939432 |   2.705483 |
|  512 | 24.529501 |    5.02689 |
| 1024 | 47.713553 |  10.385469 |
+------+-----------+------------+
```

to

```
+------+-----------+------------+
| Size |  Initial  | Completion |
+------+-----------+------------+
|   16 |  2.020809 |   0.709643 |
|   32 |  3.106856 |   0.648818 |
|   64 |  4.503067 |   0.593152 |
|  128 |   7.45692 |   0.622423 |
|  256 | 13.140592 |   0.606948 |
|  512 | 24.933216 |   0.612687 |
| 1024 | 50.167541 |   0.567544 |
+------+-----------+------------+
```

Change-Id: I8dbefe215162d00a209206ae3db83b2b17505853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415581
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-03-20 01:58:45 -07:00
Jens Johansen e30f60791a [parser] Don't use the next token as the end on handleSend
Change-Id: Ic4bacffab3fdd9d23bea9b1ecd0f2cfdecb82e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399060
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-12-05 15:10:34 +00:00
Jens Johansen 67ead166f5 [parser/CFE] Better recovery of partial missing type arguments on type; fix CFE crash
Change-Id: Ifd43ca5b5167e8bacf36e7b89ed8ab57362635b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399040
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-05 15:04:00 +00:00
Jens Johansen 0b07f2ebae [parser] Better recovery on variable declaration with missing name before type parameter
Change-Id: Ie3e2995748c6f36c2cd98235658cbadfc53157a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394303
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-11-13 08:41:41 +00:00
Jens Johansen a0c4efddb8 [parser] Don't try to parse a function literal when in a continuation
Fixes https://github.com/dart-lang/sdk/issues/49477

Change-Id: Ie290a1af08ecc5c2cd270af21adeb43943ec289b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-11-12 08:16:42 +00:00
Jens Johansen 0512c58348 [parser] Use allowCascades when calling parseThrowExpression in _parsePrecedenceExpressionLoop instead of just false
For now, see what happens.

Bug: https://github.com/dart-lang/sdk/issues/54284
Change-Id: I8e9f081ae3aa5caff7e155ef628e90547cc8afe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392561
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-11-11 09:08:40 +00:00
Jens Johansen 817882c36b [parser] Recover missing identifier in new style typedef
Before, when parsing a new style typedef without an identifier (e.g.
`typedef = whatnot`) it concluded that the token after the equal-sign
wasn't an equal sign an that it thus had to be an old style typedef,
followed by recovery there.

This CL makes the recovery insert an identifier after `typedef` (what
the recovery of the old style actually did too), and then parse it as a
new style typedef.

This causes the previous many errors to just be `Expected an identifier,
but got '='.`

It is furthermore verified that the parsing of such a case is ~the same
as when having an indentifier.

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

Change-Id: I5cde1f29839555b1d6027a7d040dc6f60ac614a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-11-04 11:18:38 +00:00
Jens Johansen 329760d5cf [cfe/parser] Parser doesn't set wrong endToken on handleThrowExpression; fix cfe coverage related to that
Change-Id: Ie1f936d1b914f38a819b3761770742c60d9be1e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392121
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-10-28 12:08:50 +00:00
Jens Johansen 8c5dce6994 [parser] Replace optional/optional2/isOneOf/isOneOfOrEof with extension method calls
The entire scanner/parser now no longer uses `optional` or `optional2`,
the latter being completely removed.

Furthermore, when compiling a fixed version of the CFE with the CFE
this CL reduces the instructions used by ~13.6 mio.

```
page-faults:u: -0.3695% +/- 0.0676% (-384.20 +/- 70.23)
instructions:u: -0.0645% +/- 0.0007% (-13671097.80 +/- 153289.78)
```

Change-Id: Ib93dd2983aa1b4df0610d099010ac10f55f357f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388323
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-10-09 12:11:50 +00:00
Jens Johansen a086649e42 [scanner] Support 0-byte in input
Fixes https://github.com/dart-lang/sdk/issues/18090

Change-Id: I9bcd49c9ade7923eb087c5dd617a2f33cc84ee96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386161
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-09-25 09:15:19 +00:00
Johnni Winther cd236ece98 [parser] Add enclosingDeclarationName to beginMethod
This adds the enclosingDeclarationName to the beginMethod of the
parser listener.

This enables the removal BuilderFactory.currentTypeParameterScopeBuilder.

Change-Id: Ie2bec9432c20b8bdbd62a14e8a65c272179d4698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383182
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-09-05 07:40:09 +00:00
Johnni Winther bf3c716f36 [cfe] Create FunctionTypeParameterBuilder for function types
This changes the BodyBuilder to create FunctionTypeParameter instead
of FormalParameterBuilder for "parameters" in function types. This
avoids the creation of unnecessary VariableDeclaration nodes
function types.

The types of these VariableDeclarations where created before the type
variable scope was completed, introducing an artificial dependency on
the pending nullability computation.

Change-Id: Ie1203fa4c78a27f3e7a0dfad16725cbbde24a6a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381143
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-08-22 08:23:05 +00:00
Chloe Stefantsova a4c94716ba [analyzer][cfe] Introduce parsing for null-aware elements
Part of https://github.com/dart-lang/sdk/issues/55949
Closes https://github.com/dart-lang/sdk/issues/55954

Change-Id: I885772f292f6d70425d6eba15bad8b0c6dc86a1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370240
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-28 09:49:30 +00:00
Jens Johansen 5359af23a3 [parser] Add endToken on endSwitchExpressionCase, beginToken on endSwitchExpressionCase
Change-Id: I53c6bae47feb2d4570471a3b91c8e371838fcff5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-27 05:47:18 +00:00
Jens Johansen 40dad48ede [parser] Add more tokens
Add
 * endToken to endBinaryExpression
 * endToken to handleEndingBinaryExpression
 * endToken to endConditionalExpression
 * beginToken (and rename to endToken) on handleExpressionStatement
 * rightSeparator to handleForLoopParts

Change-Id: I55d5a0e6c795b82d8f3480365e4cc3fbb59c65b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372482
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 08:12:41 +00:00
Jens Johansen 5d352e6627 [parser] Add begin and/or end to endElseStatement, endIfStatement, endThenStatement, endTryStatement
Change-Id: I27b7241665042a7fae6dc4c7d4192da9ce141b3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-19 06:12:00 +00:00
Konstantin Shcheglov 52999d58b6 Augment. Parse 'augment' for typedef.
Change-Id: I3d8c583bd5a20ded9e8004574314f0d3a076d649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364940
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-04-30 15:51:25 +00:00