Commit Graph

6659 Commits

Author SHA1 Message Date
Clement Skau 2c0ba56ea1 [vm/ffi] Add error for FFI annotation with opt. args.
Optional arguments (positional and named) in @FfiNative
annotations are not meaningful, and should result in a
compile-time error.

TEST=tests/ffi/ffi_native_test.dart
Bug: https://github.com/dart-lang/sdk/issues/47169
Change-Id: I8896e6a43f9399b537e6ee7c7a0e2857a370203f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232622
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2022-03-18 20:58:51 +00:00
Jake Macdonald 8d2c630052 add OmittedTypeAnnotation and support in code objects
Bug: https://github.com/dart-lang/language/issues/2154
Change-Id: Ie48d308a822798da22ea38954774e393f81e2e2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237740
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-03-18 14:30:07 +00:00
Ben Konyi b036052077 Reland "[ Service ] Update VM service message to not reference Observatory"
This reverts commit ee5837aa7a.

Updated Intellij plugins have been published which support the new
message.

TEST=CQ

Change-Id: I81f6d878f036991a95cc1f58d3102015e77aa609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237741
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-17 23:15:57 +00:00
Johnni Winther 280a87df1e [cfe] Change expression_suite to use embedded sources
This changes that expression_suite tests to embed the needed source
code in the yaml file. Single source and multi sources are supported.
When using a single source, the file name is implicitly "main.dart"
and the "position" and "entry_point" yaml properties are updated to
supports this, meaning that the yaml files should only use file names
when using multiple sources.

Change-Id: Ia6756eb86a7b72dea2187f72b9f2c75c28783a0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237680
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-17 14:17:26 +00:00
Jens Johansen fd4e41a7af [parser-ish] Better errors on invalid unicode escapes
https://github.com/dart-lang/sdk/issues/48542

Change-Id: Icbdcc939a93c737914091c00aaefa3c4efb2dde0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-03-17 13:57:45 +00:00
Johnni Winther acc535dfab [cfe] Show annotations on library dependencies
This updates ast-to-text to show the annotations on import/exports. A
test is added that uses augmentation libraries to show that the
annotations are not currently ascribed to the correct library dependency.

Change-Id: I340c1ab920b16ff08dd9ac36ee9be4d2d651b4a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237301
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-17 09:38:25 +00:00
Chloe Stefantsova 5bd7d75b1e [cfe] Report errors on restricted instance members in enums
Part of https://github.com/dart-lang/sdk/issues/47453

Change-Id: I2fddd2ad5da82807fef7e9ed1d7a6781fde38600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237365
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-03-16 13:47:44 +00:00
Johnni Winther 5f7d226ae8 [cfe] Enable nnbd in expression suite
Change-Id: Iad66d179b4b2795ba68a65cf078fa69a4f65fae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237040
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-16 11:44:31 +00:00
Johnni Winther e86a1140aa [cfe] Implement TypeDeclarationResolver
This implements TypeDeclarationResolver for the CFE. Adds a test to
the macro api test, which includes support for throwing and catching
the ArgumentError required by the api.

Change-Id: I5bb7948064ba5a2c215289915fc10314fd28aa1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237020
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 16:35:02 +00:00
Johnni Winther e7d708558f [cfe] Add test for member lookup in ClassIntrospector
This adds tests for `fieldsOf`, `methodsOf` and `constructorsOf` of
the `ClassIntrospector` interface in the macro api test.

Change-Id: I79ef7ce01d00cda2c8277342e4b7c17e91266b5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236884
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 15:17:59 +00:00
Johnni Winther 29fc2e7802 [cfe] Support ClassIntrospector.interfacesOf and ClassIntrospector.mixinsOf
This adds support for [interfacesOf] and [mixinsOf] of the
[ClassIntrospector] interface. To support this, the mixed in
[ClassHierarchyNode] is now included in the [ClassHierarchyNode] for
a mixin application.

Change-Id: I30cef4b462b1b2b52acf1bd286d82ebc1c5caa4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236883
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 12:42:20 +00:00
Johnni Winther 7e4b88c0c9 [cfe] Copy default values into redirecting factories
Redirecting factories are not allowed to declare default values but
should instead inherit the default values from their target. Since
the current encoding of redirecting factories is a callable function
used as the tear-off by the VM, the default values should be copied
to the procedure representing the redirecting factory.

Closes https://github.com/dart-lang/sdk/issues/48548

Change-Id: I0e601cd4920bc1059c9bf99e4a4c9c0e20c183e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237160
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 11:37:49 +00:00
Johnni Winther 529e016a0a [cfe] Replace ClassHierarchyNode.directInterfaceBuilders with directInterfaceNodes
This refactors ClassHierarchyNode to contain the [ClassHierarchNode]s of
its direct interfaces instead of the [TypeBuilder]s. This makes the
[ClassHierarchyNode] interface more self-contained and prepares for use
in macro introspection.

Change-Id: I4014ea180321060aceaf5cc88d5d2182a3c34d54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236881
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 10:11:21 +00:00
Johnni Winther 51c2f8878f [cfe] Refactor IdentifierImpl
This moves macro implementation into its own subfolder and refactors
the IdentifierImpl implementation to be split into identifier based on
TypeDeclarationBuidler, TypeBuilder, MemberBuilder and
FormalParameterBuilder.

As part of the refactoring, the resolveTypeAnnotation implementation was
rewritten to use DartType instead of TypeBuilder.

Change-Id: Ie59160f4252627849606169b0210aaa83a27d60c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236880
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-15 09:11:19 +00:00
Jake Macdonald 54e773f205 Add support for passing in precompiled macros to the computeKernel entrypoint.
This is used by the modular compilers, so it unblocks more "real" blaze integration, and allows the language repo to create examples that you can actually run.

Note that this also actually enables macros when the experiment flag is passed in to this entrypoint.

Change-Id: Ia5ce82621a63363a17d16599fead5124ddf65faf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-03-14 17:57:48 +00:00
Chloe Stefantsova ad3d2eb5c4 [cfe] Adjust nullability of UP when r.h.s. is an intersection
Closes https://github.com/dart-lang/sdk/issues/48373

Change-Id: I9ec2211c6deccbc7c26e831863f9a9b05833380f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236601
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-03-14 15:44:38 +00:00
Johnni Winther d885296ca5 [cfe] Run fasta.dart commands in separate vm when asserts are not enabled
Change-Id: I8d45580e9c95ae529ce6b1071427bae5a220f531
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237042
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-14 10:59:49 +00:00
Johnni Winther f3cc205fd8 [cfe] Pass references to augmentation libraries
This adds support for preserving reference in augmentations.
Augmentation libraries are now passed `referencesFrom` such that
its members case use it.

A special case is classes. Classes need the `referencesFrom` both
for themselves and for their members but while injected classes should
use the reference from `referencesFrom` for their [Class] node,
augmentation classes shouldn't. This is because [Class] node for the
origin is used in the output, whereas the augmentation [Member] node is
used for the members.

Change-Id: Iea73a5edd8f6cd4801e7e8229583eab69d89968e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236500
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 21:33:01 +00:00
Jens Johansen 6969a6edd3 [parser] Don't leak a rewrite when swallowing an error
The old code tries to determine something by using a forwarding listener
without forwarding to anything. It leaked a rewrite though, meaning that
the rewrite stayed, but the error given when rewriting wasn't passed on.

When then parsing it with the real listener, the rewrite was in effect
and there was no error to report. In total no errors were reported.

This fixes the issue by undoing any rewrites in this situation.

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

Change-Id: I5342ae6969f00dea830fb7abb30f21932907b8bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-03-10 18:43:46 +00:00
Johnni Winther d380ae8d48 [cfe] Run commands of tool/fasta.dart in the same VM
This changes tool/fasta.dart to run the subcommand in the same VM when
no VM arguments are specified. This speeds up the tool and as a
consequence speeds up the tool/update_all.dart and
tool/update_expectation.dart tools.

Change-Id: I80b61a692a3ac2e15a7d1d097e65e1efbf9e4aee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236560
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 15:23:15 +00:00
Johnni Winther e48e85c87f [cfe] Enable alternative invalidation strategy in incremental macro test
This adds support for changes to macro classes with the alternative
invalidation strategy. Because macro classes can modify code in any
library where they are applied, changes to libraries with macro classes,
or to libraries that they depend upon, are handled as a signature
change that require full recompilation of the dependencies.

A more precise approach would be to invalidate only the libraries that
apply the changed macros. This data is not currently available during
incremental compilation.

Change-Id: I23347e332b95acfe232f4a04a023677780a64d60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235681
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 15:13:35 +00:00
Chloe Stefantsova c1626742e3 [cfe] Perform inference on enum elements as on other fields
The type inference on enum elements was performed at the outline
expression building phase, which is later than the inference on the
rest of the members. It prevents some type checks from being performed
correctly, for example, a check for the type of the getter induced by
the element and a declared static setter. This CL moves the inference
on enum elements to the same phase as for the rest of the class and
enum members.

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

Change-Id: Iefc5606e6db07df8cd2de101c47d115c2ff8454a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236000
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-03-10 10:21:35 +00:00
Johnni Winther 0dc9182fa0 [cfe] Remove language version from testcases/general (Part 8 of 8)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: If206c9964bf76c8874a42f51e9521178f1a294b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236240
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 08:06:55 +00:00
Johnni Winther 46df1278f6 [cfe] Remove language version from testcases/general (Part 7 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I753ad1a5b1e8bbe64979f8b2e3ac0f18b3bb5daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236080
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 08:03:55 +00:00
Johnni Winther 18e40edfb5 [cfe] Remove use of MacroClass from IncrementalCompiler
Two CLs landed with recently resulted in a conflict.

Change-Id: If564f0ee2a52704baa02f477baac5a6d7eeb09fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236401
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 07:50:05 +00:00
Johnni Winther f6f6d32355 [cfe] Change CompilerOptions.precompiledMacros
This changes the `CompilerOptions.precompiledMacros` property to
a map from macro library URIs to precompiled dill URIs.

Change-Id: I7c7b2adab06330da6112b87c32f9acc86dcb6795
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236400
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 05:46:05 +00:00
Johnni Winther 983cedbe76 [cfe] Support multiple files in incremental macro tests
This adds support for using multiple files in one incremental macro
tests. Tests are added for in body changes in class members and
macro class members. The latter needed support for invalidation of
precompiled macros.

Change-Id: Ib20814ccb3f15c76f6e2413643ae0a9e4ff79d3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235660
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-09 23:18:45 +00:00
Johnni Winther 9ff6a58790 [cfe] Add initial support for macro precompilation in incremental compiler
Change-Id: I340694cb6aac2ac8305f71caf7897eef09ebfa5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235460
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-09 22:14:05 +00:00
Jens Johansen f40d76d360 [parser] Recover missing () for enum constant with type arguments or dot
Fixes https://github.com/dart-lang/sdk/issues/48380

Change-Id: I4f6fd7311c46ad45ccce5bf6b97b40932a457851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234360
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-03-09 12:40:35 +00:00
Konstantin Shcheglov 9dc81176ab [parser] Better recovery on empty named argument name
Fixes https://github.com/dart-lang/sdk/issues/48288

Change-Id: I831b4870ba7dc69436f68e1ef84e0cdf258073a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234289
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-03-09 09:55:44 +00:00
Johnni Winther ac14ef2fcc [cfe] Remove language version from testcases/general (Part 6 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I5b23b8e6eca4f73661766cab48c6fe94ebc5cce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235781
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-09 09:04:54 +00:00
Srujan Gaddam f8933dda8d [pkg:js] Disallow all operators in JS classes
Closes https://github.com/dart-lang/sdk/issues/48515

Expands existing checks for index operations to all operators. This
only affects instance members and not extension members.

Change-Id: I8cbb5b12a49539ea502e4396e1b469ffb0e17d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235980
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-03-09 01:48:24 +00:00
Johnni Winther 7d115ed0ad [cfe] Move macro tests to common subfolder
Change-Id: I3c327744e6e76d99efa7fc44644542ea92e5a0d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235225
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-08 14:17:23 +00:00
Johnni Winther 5090974cf3 [cfe] Use effective target in redirecting factory tear off lowering
The tear-off lowering for a redirecting factory called the
immediate target (even when this was also a redirecting factory)
instead of the effective target. This caused problem in backends
that don't support redirecting factories directly.

Closes https://github.com/dart-lang/sdk/issues/47916

Change-Id: Iafb11c42c1e99e70ed44b0835473a8c69e995b01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235780
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-08 13:11:53 +00:00
Johnni Winther e202fdb2d5 [cfe] Remove language version from testcases/general (Part 5 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I060bf0a4d003ecafc489759e3b97a2a4bf4b4aa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235661
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-08 08:41:46 +00:00
Johnni Winther 8b1b7cc0d9 [cfe] Remove language version from testcases/general (Part 4 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I6c49f3d4980f07934c91257a999fe42c70b07482
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235600
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-07 12:31:03 +00:00
William Hesse 06763dd539 Roll dart_style 2.2.2 into the repo.
This adds formatting support for upcoming language features:

- Named arguments anywhere
- Enhanced enums
- "super." parameters

It doesn't change the formatting of any existing code, so it should be
safe to roll this in without coordinating a pre-built SDK roll.

I also went ahead and ran the formatter on the related language tests
since before now they couldn't be formatted. (And I incidentally ran
the formatter on the other enum tests sitting in the same directory.)

Edit: Actually there is one small change to existing formatting: enum
declarations will now get a blank line inserted before them. Most hand
authored enums already have this so will be unchanged but I see a few
diffs when formatting generated code.

Change-Id: Icefd9f10bedc589312396cf0ddb8eafc418f8dbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235284
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-03-04 13:06:42 +00:00
Leaf Petersen 35e66b5081 Enable by default the experiment flags for the 2.17 language features
TEST=Existing language tests
Change-Id: I6c2ecd73a1c7add1451d72adff94df6fdcfca9fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234704
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2022-03-04 01:08:01 +00:00
Chloe Stefantsova 43840be8cd [cfe] Check types of super parameters for assignability
The CL enables both the checks of the super parameter relative to the
corresponding parameter of the super constructor and the types of the
copied default values.

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

Change-Id: I92dfa22c108bf07a69e1f8b5a210f6268ddfaa2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235080
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-03-04 00:55:01 +00:00
Johnni Winther 2c430537c6 add IdentifierResolver api, which allows you to get identifiers for a
given symbol in a given library

Change-Id: I665b3bd2fa6fe7bb64375873e9ae9343e7922a3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234904
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 16:51:50 +00:00
Aske Simon Christensen 72af03a800 [cfe] Mark constructor tear-off procedure as synthetic
The FFI transformer requires that ABI specific integer classes have no
non-synthetic procedures.

Change-Id: Ief40a797b3d2549bec76c47405cdd537ea411644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235220
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 15:15:40 +00:00
Johnni Winther 767103b1ec [cfe] Remove BuilderImpl as superclas of JumpTarget
This relation was never used/needed.

Change-Id: I3cc976a807278949072491f0969961ca303225b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235084
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 15:11:50 +00:00
Johnni Winther c8950a9b15 [cfe] Add language versions to tests
- to prepare for the upcoming enabling of features

Change-Id: I51ff8c9fb1f9c1db34e7d0366f9dac61e03aeedc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235081
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 11:20:50 +00:00
Johnni Winther c76a01c991 [cfe] Remove language version from testcases/general (Part 3 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I42c2c6a3eaa082984c0d9ca3c8764abe5745b2d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235020
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 10:49:50 +00:00
Johnni Winther 005ebcc761 [cfe] Handle enum super initializer with super-parameters enabled
This reorganize the handling of super initializers to support
experiments enhanced-enums and super-parameters being enabled
simultaneously. The change also handles non-const enum constructors
when enhanced-enums is not enabled and super initializers in
non-enum classes when enhanced-enums _is_ enabled.

Change-Id: I099736fa9dcd6747060e65c875ff0f3275e9506d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235021
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 09:03:31 +00:00
Danny Tuppeny 1e9fb81697 [analysis_server] Make CompilationUnit.lineInfo non-nullable
Change-Id: Ib628751a14dc3257cf7325432ab20f2bdb9d6f3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234290
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-03 06:59:00 +00:00
Johnni Winther c031e73df0 [cfe] Remove language version from testcases/general (Part 2 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I1618e9b0401b3f3163c147e6a22c5895d4a5486e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234840
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-02 11:53:29 +00:00
Johnni Winther c049178dc4 [cfe] Remove language version from testcases/general (Part 1 of ?)
This in preparation for enabling all bleeding edge experimental
features in testcases/general to get early feedback on how new features
affect existing code.

Change-Id: I50d7f92b547dfb3a1482d485b5dad40dc8bc6985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234720
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-02 11:51:20 +00:00
Johnni Winther e6e44d0c98 [cfe] Handle use of enhanced enum features in legacy library
Closes https://github.com/dart-lang/sdk/issues/48487

Change-Id: I217a0f014e8caaf67e492558bde801b3d344f853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234782
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-02 11:29:48 +00:00
Johnni Winther 3d01c968e3 [cfe] Remove ScopeListener
This moves the members of ScopeListener into the BodyBuilder which was
its only subclass.

This is a step towards cleaning up who the CFE handles scopes.

Change-Id: I000053fde502a0b8b7eaec572866072d97a6c76d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234606
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-01 21:52:58 +00:00