Hide private class _Future and map it to core lib class Future.
In Dart 2, show dynamic as type argument(s) of raw generic types.
Change-Id: I70b0e1707bc767d04838ac12d16b3ad15623f51f
Reviewed-on: https://dart-review.googlesource.com/48502
Reviewed-by: Siva Annamalai <asiva@google.com>
See #32525.
This CL makes the following changes:
- Extracts the logic from AbstractClassElementImpl.getSetter to a
static method so it can be re-used by the summary linker.
- Modifies ParameterElementImpl._resynthesizeTypeAndParameters so that
it avoids unnecessary calls to resolveLinkedType. This is crucial
because resolveLinkedType is not available when linking.
- Makes it possible to suppress reporting of const evaluation errors
when doing resolution. This is necessary because in order to report
these errors we must do constant evaluation, which is not possible
during summary linking.
- Modifies ResolverVisitor._hasSerializedConstantInitializer to avoid
unnecessary calls to LibraryElementImpl.hasResolutionCapability.
This is crucial because the linker contains an implementation of
LibraryElementImpl that's incompatible with
LibraryElementImpl.hasResolutionCapability.
Change-Id: Iec91bd8d6a68193e091c2438bafcd7cb15488d89
Reviewed-on: https://dart-review.googlesource.com/48681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL is the first in a multi-part effort to remove the `previous`
field from the Token class. This first step introduces a new findPrevious
utility method that finds the the token before a given token in a token stream,
and then replaces usages of token.previous with calls to this
new findPrevious utility.
Change-Id: I57de4e542adb5950f1bddd951ff555dd98b19b3b
Reviewed-on: https://dart-review.googlesource.com/48461
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
* preserve-comments: unused, only used for source-mirrors & dartdoc long long ago
* preserve-uris: ignored, mirrors-only flag
* allow-native-extensions: error, was only used for analyze-only with the old FE
Change-Id: Ic93c31edf188cdab3aa658c13018a432baf14742
Reviewed-on: https://dart-review.googlesource.com/48457
Reviewed-by: Johnni Winther <johnniwinther@google.com>
* remove serialization options
* remove checks that are only for the old FE (e.g. checks about imply compilation and --analyze-*)
Change-Id: I148025a7158340339bba4205f3b961b3c9902e47
Reviewed-on: https://dart-review.googlesource.com/48453
Reviewed-by: Johnni Winther <johnniwinther@google.com>
One thing that occurred to me is that maybe we don't need precise
resynthesis of some expressions, e.g. `a is T`, because it does not
have dependencies, and has known type. Thoughts?
We already kind of went this way by not serializing arguments of
invocations with type arguments, and cascades.
OTOH, it might be simplier to resynthesize where it is easy.
R=brianwilkerson@google.com, paulberry@google.com
Bug: https://github.com/dart-lang/sdk/issues/32525
Change-Id: I742b1adc6ae22d8743ef127af7d6a33446e53449
Reviewed-on: https://dart-review.googlesource.com/48466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL moves _ConstExprBuilder to its own file, renames it to
ExprBuilder (so that it can be re-used for non-const expressions), and
begins adding support for expression types that can appear in
non-const expressions.
It also introduces an expr_builder_test.dart file to make testing of
ExprBuilder easier.
See #32674.
Change-Id: I5a3d91408c51770ee8f70621032a2f0767eaea55
Reviewed-on: https://dart-review.googlesource.com/48462
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
They are necessary for performing type-checks.
Change-Id: Ie30f0617488730d920c00229fb2ec358cc8d6c4b
Reviewed-on: https://dart-review.googlesource.com/48421
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Made modifications to the original VM flow graph builder so the token
position for the top frame of the overflow stack is the same as the
token position of the method (before we pointed to the opening '{' or
'=>').
Change-Id: I5c878fc238898e2fea197ea80ed4e320adca9439
Reviewed-on: https://dart-review.googlesource.com/48448
Reviewed-by: Alexander Markov <alexmarkov@google.com>
There is already a Quick Assist to convert StatelessWidget to StatefulWidget,
and duplicating implementation is not very nice.
R=brianwilkerson@google.com, devoncarew@google.com
Change-Id: Iacbe58c9d05359ec96a86affc774c83532f7456f
Reviewed-on: https://dart-review.googlesource.com/48451
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Using immutable options objects was nice, but it came with a tax every time we added or modified
options (often having to edit 5 locations). I'm now using a mutable object and
default values are inline with the field declaration.
Change-Id: I92768f0ff50a4140271dc0ebfa3b615c94a57e4d
Reviewed-on: https://dart-review.googlesource.com/48446
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This CL makes the following changes:
- Extracts the implementation of ClassElementImpl.getNamedConstructor
to a static method so that it can be re-used by
ClassElementForLink_Class.
- Adds a UnitResynthesizerMixin class so that unit resynthesis methods
can be shared between the resynthesizer and the linker.
Change-Id: I694d6fef511b5bb734ea78095834d6c68e22bf63
Reviewed-on: https://dart-review.googlesource.com/48380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL fixes TFA summary collector to use right-hand side value as the
result of SuperPropertySet expression instead of result of setter invocation.
Change-Id: Ie2388387645eeec95096ab797e2718b7e031131b
Reviewed-on: https://dart-review.googlesource.com/48300
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I18f1561fcacc06937ae5719486a8dd524b1d16e7
Reviewed-on: https://dart-review.googlesource.com/48140
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
An expando is a better conceptual fit, since we are using
typesWithImplicitTypeArguments as a substitute for adding a new
property to every DartType object. Using an expando rather than an
identity set also has the advantage of interacting better with the
garbage collector, since the expando only has weak references to its
keys.
Change-Id: I39f538bd40b5ef264d637dbc8fafc11194ae27fa
Reviewed-on: https://dart-review.googlesource.com/48321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL modifies class member parsing to replace one use of skipTypeReferenceOpt
and parseType with a more efficient call to computeType. In addition, it updates
computeType to detect when a builtIn is used as a type and improves recovery
of invalid operator declarations.
Change-Id: Idbe96584ef3c2e72faf91037668421bb0f1055d0
Reviewed-on: https://dart-review.googlesource.com/48221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>