Commit Graph

1829 Commits

Author SHA1 Message Date
Paul Berry 6c5c9d384f [sound flow analysis] Implement behaviors for is and as.
This change updates the flow analysis logic for `is` and `as`
expressions so that when the language feature `sound-flow-analysis` is
enabled, the static type of the operand is compared to the type to the
right of the `is` or `as` keyword. If one of the types is non-nullable
and the other type is `Null`, then the type test is known to fail. For
an `as` expression, this means that the code path following the
expression will be marked as unreachable. For an `is` expression, this
means that any code paths that assume it evaluates to `true` will be
marked as unreachable.

Note that these new behaviors break assumptions made by three
pre-existing flow analysis tests. I was able to adjust one of the
tests ("equalityOp_end does not set reachability for `this`") to
preserve its old behavior. The other two tests became redundant, so I
removed them.

There is no behavioral change if the feature `sound-flow-analysis` is
disabled.

Bug: https://github.com/dart-lang/sdk/issues/60438
Change-Id: Ib3a9e96bd39cf7df4c6c297568763c0f25bc9e39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420164
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-04-04 12:11:58 -07:00
Paul Berry 08154451d5 [_fe_analyzer_shared] Use TypeAnalyzerOptions to configure flow analysis.
Previously, flow analysis was configured by passing a set of named
booleans to its constructor, each to enable or disable a separate
language feature.

This change merges the flow analysis configuration with the
`TypeAnalyzerOptions` class (which was already being used for
configuring the shared `TypeAnalyzer` class). This should make it
easier to add language features to the shared code base in the future,
since there will be one common place where all features will be
configured.

To avoid duplicating the logic that creates `TypeAnalyzerOptions`,
I've had to do a bit of minor surgery to the clients:

- In the test harness in `_fe_analyzer_shared`, there is a common
  method (`Harness.computeTypeAnalyzerOptions`) that constructs
  `TypeAnalyzerOptions` based on the harness configuration. It is
  called from a few different tests.

- In `pkg/analyzer`, there is a common method
  (`computeTypeAnalyzerOptions`) that constructs `TypeAnalyzerOptions`
  based on a `FeatureSet`. It is used by
  `LibraryAnalyzer.analyzeForCompletion`,
  `LibraryAnalyzer._resolveFile`, and the late variable
  `AstResolver._typeAnalyzerOptions`.

- In `pkg/front_end`, I've moved computation of `TypeAnalyzerOptions`
  from the `InferenceVisitorImpl` constructor to the
  `TypeInferrerImpl` constructor; the options are then passed to the
  `InferenceVisitorImpl` by `_createInferenceVisitor`.

I'm doing this work now as preparation for adding support for sound
flow analysis (https://github.com/dart-lang/sdk/issues/60438), so that
I can add the logic to enable it in a clean way.

Bug: https://github.com/dart-lang/sdk/issues/60438
Change-Id: Ib845194adb404b4c0a3feeff17a14ae641d515eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-04-03 11:56:51 -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
Paul Berry 67113cf257 [flow analysis] Rename SsaNode.getOrCreatePropertyNode.
The old name (`getProperty`) was unclear because (a) the thing being
returned isn't the property itself but the property's SSA node, and
(b) it didn't give any indication that if the property node was not
present, it would be created.

Thanks to Konstantin for pointing this out.

Change-Id: Ib64315b0bb635545c0ee9253c965277c391f36c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-03-28 15:44:56 -07:00
Paul Berry 6446cce249 [_fe_analyzer_shared] Rename isNever to isBottomType.
This operation was mis-named. Its actual behavior is to check whether
the given type is a bottom type.

Thanks to Lasse for pointing this out (see
https://github.com/dart-lang/language/issues/4304#issuecomment-2761576720).

Change-Id: I6bb1ce459c09a16f6b0466f5081977358e21fb74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-03-28 10:57:20 -07:00
Paul Berry 82420ba66c Add experimental feature flag sound-flow-analysis.
All work on https://github.com/dart-lang/language/issues/3100 (Change
flow analysis to assume sound null safety once unsound null safety
support is fully removed) will be guarded by this flag.

Bug: https://github.com/dart-lang/language/issues/3100
Change-Id: I0a6e7b732520ed70944141b4bb02832b7d0d969b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417906
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-03-27 15:19:31 -07:00
Kallen Tu af51a0210b [cfe] Disallow '.new<int>' and type parameters on constructors for dot shorthands.
Adds errors for this part of the spec behaviour: `.new<typeArgs> and .new<typeArgs>(args) will always be compile-time errors because .new denotes a constructor which is not generic`

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I76074d2314f40f60015324d4b01ece7477a8ffb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-27 12:15:57 -07:00
Kallen Tu caa192d24c [cfe] Dot Shorthands - Errors for getters and fields.
This CL adds two errors - 1 for having an invalid context type for resolving a dot shorthand and 1 for not finding a static getter/field in the declaration provided.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I9cc473adf82ca1f74f2370136ac8eec5e97fb23e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416881
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-25 07:29:02 -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
Paul Berry 5d78579842 [analyzer] Fix dead code reporting for null-aware accesses.
A null-aware access can result in dead code if the target has static
type `Null`. The analyzer wasn't properly accounting for this,
resulting in some confusing ranges reported for the DEAD_CODE warning.

This change causes the following expressions to report dead code for
the code ranges indiced by `^`:

    Null myNullVar = null;
    myNullVar?[index];
    //         ^^^^^^ DEAD_CODE
    myNullVar?[index] = value;
    //         ^^^^^^^^^^^^^^ DEAD_CODE
    myNullVar?.method();
    //         ^^^^^^^^ DEAD_CODE
    myNullVar?.property;
    //         ^^^^^^^^ DEAD_CODE
    myNullVar?.property = value;
    //         ^^^^^^^^^^^^^^^^ DEAD_CODE

Note that the bug was confined solely to the logic that reports the
DEAD_CODE warning; there is no change to the reachability inferred by
flow analysis (and hence, this is a non-breaking change).

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

Bug: https://github.com/dart-lang/sdk/issues/60364
Change-Id: I068826282fba6b9057e9c27d1d9310c65714e203
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416723
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-03-20 09:08:53 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -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
Paul Berry c67a80f3f5 Stop using NullabilitySuffix in fe/analyzer shared code.
The getter `SharedType.nullabilitySuffix` is replaced by
`SharedType.isQuestionType`, which returns a boolean.

The method `TypeAnalyzerOperations.withNullabilitySuffixInternal` is
replaced by `SharedType.setNullabilitySuffix`, which accepts a
boolean.

Support for `*` types has been removed from `mini_types.dart`.

A few test cases in `flow_analysis_test.dart` previously used `*`
types as a way of exercising corner cases involving types that were
mutual subtypes of each other. These tests have been changed to take
advantage of the fact that `dynamic` and `Object?` are mutual
subtypes.

Change-Id: Id9904f9570fc738b388192db8536848204af03e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414581
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-03-19 11:24:21 -07:00
Kallen Tu 9b116d047b [cfe] Dot shorthands - Const constructors
Parse and build dot shorthand invocations that are constant.
Added a new listener to handle and store the const-ness. It didn't feel right re-using any of the other `beginConstPattern` methods.

Added an error message if invoking a non-const constructor where we expected a const constructor.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I8551e3b8f71e89a69d090510bb64694d5e09247d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-19 08:52:23 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard b9b77058a9 Migrate to use pub workspace
Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.

All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.

All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 05:21:40 -07:00
Sigurd Meldgaard 9ab23d99b6 Bump language version for analyzer adjacent packages
Extracted from https://dart-review.googlesource.com/c/sdk/+/397164
Which migrates the sdk to resolve as a pub workspace

Pub workspaces requires a language version of 3.5.

Change-Id: I5d6246be676929ff95589a59d72613083735f70f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412042
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-03-11 08:42:53 -07:00
Paul Berry ad58bc01ca Sort declarations in type_analyzer_operations.dart.
No functional change.

Change-Id: I0045a54add71bbd99112465b2c53c3d13f9b268d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414580
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-03-10 15:55:32 -07:00
Paul Berry 7d62bddb17 [_fe_analyzer_shared] Sort declarations in mini_ast.dart and shared_type.dart.
There is no functional change.

Change-Id: I1877d29efddd614688cd34506d5a496a472dea7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-03-10 01:54:00 -07:00
Kallen Tu e52b141660 [cfe] Fix bug with expression parsing with dot shorthands.
This CL is a bug fix where we weren't parsing the rest of the expression after the dot shorthand.
This caused errors in parsing dot shorthands expressions such as `.red..toString();` or `fn(.parse('true') || false)`.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I745f45e04af53eac0cfcebe7ab977b918da10fbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413920
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-06 13:17:32 -08:00
Kallen Tu 5883289bb5 [cfe] Handle equality with dot shorthands.
This CL adds the ability to handle == with dot shorthands in regular equality expressions and then in relational patterns.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I958bbaf9e8a63ca576024ef2ee287779064e5967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413321
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-06 11:09:20 -08:00
Lasse R.H. Nielsen 1a79ae6889 Tweak some code around URI resolution.
Change-Id: Id3c2a5f47286805773399a3549a798e5e2b2199b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414081
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2025-03-06 07:24:50 -08:00
Paul Berry 7382fe9d0a Remove legacy support from shared type analyzer and flow analysis.
Now that the ability to run in "unsound null safety" mode has been
removed (https://dart-review.googlesource.com/c/sdk/+/412881), it is
safe to start removing the code that implements legacy
(pre-null-safety) analysis.

Change-Id: I7f998a081704030ce630d3c343185d0d41d4349a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413524
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-03-04 14:17:42 -08:00
Johnni Winther 0060b0f665 [cfe] Remove nnbd mode
TEST=existing

Change-Id: I30bbadb74e81c7f4aaa444d1e2f6f5ffc2005d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412881
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-03-04 01:46:51 -08:00
Johnni Winther b9348c7216 [cfe] Handle patches as parts
Change-Id: I50a965b8061572af8a5e408b037648b1f7ff2e0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413201
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-03-04 01:41:05 -08:00
Chloe Stefantsova c5af227b8c Remove 'expired' property from 'null-aware-elements' flag
The property was erroneously set in
https://dart-review.googlesource.com/c/sdk/+/412301, and is
removed in this CL.

Change-Id: I1199a2c8e2f0613252a93deb5f2242aac84cf38b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412663
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-02-27 10:31:13 -08:00
Kallen Tu c9aa87bf26 [parser] Avoid an extra error in CFE for dot shorthands.
The parser was still WIP and was emitting an extra error, so this CL removes that error so tests can start passing and so I can properly test the new implementation e2e.

It still needs some fixes after the analyzer implementation is complete. The current extra synthetic tokens added in the parser are temporary to prevent crashes on the analyzer side when the experiment flag is turned off. But it works fine for now, and I'll clean it up in a CL when the feature is complete.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I83d8c840f66bedff4aa27a737a3f57e77d3973b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412344
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-02-27 09:53:10 -08:00
Chloe Stefantsova 79f3c70f8a Enable 'null-aware-elements' flag in 3.8
TEST=existing

Change-Id: Ie87f56627a0cf31acc5996d7fa8e55655adda151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412301
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2025-02-27 06:00:42 -08:00
Jens Johansen 6a3ee53a3f [parser] Don't use late variables in the scanner
The usage of late variables become an access, a comparison to a marker,
and a conditional jump.

Having it be non-null and non-late it's just an access.

Running aot compiled scanner benchmarks on
pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart with `--bytes`
gives:

```
    N           Min           Max        Median           Avg        Stddev
x  25     149.49816     154.67461     153.12174     153.03484     1.2430919
+  25     153.82654     157.77314     156.45323     156.15451     1.1301418
Difference at 95.0% confidence
        3.11967 +/- 0.675708
        2.03853% +/- 0.441538%
        (Student's t, pooled s = 1.18796)
```

And running the benchmarker with `--cache --silent --iterations=50` on
the scanner benchmark with the same parameters gives:

```
Comparing snapshot 1 with snapshot 2
msec task-clock:u: -1.9158% +/- 0.3843% (-48.87 +/- 9.80)
cycles:u: -1.9652% +/- 0.3719% (-218241604.28 +/- 41302487.04)
instructions:u: -0.4735% +/- 0.0000% (-116299496.56 +/- 182.39)
seconds time elapsed: -1.9132% +/- 0.3834% (-0.05 +/- 0.01)
seconds user: -2.0074% +/- 0.4009% (-0.05 +/- 0.01)

Comparing snapshot 1 with snapshot 2
msec task-clock:u: -2.1237% +/- 0.2726% (-54.21 +/- 6.96)
L1-icache-load-misses: -6.2140% +/- 3.3961% (-268165.40 +/- 146560.98)
LLC-loads: -0.5702% +/- 0.4680% (-6613.36 +/- 5428.54)
seconds time elapsed: -2.1219% +/- 0.2728% (-0.05 +/- 0.01)
seconds user: -2.0997% +/- 0.2793% (-0.05 +/- 0.01)
```

Change-Id: I38e076a2e8442e3313075eaa600114f664eb415d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411640
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-02-27 01:16:00 -08:00
Konstantin Shcheglov e964a4e38e Tweak for StackTraceValue.
Change-Id: I308bd327a2fb0a3469631a5ef9d6f0db9a84ba13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412341
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-02-26 09:47:44 -08:00
Johnni Winther e691b45042 [model] Add stack trace helpers
Change-Id: I85088990e17862a6837d0a5ad03386bbf898c7f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412282
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2025-02-26 06:57:04 -08:00
Kallen Tu 2610a2b379 [cfe] Cache the context type when we resolve a dot shorthand.
Using the type analyzer to cache a shorthand context type. This mechanism will be shared between the analyzer and the CFE.

There will be tests for this one the implementation strings through to this part. But otherwise, it's fairly straightforward logic.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I88ac8283d2901d7d141992ab5ab3a83e40be5912
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410943
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-02-24 13:25:02 -08:00
Paul Berry a864586f3c Remove OWNERS file for the CFE team.
The code that was previously owned by the CFE team (OWNERS_CFE) is now
owned by the Dart Model team (OWNERS_MODEL). Accordingly, we don't
need OWNERS_CFE anymore.

Change-Id: I1ede4fbf5a0d29c5d328cc870c75c8a5ec7f217c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-19 09:33:31 -08:00
Lasse R.H. Nielsen f4cadd5a5a Retired inference-using-bounds and wildcard-variables experiments.
Change-Id: I5dcc0c7d2b148eb88e6382118d6fc8ee4c9a9489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407022
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2025-02-19 05:25:10 -08:00
Kallen Tu ef2dcd5f48 [parser] Initial parsing of dot shorthands.
Doing some initial work for parsing dot shorthands.

The listeners in the CFE and analyzer will report an extra error if the experiment is not turned on. The compilation should still fail and produce errors, but it won't crash.

If you turn on the experiment, the parsing will crash, but I'd like to get this in so I can modularly work on the CFE and analyzer separately.

Bug: https://github.com/dart-lang/sdk/issues/59758, https://github.com/dart-lang/sdk/issues/59835
Change-Id: I262b0bd5cffc8e5e04ac79c76454b6e355779ade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409540
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-02-18 12:45:53 -08:00
Paul Berry a0b38184e2 Remove OWNERS file for the analyzer team.
The code that was previously owned by the analyzer team
(OWNERS_ANALYZER) is now owned by either the Dart Model team
(OWNERS_MODEL) or the developer experience team
(OWNERS_DEVELOPER_EXPERIENCE). Accordingly, we don't need
OWNERS_ANALYZER anymore.

Change-Id: I9a4d2e2462a15ba9ec8f3046cdca77ba9d3af13c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410564
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-18 12:24:57 -08:00
Johnni Winther d3f28d77d1 [cfe] Support parts with imports/parts
This is a part of the enhanced-parts feature needed for further progress on the Builder model migration where patch libraries should be handled as patch parts.

Change-Id: I253b471df56ce383eaf5de18b3287ec3cc161005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409700
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2025-02-17 03:40:08 -08:00
Paul Berry ca2d428f99 Add an OWNERS file for the new Dart Model team
Moving forward, the Dart Model team will own the following packages:
- _fe_analyzer_shared
- analyzer
- analyzer_cli
- analyzer_utilities
- front_end
- frontend_server
- kernel
- testing

In follow-up CLs I will create an OWNERS file for the developer
experience team, and then remove the OWNERS files for the old analyzer
and CFE teams.

Change-Id: Id7cf38ea41a6d3f9ca44f43fae1f310426a31e29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409841
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-02-14 15:51:17 -08:00
Paul Berry d3de420bf8 Add a custom lint to sanity check the analyzer public API.
The new lint, called `analyzer_public_api`, verifies that the analyzer
public API satisfies the following properties:

- No method, function, getter, setter, or supertype in the public API
  refers to a non-public type.

- No `export` declaration in the public API shows a non-public name.

- No declaration in the public API has a name ending in `Impl`.

- No file in the public API has a `part` declaration that points to a
  file that's not in the public API. (If it did, then the other checks
  could be circumvented.)

A new annotation is added, `@AnalyzerPublicApi()`, allowing
declarations in `package:analyzer/src` or
`package:_fe_analyzer_shared/src` to be marked as part of the analyzer
public API. This is necessary because some parts of the analyzer
public API need to be declared elsewhere and then exported by the
analyzer.

A few lint violations have been ignored using `ignore:` comments. I
will try to clean these up in follow-up CLs.

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

Bug: https://github.com/dart-lang/sdk/issues/60058
Change-Id: I0047a73dec8a29e2ffe03dd3a90f7e41ca2e27b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-14 05:24:22 -08:00
FMorschel 2eec09dcd4 [DAS] Makes EXTENSION_DECLARES_INSTANCE_FIELD trigger on all field names
R=jensj@google.com, paulberry@google.com

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

Change-Id: Ic4b41973d0d74d809d813ba57b85f50fab4c9a47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407080
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-02-11 03:15:31 -08:00
Paul Berry 274f5639f7 [Flow analysis] Remove PropertyNotPromoted.staticType.
This field was only used to populate expectation strings in "id"
tests; it did not affect any user-visible behavior of the analyzer or
CFE.

Including information in "id" tests that doesn't affect any
user-visible behavior isn't helpful. Removing this field will enable
some upcoming flow analysis refactoring work (I intend to remove the
`ExpressionInfo._type` field, replacing its remaining usages with a
more reliable mechanism).

Change-Id: Id4c6593fae4ef25b8c21f0625e6c1f9eaa766e17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406403
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-08 16:51:15 -08:00
Kallen Tu 89e545c5cc [dot-shorthands][co19] Rename enum-shorthands flag to dot-shorthands (and roll co19 to b14b080)
We've decided to rename enum shorthands to dot shorthands. It describes the entire feature better. It's not only for enum values. We'll update the experiment name before the implementation goes in, that way our users can use a flag that matches the actual feature name.

Additionally, roll co19 to b14b0802e696a60c79b00d0f052e26fb986f0faf so we can avoid an infra failure with co19 using what's now an unknown feature flag (enum-shorthands).

2025-02-06 sgrekhov22@gmail.com Fixes dart-lang/co19#3067. Rename the static access shorthand feature experiment flag (dart-lang/co19#3068)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Bug: https://github.com/dart-lang/sdk/issues/57037
Change-Id: I031e3bce8166145b24dbb77acf259d78e6e00f0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407603
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-02-07 07:38:32 -08:00
Konstantin Shcheglov 26b3e61ffe Prepare to publish analyzer 7.3.0 and _fe_analyzer_shared 80.0.0
Change-Id: I5d35f23752d8dadfc118ae92a3f8fcf3928cc60e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408422
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-02-06 18:57:40 -08:00
Johnni Winther 7c22f942aa [_fe_analyzer_shared] Remove macro tests and helpers
These are no longer used.

TEST=removed

Change-Id: Ibf5b2de9d1b550c21873b48111161366deb2ddc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407980
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2025-02-05 03:59:31 -08:00
Jens Johansen ca16a4271c [scanner] Replace KeywordState
As bechmarked with the AOT compiles of `scanner_benchmark.dart`
called with
`pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart --bytes`:

```
    N           Min           Max        Median           Avg        Stddev
x  25     138.56434     144.23326     142.64174     142.51626     1.2207074
+  25     148.45681     157.02163     156.44878     155.88958     1.7051997
Difference at 95.0% confidence
        13.3733 +/- 0.843454
        9.38372% +/- 0.59183%
        (Student's t, pooled s = 1.48287)
```

And compiling the CFE from December with the CFE, statistics on 25 runs
each, run with `--cache --silent` (so 2 x 50 runs each) (in AOT mode):

```
msec task-clock:u: -0.9684% +/- 0.3536% (-58.65 +/- 21.42)
page-faults:u: -0.1051% +/- 0.0818% (-125.36 +/- 97.49)
cycles:u: -1.0001% +/- 0.3225% (-252905081.28 +/- 81554799.59)
instructions:u: -0.5915% +/- 0.0007% (-181426590.44 +/- 209346.28)
seconds time elapsed: -0.9657% +/- 0.3525% (-0.06 +/- 0.02)
seconds user: -1.1336% +/- 0.4333% (-0.07 +/- 0.03)

msec task-clock:u: -1.3115% +/- 0.3364% (-79.48 +/- 20.39)
page-faults:u: -0.1900% +/- 0.0774% (-226.72 +/- 92.37)
L1-icache-load-misses: 0.4990% +/- 0.2072% (2422435.64 +/- 1006075.94)
LLC-loads: -2.3896% +/- 0.1707% (-1179245.64 +/- 84228.28)
LLC-load-misses: -1.9244% +/- 0.2041% (-639169.84 +/- 67791.64)
seconds time elapsed: -1.3128% +/- 0.3374% (-0.08 +/- 0.02)
seconds user: -1.3311% +/- 0.4183% (-0.08 +/- 0.02)
```

Combined the 3 CLs ending here gives this result when compiling
the CFE from December with the CFE, statistics on 25 runs each,
run with `--cache --silent` (so 2 x 50 runs each) (in AOT mode):

```
msec task-clock:u: -1.7681% +/- 0.3034% (-106.37 +/- 18.25)
page-faults:u: -0.1834% +/- 0.0863% (-218.80 +/- 103.00)
cycles:u: -1.8163% +/- 0.2668% (-456090610.64 +/- 66985831.74)
instructions:u: -1.1851% +/- 0.0007% (-365653999.24 +/- 220539.29)
branch-misses:u: -2.8468% +/- 1.0580% (-2611811.72 +/- 970666.69)
seconds time elapsed: -1.7687% +/- 0.3026% (-0.11 +/- 0.02)
seconds user: -1.9723% +/- 0.4480% (-0.11 +/- 0.03)

msec task-clock:u: -1.7787% +/- 0.3042% (-107.07 +/- 18.31)
page-faults:u: -0.2413% +/- 0.1050% (-288.12 +/- 125.39)
L1-icache-load-misses: 0.5218% +/- 0.1599% (2523027.12 +/- 773363.93)
LLC-loads: -2.2917% +/- 0.1613% (-1125147.16 +/- 79181.20)
LLC-load-misses: -2.0256% +/- 0.2667% (-670484.64 +/- 88293.18)
seconds time elapsed: -1.7793% +/- 0.3036% (-0.11 +/- 0.02)
seconds user: -1.7392% +/- 0.3752% (-0.10 +/- 0.02)
```

And for the scanner benchmark, in AOT mode, called with
`pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart --bytes` for bytes per microsecond:

```
    N           Min           Max        Median           Avg        Stddev
x  25     114.87867     117.70322     117.10106        116.85    0.67188864
+  25       153.512     156.99315     156.38671     155.95981    0.98376554
Difference at 95.0% confidence
        39.1098 +/- 0.479146
        33.4701% +/- 0.410053%
        (Student's t, pooled s = 0.842386)
```

Change-Id: Ica6d47d92ab0fb4c3a06aa6686b8c71f52a6aef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407480
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-02-05 03:12:26 -08:00
Jens Johansen 49a9d42cfc [scanner] Ask VM to inline Token._setCommentParent
From the scanner benchmark with --bytes:

```
    N           Min           Max        Median           Avg        Stddev
x  25     135.49248     140.11327     137.90404     137.70731     1.1732525
+  25     135.55161     143.54553     141.81997     141.37336     1.8048844
Difference at 95.0% confidence
        3.66606 +/- 0.865817
        2.66221% +/- 0.628737%
        (Student's t, pooled s = 1.52219)
```

Change-Id: Ia69010d6215f59242b7f4e91d1af295cf4db1775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407421
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-02-05 03:04:50 -08:00
Jens Johansen 95265c319c [scanner] Optimize scanning of identifiers, comments, spaces etc.
In bytes per microsecond, statistics on 25 runs each of an AOT compile
scanner_benchmarker run with
`pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart --bytes`:

```
    N           Min           Max        Median           Avg        Stddev
x  25     116.01859     118.24483     117.63414     117.41239     0.6246963
+  25      136.5563     139.73077     138.82117     138.72373    0.75137577
Difference at 95.0% confidence
        21.3113 +/- 0.393007
        18.1508% +/- 0.334724%
        (Student's t, pooled s = 0.690945)
```

With `--string`:

```
    N           Min           Max        Median           Avg        Stddev
x  25     104.77452     118.00444     115.83707     115.04005     2.8653416
+  25      120.1637     125.80937     123.84278     123.88533     1.2858698
Difference at 95.0% confidence
        8.84528 +/- 1.26317
        7.68887% +/- 1.09802%
        (Student's t, pooled s = 2.22077)
```

And running it through the benchmarker
(`pkg/front_end/tool/benchmarker.dart --cache --silent
--iterations=25`):

`--bytes`:

```
msec task-clock:u: -15.4177% +/- 0.3838% (-515.18 +/- 12.83)
cycles:u: -15.5303% +/- 0.3716% (-2263042219.68 +/- 54143984.97)
instructions:u: -11.8786% +/- 0.0000% (-3721971162.16 +/- 292.14)
branch-misses:u: -13.0375% +/- 0.8048% (-10550278.80 +/- 651299.13)
seconds time elapsed: -15.4170% +/- 0.3820% (-0.52 +/- 0.01)
seconds user: -15.4936% +/- 0.3859% (-0.51 +/- 0.01)

msec task-clock:u: -15.1724% +/- 0.3173% (-505.72 +/- 10.58)
L1-icache-load-misses: 42.3794% +/- 6.4906% (1901929.52 +/- 291287.30)
LLC-loads: 3.2837% +/- 0.7535% (40264.52 +/- 9239.86)
LLC-load-misses: -2.2808% +/- 1.3789% (-3647.96 +/- 2205.39)
seconds time elapsed: -15.1722% +/- 0.3201% (-0.51 +/- 0.01)
seconds user: -15.1811% +/- 0.3196% (-0.50 +/- 0.01)
```

`--string`:

```
msec task-clock:u: -6.2018% +/- 0.3384% (-207.18 +/- 11.31)
cycles:u: -6.2315% +/- 0.3257% (-907517140.20 +/- 47432247.03)
instructions:u: -7.2693% +/- 0.0000% (-2325765423.72 +/- 491.22)
branch-misses:u: -2.6467% +/- 0.6289% (-2198552.96 +/- 522409.28)
seconds time elapsed: -6.1995% +/- 0.3378% (-0.21 +/- 0.01)
seconds user: -6.2612% +/- 0.3705% (-0.21 +/- 0.01)

msec task-clock:u: -6.1645% +/- 0.4224% (-206.18 +/- 14.13)
L1-icache-load-misses: 40.5703% +/- 6.3952% (1945020.52 +/- 306599.42)
LLC-loads: 1.5464% +/- 0.8925% (20130.04 +/- 11618.51)
seconds time elapsed: -6.1656% +/- 0.4197% (-0.21 +/- 0.01)
seconds user: -6.1980% +/- 0.4240% (-0.21 +/- 0.01)
```

And compiling the CFE from December with the CFE, statistics on 50 runs
each, again run with `--cache --silent` (so 2 x 50 runs each):

```
msec task-clock:u: -0.7401% +/- 0.1900% (-45.01 +/- 11.56)
cycles:u: -0.7971% +/- 0.1917% (-202488820.10 +/- 48684812.34)
instructions:u: -0.5975% +/- 0.0004% (-184367556.38 +/- 137673.23)
branch-misses:u: -2.9490% +/- 0.8146% (-2788427.60 +/- 770259.65)
seconds time elapsed: -0.7428% +/- 0.1901% (-0.05 +/- 0.01)
seconds user: -0.7148% +/- 0.2895% (-0.04 +/- 0.02)

L1-icache-load-misses: 0.1974% +/- 0.1457% (954253.92 +/- 704297.81)
LLC-loads: 0.1988% +/- 0.1244% (97594.22 +/- 61084.80)
```

Change-Id: I0550596f5320a1ff00d85765c121d012f55bec61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-02-05 03:04:24 -08:00
Johnni Winther 938d9c0dc8 [cfe] Create synthesized super classes late
This moves the creation of class builders for anonymous mixin application to after the creation of the normal class builders.

A ClassDeclaration interface is added to support class builders from different fragments. This is also a step towards creating class builders fully through fragments.

TEST=existing

Change-Id: Ia6b4a17648bdc89b89fd3cfdfe39d24d347b6341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407420
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-02-04 07:08:41 -08:00
Johnni Winther c27cec63aa [cfe] Remove macro support
This removes the support running macros in the CFE.

The scanner and package:kernel still have support for the macro modifier. This will be removed in a follow-up.

The metadata expression parser is deliberately left in, since it might serve as the basis for a parser AST.

Change-Id: I06d91eb0fac2e7a71e6afde647b03be3814dbd5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406963
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2025-02-03 07:13:51 -08:00
Johnni Winther f797e5f138 [cfe] Remove MixinApplicationBuilder
Change-Id: I2780f63c1d63655cc23d44426f29d5d9a040c5f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406841
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-01-30 05:48:42 -08:00