The `@pragma` annotations are evaluated by the constants transformation and
visible to TFA and the precompiler, which match on the "options" field of the
annotation to determine whether to mark the class/procedure as a root.
This required enabling the transformation of annotation constants by default.
# Test Plan
The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
`@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
available at runtime.
Debug/release precompiler bots are visible in "cl-linux" button.
Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
Reviewed-on: https://dart-review.googlesource.com/56660
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit 53cd0b4af1.
The commit causes failures in the VM's precompiler because its mixin
deduplication transformation apparently needs to distinguish between
anonymous and named mixins.
Change-Id: I3861a3bf90b10f627d5fc8f0e94f117c102422d7
Reviewed-on: https://dart-review.googlesource.com/56780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
To implement dart:mirrors correctly, a backend like the VM needs to
know that a class was originally a mixin application. Use the
`isSyntheticMixinImplementation` flag which was already there and
ignored by the VM.
Now the property is:
- if `isSyntheticMixinImplementation` is set on a class with a
mixed-in type, then it was originally an anonymous mixin application
- if `isSyntheticMixinImplementation` is set on a normal class then it
was originally a mixin application of some kind and the mixed-in
type can be found as the last impelemented type
Bug: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I004adc6bfe08e583efba8e511076a6c603c0c687
Reviewed-on: https://dart-review.googlesource.com/56760
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
This improves recovery when parsing type arguments in
* top level fields and functions
* class members
and when parsing type parameters in
* top level functions
* class declaration
* class methods
Change-Id: I7dbb520d6bb39c0d13b27698658dafe580f2b16c
Reviewed-on: https://dart-review.googlesource.com/56681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This should make the Link implementation work in strong mode.
We may find situations where Link<Null> leaks out, but I believe those should
be fixed by passing explicitly typed tail arguments.
Change-Id: I4c48769569f22e987ace586f5ec9264d75b49982
Reviewed-on: https://dart-review.googlesource.com/56663
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Known files are only used for seaching top-level declarations.
But we already get something for user from it - we can give Quick Fix
for imports, even if the package to import is not used yet in the project.
R=brianwilkerson@google.com
Change-Id: Iaa6d7ad515325b1bad3e37e7c066c42df056c85c
Reviewed-on: https://dart-review.googlesource.com/56623
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In 4cf51e6c1a, a new argument was added
to the ContextRoot constructor, changing its signature in a breaking
way.
In theory this should not have broken other packages, because
ContextRoot is declared inside analyzer/lib/src. But it turns out
that two packages are known to import from analyzer/lib/src and
construct ContextRoot: angular_analyzer_plugin and
built_value_generator. To avoid breaking these packages, we need to
add the new constructor parameter as an optional (named) parameter.
Some time after after angular_analyzer_plugin and
built_value_generator have been updated, I'll send a later CL to mark
the named parameter as @required.
Change-Id: I5be063dd47a3dfefba08cb444687b91bf2ba3625
Reviewed-on: https://dart-review.googlesource.com/56603
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This change adds tracking of number of invocations with the same
selector but different arguments. If this number reaches certain limit,
all subsequent invocations with such selector are approximated.
On Flutter gallery, 1 selector is approximated:
dart.core::Object::==
On Analyzer, 2 selectors are approximated:
analyzer.dart.ast.ast::AstNode::visitChildren
dart.core::List::[]=
Flutter gallery Total(CodeSize): +11 K.
Fixes https://github.com/dart-lang/sdk/issues/33199
Change-Id: I3598555194262a4f08fe1bc207d10880a25eb432
Reviewed-on: https://dart-review.googlesource.com/56420
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The transformation worked as if there was never an await "to the
right" of the body of a let expression (i.e., an expression evaluated
after the let expression's body but before the value of the let
expression's body is used). This is obviously not right.
Fixes https://github.com/dart-lang/sdk/issues/33206
Change-Id: Idc175dc8c65f3d520de8b65f2285164d361ff38e
Reviewed-on: https://dart-review.googlesource.com/56492
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Fix all the Dart 2 runtime errors revealed by compiling dart2js, the
front end itself, the front end tests.
Change-Id: Ic6e6dd9f85db845b6a351ebbcfea9a6045843fc2
Reviewed-on: https://dart-review.googlesource.com/56322
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
We only use the name of typedef type literals. These are passed through
TypeConstantExpression to TypeConstantValue and used directly as the
nominal identity (!) of the emitted typedef type literal constant value.
Note that the emitted typedef type literal has no relation to its alias.
Change-Id: I1cdc5a88a9b3d75faa0786ecd07226b5075df1c4
Reviewed-on: https://dart-review.googlesource.com/55898
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The option is not used by any client at this time and removing it simplifies the
next stack of changes I'll be making on how we compose file systems.
I also don't believe we will necessarily add this back as an option, but instead
it might be that clients requriing hermeticity will provide a custom file system
that helps with that.
Change-Id: I401efb042920d234382b6c041b13d40ffae5c908
Reviewed-on: https://dart-review.googlesource.com/56462
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>