* 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>
I intend to re-use StaticTypeAnalyzer for performing type inference
during summary linking as part of fixing #32525. Allowing type
propagation to be disabled will allow the linker to do less work, and
avoid the need to implement the type-propagation-related element
methods in the linker's reduced element model.
There should be no functional change with this CL, since
StaticTypeAnalyzer is not used in linking yet.
Change-Id: I5f644e9869ab89dee21b03a3a54bf809926142f5
Reviewed-on: https://dart-review.googlesource.com/48082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
I intend to fix#32525 by re-using resolver code to perform type
inference during summary linking. This will require the linker's
stripped down element model to be filled out more completely. To
avoid code duplication, I need to first refactor some of the existing
element logic so that it can be re-used by linker code.
This CL makes the following changes:
- LibraryElementImpl._unlinkedDefiningUnit is made non-private so that
the linker will be able to implement it.
- The logic for building a set of import elements from a summary is
moved to a reusable static method.
- The logic for building a set of prefix elements from import elements
is moved to a reusable static method.
- In resynthesize.dart, abstract base classes are created for
_LibraryResynthesizer, _ReferenceInfo, and _UnitResynthesizer.
- Also in resynthesize.dart, mixins are created to allow re-use of
some of the implementation logic in _LibraryResynthesizerContext and
_LibraryResynthesizer.
Change-Id: I34cde04f4aac291e216004e861d6ac354d551c1c
Reviewed-on: https://dart-review.googlesource.com/48081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is so we correctly answer `const bool.fromEnvironment("dart.library.js")`
as true when --categories=Server is passed to the compiler.
Change-Id: Id12a0af65905fabc23ef5a1cd3e5fd837bc8b766
Reviewed-on: https://dart-review.googlesource.com/48265
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>