Johnni Winther
2528bf8666
[kernel] Add VariableDeclaration.isHoisted
...
This flag is set when a variable declaration is moved earlier in
order to be available for subsequent code that couldn't contain
its declaration. For instance variables declared in patterns which
needs to be declared before the matching expressions that initialize
them.
TEST=existing expectations tests
Change-Id: I80ab1138f08f725f3e01905c1a57a1483f809328
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291820
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-03-30 07:13:40 +00:00
Johnni Winther
f17cf33c6d
[kernel] Move Pattern nodes to package:kernel
...
These AST nodes were so far internal to the CFE, but since we need to
move the pattern lowering to the constant evaluator we need to support them in the AST defined in package:kernel.
TEST=existing
Change-Id: Ie6c5f0f8ad75a866c5d965fdf506bc869ffaf654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288241
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
2023-03-13 08:43:07 +00:00
Johnni Winther
04e6f4c282
[kernel] Add VariableDeclaration.isSynthesized
...
This adds an [isSynthesized] flag to the [VariableDeclaration] the
signal when the variable doesn't correspond to a variable in the
source code.
The name of a variable can only be `null` if it is synthesized.
Partially in response to
https://github.com/dart-lang/sdk/issues/51554
TEST=existing
Change-Id: I94591971f11da09d210c8b25a2d05e22ca05dc62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286961
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-03-10 11:13:36 +00:00
Ahmed Ashour
1a362fa011
[cfe] fix the export of inline class
...
Bug: #51516
Change-Id: I56d61125b4a9cba55f94e15dbd82289c4fd42214
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285262
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-03-02 13:36:43 +00:00
Johnni Winther
fa0eb1eeec
[cfe] Support implements clause on inline classes
...
Closes #51445
TEST=pkg/front_end/testcases/inline_class/implements.dart
Change-Id: I1214afd8fe8f87ca516be018129e1629c91af289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284704
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-02-23 08:07:44 +00:00
Martin Kustermann
354e8068a4
[kernel] Make package:kernel`s text printer end map constants with matching "}"
...
This makes it easier to navigate around in editors that can go to
matching braces/parenthesis (e.g. jump from end of constant section to
start).
TEST=Fixes kernel text printer & updates tests.
Change-Id: I6cbf34f5a62e11454e5de4d5fc9a313e0c6cf36c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283641
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2023-02-20 14:10:09 +00:00
Lasse R.H. Nielsen
bee7ab2b32
Make record positional field getters start at $1.
...
An update for co19 is available at https://github.com/dart-lang/co19/pull/1759
TEST=Existing tests run after change, two new tests for edge cases.
Change-Id: I408e398d532ba2c2e8e60777bb4f7bd0057e27fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278912
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2023-01-30 08:14:28 +00:00
Kallen Tu
1cdd496a51
[cfe] Add class modifiers to AST and dill files.
...
TEST=pkg/front_end/testcases/class_modifiers/...
Change-Id: I8befd64c359eb33a6acf003525b0c8cc6096df3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279331
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-01-19 22:55:20 +00:00
Kallen Tu
7bd4aee94a
[cfe] Add mixin class flag to dill and binary.
...
Additionally, make class flags a uint because there are now more than 8 flags.
TEST=pkg/front_end/testcases/mixin_class/*
Change-Id: I4fe7babfa9911df0821cc73528e6b10b2ea3b92d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275402
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-12-16 19:12:59 +00:00
Johnni Winther
81845864ca
[kernel] Rename View* to Inline*
...
TEST=existing
Change-Id: I8726c936261ceb770b489f264d14fff02a1b4998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275243
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2022-12-14 08:36:57 +00:00
Brian Wilkerson
1e0091aae0
Remove some unnecessary ignore comments in kernel
...
Change-Id: I6362107efe058c2a4465ff17e57edae18562e0fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274730
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-12-12 18:46:15 +00:00
Johnni Winther
6f54f6236e
[cfe] Add AwaitExpression.runtimeTypeCheck
...
Add AwaitExpression.runtimeTypeCheck to support easy backend
implementation of runtime type check.
In response to https://github.com/dart-lang/sdk/issues/49396
TEST=pkg/front_end/testcases/general/issue49396.dart
Change-Id: I13b9b14566ebc34cdb0811c16a262421417b68e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270723
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-11-22 10:42:22 +00:00
Kallen Tu
9e922093da
[cfe] Add sealed classes to AST, builders and dill files.
...
TEST=pkg/front_end/testcases/sealed_class/*
Change-Id: Iea7db59d2bba92e5f3594f6e89949e6ff3c85a80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269801
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2022-11-16 23:57:29 +00:00
Johnni Winther
4306e07775
[cfe] Add (Source)ViewBuilder
...
Includes refactoring to share code with (Source)ExtensionBuilder.
Change-Id: If3cc66fa9f868d23ef756f80bc2f447cb534c5d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268763
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-11-10 21:32:37 +00:00
Ahmed Ashour
10e7e478a2
Fix typos
...
Fixes #50184
Change-Id: If17f838d932171e30ef92d1bda8d4918e7e08a8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263622
Reviewed-by: Lasse Nielsen <lrn@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-10-12 14:12:42 +00:00
Jens Johansen
4d9bbde5ce
[kernel] AST-to-Text for records works as expected
...
For whatever reason https://dart-review.googlesource.com/c/sdk/+/257203
didn't follow normal textual output and would for instance output
constants {
#C1 = 1
#C2 = 2
const (#C1, #C2)
const ({a:#C1, b:#C2})
const ({a:#C3, b:#C4})
const (#C5, #C3)
}
instead of something like
constants {
#C1 = 1
#C2 = 2
#C3 = (#C1, #C2)
#C4 = ({a:#C1, b:#C2})
#C5 = ({a:#C3, b:#C4})
#C6 = (#C5, #C3)
}
Change-Id: I9a8d515694d3486ffbb38fdc0d1986d41d053103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262800
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-10-06 06:32:31 +00:00
Johnni Winther
6795c753fd
[cfe] Handle unnamed extensions in parts
...
This introduces a MemberName abstraction that supports the late
computation of member names, taking privacy and synthesized names
of unnamed extensions into account. With this feature, the unnamed
extension are now more directly handled as having no (known) name
which avoids the clash between the eagerly synthesized named of
unnamed extensions in different parts.
Closes #48765
TEST=existing
Change-Id: I62c00ace017141ecbc61eeecb275d0211f341c82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258800
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Daco Harkes <dacoharkes@google.com >
2022-09-14 14:44:12 +00:00
Johnni Winther
7f4c3787c3
[cfe] Handle RecordConstant in ast_to_text
...
Change-Id: Ie967e18e35da41eb1c563cd95aa21f08a401dc5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257203
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-09-02 09:40:53 +00:00
Johnni Winther
2da3806823
[cfe] Handle Record(Index/Name)Get
...
Change-Id: I9550d1e73b7caf1924596b3208a16f51a8cfcf41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256362
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-08-26 17:10:41 +00:00
Johnni Winther
f8b6897a44
[cfe] Create RecordType and RecordLiteral
...
Change-Id: Idd59d5c26b1d695386a14544c1013aea3329b222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256361
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-08-26 15:59:22 +00:00
Chloe Stefantsova
ddff459c7f
[cfe] Add RecordType, RecordLiteral, and associated nodes
...
TEST=Covered by upcoming language and co19 tests.
Change-Id: Ibe8ecfb7f854adce5646125f6909066e27424665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256066
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2022-08-25 10:33:35 +00:00
Lasse R.H. Nielsen
8a883fa54d
Change : to = for default values in pkg.
...
Leaves some in parser test:
pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart
TEST=Refactoring, covered by existing tests.
Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2022-08-24 15:57:16 +00:00
Johnni Winther
dcaebaa793
[cfe] Add Field.isEnumElement
...
This adds the flag `isEnumElement` to the `Field` node and uses it
to recognize enum elements for the exhaustiveness computation on
switch statements.
Closes #49697
TEST=pkg/front_end/testcases/general/issue49697/main.dart
Change-Id: I21852f3b063329e043639c825054f538c8ed6536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255808
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-08-22 05:44:57 +00:00
Chloe Stefantsova
1611fe6f45
[cfe] Separate out IntersectionType from TypeParameterType
...
TEST=Covered by existing tests
Change-Id: Ie7b99b1c109edff5198cfbf5d22e1cfb1dc130d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253665
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2022-08-18 08:47:29 +00:00
Alexander Markov
3a1229e56c
[kernel] Remove obsolete AsyncMarker.SyncYielding and YieldStatement.isNative
...
AsyncMarker.SyncYielding and YieldStatement.isNative became
obsolete after async/async*/sync* kernel transformation was removed in
https://dart-review.googlesource.com/c/sdk/+/249944 .
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I69ac994af77f7e403686750bf8df437868bf33fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249947
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Slava Egorov <vegorov@google.com >
2022-07-11 18:20:45 +00:00
Chloe Stefantsova
95d8a5d41a
[cfe] Remove Kernel round-trip text serialization
...
Change-Id: Ifdf0df0b93773f95eb1646a313c15e0a578b5a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249181
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2022-06-21 10:28:24 +00:00
Aske Simon Christensen
608b95c9b4
[kernel] Add exhaustiveness information to switch statements
...
Tested: Added flag to text output and updated expectation files
Change-Id: I44bb82242ad608b19894e22c41d8404c5003c2d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245982
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-06-07 10:45:39 +00:00
Johnni Winther
cb3cac408d
[kernel] Add AbstractSuper* nodes
...
This adds AbstractSuperMethodInvocation, AbstractSuperPropertyGet,
AbstractSuperPropertySet nodes which are to be used for super access
in mixin declaration.
These super accesses do not resolve to their statically bound target
but instead the interface target on the types in the 'on' clauses, and
need to be updated to the statically bound target upon mixin application.
This has lead backends to disregard the interface target provided by
the CFE and instead always compute targets for super accesses.
This change is a step towards creating a clear separation between the
two use cases, enabling a more precise handling of super accesses.
The new nodes are not created yet with this CL.
TEST=existing
Change-Id: I70ea9baf5b4b970b10cc72b7409633d270d57755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245168
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-05-20 09:50:01 +00:00
Johnni Winther
6980a1b4c3
[kernel] Add VariableDeclaration.hasDeclaredInitializer
...
The computation of default values on super parameters requires the
notion of a declared initializer. By adding this as a flag to
VariableDeclarations the implementation can now be normalized across
parameter from source and dill.
TEST=existing
Change-Id: Ic980e68b569e3bdab38d2c7c7e4374e0c931a87b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240403
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-04-07 14:54:08 +00:00
Chloe Stefantsova
abdd5765ee
[cfe] Re-own TODOs assigned to 'dmitryas'
...
TEST=Only the comments were changed.
Change-Id: I8d4778746759466ea4c64f0eabe498da353fdd22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240041
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2022-04-05 09:04:53 +00:00
Johnni Winther
88846ca4b4
[kernel] Remove unused Typedef fields
...
The fields typeParametersOfFunctionType, positionalParameters,
and namedParameters were never used.
TEST=existing
Change-Id: I0ca1c546fdf94df9c3248164a56ed88cd2468b18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239310
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-03-30 13:01:40 +00:00
Johnni Winther
a6acb1a5f0
[cfe] Include the future value type in ast-to-text
...
This is in preparation for including a "futureValueType" for
non-nnbd async functions.
TEST=existing
Change-Id: I15cf5e58623df07fe3c670aa866b7b04805c0f3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238703
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-03-28 10:37:25 +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
Johnni Winther
8510f27d37
[cfe] Change encoding of supported dart: libraries
...
This CL changes the way dart: libraries are considered supported when
used in conditional imports or bool.fromEnvironment constant using
the "dart.library.*" values.
Library nodes now has an isUnsupported flag which is set according to
the "supported" property in the libraries specification. Furthermore
the Target now supplies a DartLibrarySupport interface that allows
targets to override whether dart: libraries are unsupported.
This allows the JIT/AOT to use the same platform file but still
consider dart:mirrors unsupported in AOT mode, and dart2js to consider
the internal library `dart:_dart2js_runtime_metrics` supported.
Furthermore, the internal handling is changed so that condition imports
and bool.fromEnvironments constants are computed through the same logic
for "dart.library.*" values, avoiding the need for passing these values
through the environment.
TEST=pkg/front_end/testcases/general/supported_libraries/main
Closes https://github.com/dart-lang/sdk/issues/48057
Closes https://github.com/dart-lang/sdk/issues/47814
Closes https://github.com/dart-lang/sdk/issues/47243
Closes https://github.com/dart-lang/sdk/issues/32657
Closes https://github.com/dart-lang/sdk/issues/36460
Change-Id: Ie8f8dff99167de64ced51b71d89918bf0f3bbd13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227020
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-01-11 14:52:38 +00:00
Johnni Winther
7695118aa2
[cfe] Add Class.isMacro
...
This adds support for detecting macro classes from .dill
TEST=pkg/front_end/testcases/macros/macro_class.dart
Change-Id: I8d45cafff1b4edaff7e090384be1a1cf9c8087ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224948
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-12-22 11:49:01 +00:00
Johnni Winther
cb1f1b8102
[cfe] Migrate text serialization suite
...
Change-Id: Ib44e1c69f5e9aa0e17794b647c50b28fe4cf3d62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220741
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-11-18 12:07:26 +00:00
Johnni Winther
114ad79698
[cfe] Ensure separation between StaticGet/StaticTearOff/ConstructorTearOff
...
Change-Id: I5b8d1103c10fecaf8fdaa69ee62215deb7eebc38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217641
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-10-26 04:53:00 +00:00
Johnni Winther
56490f9776
[cfe] Add Procedure.signatureType
...
The added field holds the interface signature type for a Procedure when
this is different from the class signature type (implied by the function
parameters and return type). This is needed for forwarding semi stubs
when its declared type is different from the called super member.
Closes https://github.com/dart-lang/sdk/issues/47072
TEST=pkg/front_end/testcases/general/implement_semi_stub.dart and more
Change-Id: I4a7cdc9d564fb0a59e7b06e83646b5410d8d82f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216420
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <dmitryas@google.com >
2021-10-13 11:31:16 +00:00
Johnni Winther
6c4b75237a
[kernel] Rename isFieldFormal to isInitializingFormal
...
+ update ast-to-text, including previous renames of covariant
TEST=existing
Change-Id: Ia29847cba791096ccd9c6c383a1b633a6150cd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214042
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <dmitryas@google.com >
2021-09-22 15:56:07 +00:00
Chloe Stefantsova
2048ab37f1
[cfe] Add shown and hidden elements to Extension Kernel node
...
TEST=existing
Change-Id: I8271cb7f4731dea289c855b0c5384f8e181530c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212761
Commit-Queue: Chloe Stefantsova <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-09-13 13:18:19 +00:00
Johnni Winther
a4a1f2c0d5
[cfe] Update precedence for instantiation and constant nodes in ast-to-text
...
TEST=existing
Change-Id: I6269aaef293765e68e5f119184f0d24f40da9aec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212821
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-09-10 12:10:27 +00:00
Johnni Winther
d80cff6b2b
[cfe] Rename isCovariant and isGenericCovariantImpl
...
- to isCovariantByDeclaration and isCovariantByClass, respectively.
This is done to align the terminology with the spec.
TEST=existing
Change-Id: I96b2e5d6e05caca431aad2b54545e928aee034e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213041
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-09-10 11:27:37 +00:00
Johnni Winther
4ff04f641b
[kernel] Add always_declare_return_types lint
...
Change-Id: Icdcc648f42393b28daf648f752e3b4d61f51aa10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212043
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-09-01 16:50:27 +00:00
Johnni Winther
097a511d9f
[kernel] Add annotate_overrides lint
...
Change-Id: I1fffd60eeb14ecd6d5ba30cd584a75ddd4a8acfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212005
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-09-01 11:45:17 +00:00
Johnni Winther
5dc4d65114
[kernel] Add InvalidExpression.expression
...
... and use this to wrap expressions instead of Let
TEST=existing
Change-Id: I6d1f5cfa4693222840d6cb406790c39c6ae63e5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208580
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-08-04 08:40:18 +00:00
Riley Porter
cf3387efd3
Remove Link depenedency in Tagging debug class.
...
Change-Id: Iabd0edb24eee278c3f12a9f61fe535645e1f26d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208761
Commit-Queue: Riley Porter <rileyporter@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2021-08-03 00:32:22 +00:00
Riley Porter
b36dcbf00b
[ddc] Print AST of compiled libraries with summarize-text flag.
...
Moves dart2js DebugPrinter and Indentation to pkg/kernel/lib/text
and produces the AST of compiled libraries when ddc is run using
the --summarize-text flag.
Change-Id: I195ff99a0929ac12791b4f7b6c5e755b19065c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208460
Commit-Queue: Riley Porter <rileyporter@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-08-02 17:36:10 +00:00
Johnni Winther
cb3a9b0043
[cfe] Remove old method invocation encoding nodes
...
TEST=existing
Change-Id: I05ee649ecfa7945e2e0f5e5d09441d8916a9c46e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208185
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-07-28 15:44:04 +00:00
Johnni Winther
286702df6b
[kernel] Migrate tests
...
Change-Id: If426fc15f7bce54b51eaac3354061684cd5b0e17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207129
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-07-27 12:35:37 +00:00
Johnni Winther
66f6a490d7
[cfe] Handle TypedefTearOff(Constant) in constant evaluation
...
+ fix bug in TypedefTearOff.getStaticType and implement
TypedefTearConstant.hashCode to match operator==
Closes #46674
Change-Id: I95d9e058865b7290208429f671e8f276b1d7993c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207660
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-07-22 18:09:29 +00:00