Commit Graph

56224 Commits

Author SHA1 Message Date
Paul Berry 08d0dcb4b0 Observatory strong mode fixes: specify some list literal types.
In some cases we need to specify a type because the inferred type
would be too specific.  For example, in the code:

    final content = [new SampleBufferControlElement(...)];
    ...
    content.addAll([new BRElement(), ...]);

Strong mode would infer a type of `List<SampleBufferControlElement>`
for `content`, making it impossible to add other kinds of HTML
elements to the list later.  So we have to specify explicitly that the
list element type is meant to be `HTMLElement`.

In other cases we need to specify a type because the inferred type is
too general.  For example, in the code:

    Future<List<String>> complete(...) {
      var result = [];
      ...add values of type String to `result`...
      return new Future.value(result);
    }

Strong mode would infer a type of `List<dynamic>` for `result`, making
it impossible to enclose in a `Future<List<String>>`.  So we have to
specify explicitly that the list element type is meant to be `String`.

Change-Id: I1b1c884529de2775898dfff800d250cd10629811
Reviewed-on: https://dart-review.googlesource.com/56700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:22:03 +00:00
Paul Berry 462e350a6a Observatory strong mode fixes: Change types of InstanceMock/Instance members.
The types now correspond in the two classes, so we avoid invalid
override errors.

Change-Id: Iceeb324e6adf7573ae39d7250184f7eb58656498
Reviewed-on: https://dart-review.googlesource.com/56021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:02:03 +00:00
Erik Ernst 6ed3b162d6 Added feature specification for upper/lower bounds of top/bottom types
A rendered version can be found here, and it was updated to match
patch set 12:
https://gist.github.com/eernstg/df0d69c85724e1179835a43bf9e63adc

The issue where this topic was raised is
https://github.com/dart-lang/sdk/issues/28513.

Change-Id: I21e4df42348a51f482c42d1c29595e475823e5dc
Reviewed-on: https://dart-review.googlesource.com/53211
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-25 16:05:20 +00:00
Brian Wilkerson abed87be08 Make BodyBuilder.handleCatchBlock use FormalParameters as catchParameters.
Change-Id: Ib3523faa2a7fa122e56ecef5b9ed6c42a1a8b90d
Reviewed-on: https://dart-review.googlesource.com/56604
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-25 15:41:03 +00:00
Dmitry Stefantsov 5016f11c08 [fasta] Make lists of type arguments growable
Change-Id: I0a5bc5da093ad1fecdba4fc1ec8b9325f72b021a
Reviewed-on: https://dart-review.googlesource.com/56666
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-25 13:38:32 +00:00
Brian Wilkerson 48e8b4cdbb Make Forest.forStatement take the conditionStatement rather than extracting the rightSeparator
Change-Id: I4fc8abddfc04cdde018480d7a078c46d3241b80d
Reviewed-on: https://dart-review.googlesource.com/56602
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-25 13:34:13 +00:00
Paul Berry 2d527801b2 Observatory strong mode fixes: fix several type annotations.
Change-Id: I647480f1f03be1d182afe98f6aa22c43a937aba3
Reviewed-on: https://dart-review.googlesource.com/56028
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-25 12:42:11 +00:00
Paul Berry 0125a5a235 Observatory strong mode fixes: Fix callback parameter types using implicit casts.
Change-Id: I0ee40677e13f82ca94238b98dcb50188063f9260
Reviewed-on: https://dart-review.googlesource.com/56026
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:32:01 +00:00
Paul Berry c85b2fc7be Observatory strong mode fixes: Fix an int/double type mismatch
Change-Id: I78cfc41dc328a40ba7650a492235d51663132130
Reviewed-on: https://dart-review.googlesource.com/56027
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:17:21 +00:00
Paul Berry 3fb22040cb Observatory strong mode fixes: make iteration types more specific.
Change-Id: I8031625bd676aadb0bf20e3b2642f0b7e84af747
Reviewed-on: https://dart-review.googlesource.com/56025
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:15:41 +00:00
Paul Berry 2165d2d797 Observatory strong mode fixes: safe uses of dynamic and covariant.
This CL makes the following changes, which should be safe since they
don't affect Dart 1.0 semantics:

- Explicitly declare the types of certain variables as `dynamic` to
  avoid strong mode inferring a type that leads to errors.

- Explicitly cast certain expressions to `dynamic` to allow access to
  members that are dynamically known to be present.

- Add `covariant` annotation to method parameters that are a subtype
  of the corresponding parameter in the base class.

Change-Id: Ibefe4d9591f70ea954373ca4d521bc54179cca9b
Reviewed-on: https://dart-review.googlesource.com/55900
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-25 11:54:20 +00:00
Peter von der Ahé 6a34939ba7 Use bottom type for Link constants
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>
2018-05-25 10:37:36 +00:00
Peter von der Ahé 20831b1d6f Move ErroneousExpressionGenerator
This prepares for splitting its subclasses so they can
be implemented by the analyzer.

Change-Id: I0fb59b56a6d34e86e909e6ecf68a9cdf57de44d6
Reviewed-on: https://dart-review.googlesource.com/56495
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-05-25 07:45:46 +00:00
Peter von der Ahé 8e25851870 Split LargeIntAccessGenerator
This prepares the generator to be implemented by the analyzer.

Change-Id: Ida249f93ad0b80bb52bb3278a1e2949c668b0e64
Reviewed-on: https://dart-review.googlesource.com/56493
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-25 07:45:46 +00:00
Paul Berry 7b3c3991ea Observatory strong mode fixes: add implicit downcasts.
Change-Id: I17d10ec4c69f9d3fa1cda3ec11df3e96749ade29
Reviewed-on: https://dart-review.googlesource.com/56022
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 05:20:25 +00:00
Konstantin Shcheglov de0e35829d Discover available files before searching in known files.
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>
2018-05-25 01:24:35 +00:00
Paul Berry d17859ca11 Observatory strong mode fixes: make callback parameter types more general.
This CL addresses a code pattern where a method expects its parameter
to have a certain type, but that method is torn off and passed as a
callback to another method expecting its parameter type to be more
general.  For example:

    void f(int i) { ... }
    void g(void callback(Object o)) { ... }
    void h() {
      g(f); // Error: () -> int is not a subtype of () -> Object
    }

This is a strong mode error because the type system cannot guarantee
that the value pased to f will be an int.  The solution is to broaden
the type of the callback parameter so that it matches the type
expected for the callback.  In most cases, we insert an implicit
downcast (by reassigning the parameter to a local variable with the
expected type), which in Dart 2.0 semantics will result in a runtime
check (similar to what happens in Dart 1.0 checked mode).

Since the downcasts are implicit, the Dart 1.0 semantics are
unchanged, so this should be a safe change.

Change-Id: I9583ea194343b89b39305c9796cfad299a47943f
Reviewed-on: https://dart-review.googlesource.com/55907
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-24 23:07:55 +00:00
Jaime Wren ca7d545df8 Follow up on initial fix-all fixes PR, https://dart-review.googlesource.com/c/sdk/+/56220, adding some assertions and a test.
Change-Id: I6e22f8537f616ce2d09247f90bb81fff17eb1b66
Reviewed-on: https://dart-review.googlesource.com/56601
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-24 22:29:45 +00:00
asiva 922f9697a0 [VM] Fix for issue 32901 - Isolate.resolvePackageUri has inconsistent behavior when called from a script launched via relative path.
Change-Id: I6ea0868936ff972def1f66c94509f7afed7c4c87
Reviewed-on: https://dart-review.googlesource.com/56622
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-05-24 22:08:40 +00:00
Zach Anderson 9c70462e3c [vm] Roll boringssl to 189270cd190267f5bd60cfe8f8ce7a61d07ba6f4
fixes #33229

Change-Id: I786c2f48108a3e00b3b3ef2ae8a68ddaac256fda
Reviewed-on: https://dart-review.googlesource.com/56628
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-24 22:04:30 +00:00
Emily Fortuna 785f36853f Last changes to make dart2js strong mode clean when compiling itself!
Change-Id: I43b6869cc5dccb2b2d0f41133402225e0f55e433
Reviewed-on: https://dart-review.googlesource.com/56626
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-24 22:00:35 +00:00
Paul Berry 993b4caf0e Make the change to ContextRoot non-breaking.
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>
2018-05-24 21:56:25 +00:00
Vijay Menon 30ad3f66ce Set DDK to run on Dart-2 VM
Change-Id: I0c0558996c5d6d6c739ded5e5c8b2554a4cd7b04
Reviewed-on: https://dart-review.googlesource.com/53320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-05-24 21:51:25 +00:00
danrubel 379232a097 Convert remaining IdentifierContext consts
This CL converts the remaining IdentifierContext constants
and removed now unused code from the parser.

Change-Id: I3c5add811e0e5a3af082c31bc42abda62a164307
Reviewed-on: https://dart-review.googlesource.com/56541
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-24 21:45:05 +00:00
Konstantin Shcheglov 819b212318 Issue 33228. Fix Dart2 error in outline computer.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33228
Change-Id: Ifa328eee5cbc398ada9cfee0a582f169b140434e
Reviewed-on: https://dart-review.googlesource.com/56625
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-24 21:36:32 +00:00
Ryan Macnak ec19ebd684 [vm] Fix feature detection of DBC32 versus DBC64 in snapshots with code.
At a minimium, the image portion of the snapshot is sensitive to word size.

Change-Id: I1056a726c7b773f3ef65608f3244aaa01a366ec4
Reviewed-on: https://dart-review.googlesource.com/56023
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-24 21:26:45 +00:00
Emily Fortuna 00a5197542 More changes to make dart2js dart 2 strong mode clean.
Change-Id: I796ac4b71ca9b91ec43ac72a02127ed87872f954
Reviewed-on: https://dart-review.googlesource.com/56460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-24 20:50:51 +00:00
Leaf Petersen 2d8bf7751e CHANGELOG for invariant generic bounds
Change-Id: If7dcc07b9fb68e149814e8de42bbf6d9d0425a62
Reviewed-on: https://dart-review.googlesource.com/56621
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-05-24 20:23:42 +00:00
Ryan Macnak de545b4079 Revert "[mirrors] Add IsolateMirror.loadUri."
This reverts commit ad4cfa0260.

Reason for revert: Assertion failures on DBC

Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
> 
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
> 
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com,kmillikin@google.com

Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-24 20:03:40 +00:00
Ben Konyi 1be13871bb [ VM ] Addressed additional comments from CL 56461.
Change-Id: I396a4e1038ccc7ae4f504d817ee6790aeb8d2003
Reviewed-on: https://dart-review.googlesource.com/56620
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-24 20:01:51 +00:00
Alexander Aprelev 5cc3736644 [vm/frontend-server] Include errors count into compile expression response.
Change-Id: Ifc42ff221eb5a0d95f7ed0f29f410ab18740b0e6
Reviewed-on: https://dart-review.googlesource.com/56140
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-24 18:16:16 +00:00
Mike Fairhurst 891efdca59 Fix status file for analyzer.
It seems like the "missing" analysis error is a strong mode error, so I
don't think the error should even appear without strong mode turned on?

In any case, a "missing" error for non strong users is not something I
would expect to be blocking. Better to fix the build

Change-Id: I5f56b5847b655b501e8146200ab4b84fddbf21cc
Reviewed-on: https://dart-review.googlesource.com/56600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-24 17:38:58 +00:00
Ryan Macnak ad4cfa0260 [mirrors] Add IsolateMirror.loadUri.
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.

Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-24 17:07:15 +00:00
Konstantin Shcheglov a64bbbf6b3 Bump to watcher 0.9.7+8.
Change-Id: If1705ac18715876fc5c1325dab4c3dda42b8d2b9
Reviewed-on: https://dart-review.googlesource.com/56580
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-24 17:05:36 +00:00
Vyacheslav Egorov eb19be5ff8 [vm/tool] Teach precompiler2 script to build ELF binaries.
Usage: pkg/vm/tool/precompiler2 --build-elf a.dart liba.so

Change-Id: I06f673453c8fc6f103c0ccc345b8586edaf6d1a0
Reviewed-on: https://dart-review.googlesource.com/56503
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-24 16:56:58 +00:00
Vyacheslav Egorov 7c43cfad9f [vm] Mark superclasses of interfaces implemented.
Previously we would only mark immediate superinterfaces
as implemented which is not enough.

Bug: b/80154489
Change-Id: I0751d4326b1ac8930b7fdfb35e0c3fdd5d0b71dd
Reviewed-on: https://dart-review.googlesource.com/56485
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-24 16:35:13 +00:00
Ben Konyi 2f7874ab99 [ VM ] Updated include path for typed_data_utils.h which was causing Flutter build to fail.
Change-Id: Id70533ec5237579719cfc061fab93bd659c20b1f
Reviewed-on: https://dart-review.googlesource.com/56560
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-24 16:15:03 +00:00
Alexander Markov 3c6907ed0d [vm/kernel/aot] Approximate numerous invocations per selector in TFA
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>
2018-05-24 16:13:22 +00:00
Kevin Millikin 75a75263d3 Clone annotations when cloning nodes that have them
Annotations were not cloned.

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

Change-Id: I2d2b2153be9efcf1be4b39815eb8ac15b7cacd38
Reviewed-on: https://dart-review.googlesource.com/56494
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-24 15:59:54 +00:00
Dan Rubel d3da30c152 Report errors on non-synthetic tokens
This updates fasta parser error reporting to find a non-synthetic token
on which to report an error. In addition, this addresses a comment in
https://dart-review.googlesource.com/c/sdk/+/56041

Change-Id: Id3415529a7b8635273221c7c2f3d36e1695a9ece
Reviewed-on: https://dart-review.googlesource.com/56540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-24 15:54:32 +00:00
Jaime Wren 351d70674d Initial new union of Dart Analysis Fixes, the initial fix is to remove all unused imports in a file.
Change-Id: I259e796b2603234955a1950b2c886e6f08a697bc
Reviewed-on: https://dart-review.googlesource.com/56220
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-24 15:23:40 +00:00
Erik Ernst e8bb129816 Adjusted setter conflict specification, cf. #33077
Change-Id: I76b709a3ef4b7c542f83912b0bdeddb1bbf34448
Reviewed-on: https://dart-review.googlesource.com/54410
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-05-24 13:54:09 +00:00
Kevin Millikin 0a042a270f Fix a bug in the async transformation of let expressions
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>
2018-05-24 13:16:09 +00:00
Samir Jindel 6fc0c1fa4f [vm/kernel] Only create zone handles when necessary (e.g. in IR instructions, LocalVariable).
Summary:

When evaluating constants for direct inspection (and not for injection into the
FG), we store many intermediate values in ZoneHandles. This leaks memory, since
the only need for ZoneHandles is preserving constants which are referenced by
the FG.

Test Plan:

Existing coverage is sufficient since no functionality is changed.

Change-Id: I33951eab762a4ad626f07ebf11118247c5a9ad3e
Reviewed-on: https://dart-review.googlesource.com/56345
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-24 13:14:29 +00:00
Terry Lucas 735f7bdcec Updated for expected FF failure.
TBR=sra@google.com

Change-Id: I6eff83c4dd8f4e77a372fa5e17d0bce37c061ea4
Reviewed-on: https://dart-review.googlesource.com/56465
Reviewed-by: Terry Lucas <terry@google.com>
2018-05-24 12:45:48 +00:00
Samir Jindel 02bcbc12fa [vm/kernel] Fix partial instantiation implementation in StreamingConstantEvaluator.
# Summary

As part of commit 772c9bb5f, we changed the representation of partially
instantiated closures to facilitate partial instantiation of local functions.
The compile-time constant evaluator was not updated -- this revision implements
that update.

Fixes task 33211.

# Test Plan

Updated `partial_tearoff_instantiation_test.dart` to test the case which caused
incorrect behavior in task 33211.

Change-Id: I7bbd4fb83a5aea86ffc85c1d9952f1202f098d6b
Reviewed-on: https://dart-review.googlesource.com/56346
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-24 12:20:42 +00:00
Peter von der Ahé 8d4a1ccaf6 Split ReadOnlyAccessGenerator
This prepares the generator to be implemented by the analyzer.

Change-Id: Idccd5af9aac79300186b3a07c636bb580bdd637c
Reviewed-on: https://dart-review.googlesource.com/56491
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-05-24 11:35:02 +00:00
Peter von der Ahé ee9e1c1571 Split TypeUseGenerator
This prepares the generator to be implemented by the analyzer.

Change-Id: I89bf0ca368308e98846c8ea8b7c765398c48ecf7
Reviewed-on: https://dart-review.googlesource.com/56490
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-24 11:35:02 +00:00
Peter von der Ahé 9ec756b31c Split DeferredAccessGenerator
This prepares the generator to be implemented by the analyzer.

Change-Id: I40a91e6455128fedac871eb2691197333e2cba15
Reviewed-on: https://dart-review.googlesource.com/56489
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-24 11:35:02 +00:00
Peter von der Ahé 163807ad40 Split LoadLibraryGenerator
This prepares the generator to be implemented by the analyzer.

Change-Id: Id6e3f3935ce4bd4989b544c251b0e859f256eb19
Reviewed-on: https://dart-review.googlesource.com/56486
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-24 11:35:02 +00:00