Commit Graph

685 Commits

Author SHA1 Message Date
Dan Rubel daee781179 Revise beginTypeVariable event in event sequence
This is the first CL in a series aimed at removing the need to reparse type variables in
https://github.com/dart-lang/sdk/blob/master/pkg/front_end/lib/src/fasta/kernel/body_builder.dart#L3669
and ultimately improving recovery by removing parseType.

* Move calls to listener.beginTypeVariable after parsing metadata and identifier
* Pass variable name via beginTypeVariable rather than via handleIdentifier
* Add additional check in test for issue 31846

Change-Id: I983b9d17675fc899c83df69fa1777059903e3f52
Reviewed-on: https://dart-review.googlesource.com/58300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-05 15:11:00 +00:00
Kevin Millikin 6ac6baae8e Record interfaceTargets for calls on dynamic receivers
When calling Object methods on dynamic receivers, record the
interfaceTarget it Kernel.  Back ends will use this to treat the call
as a statically typed one.  This is half of the problem in
https://github.com/dart-lang/sdk/issues/33293

Bug: https://github.com/dart-lang/sdk/issues/33293
Change-Id: I8d05903e5b85370a4e697ad3afc494cbc14bcc6a
Reviewed-on: https://dart-review.googlesource.com/57820
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-06-04 09:47:21 +00:00
Aske Simon Christensen 4fb6395058 Report error when a constructor has type parameters.
Fixes https://github.com/dart-lang/sdk/issues/30678
Fixes https://github.com/dart-lang/sdk/issues/33110

Change-Id: I7d3fcd56d408fefce7a0b43ffd68cc5427eb0940
Reviewed-on: https://dart-review.googlesource.com/57507
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-06-01 12:48:09 +00:00
Kevin Millikin b62b438e8a Infer Object members for dynamic receivers
For method, getter, and setter invocations with names of methods on
Object on expressions with static type `dynamic`, if the invocation
cannot possibly be an invocation of noSuchMethod, infer the type of
the invocation using the type of the member of Object.

This implements the feature spec
https://github.com/dart-lang/sdk/commit/472ec7780f1bb38f049d0fcc903a69bfb8ef9133

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

Change-Id: I135156346fe1468561d56a01cf3c5f0efde30739
Reviewed-on: https://dart-review.googlesource.com/56942
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-31 12:43:22 +00:00
Dan Rubel 796f5301dd Report FieldInitializerOutsideConstructor error in BodyBuilder
Change-Id: I357b6164abc4d47ac558496ed3dbb149550e6f43
Reviewed-on: https://dart-review.googlesource.com/57180
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-31 11:44:02 +00:00
Dmitry Stefantsov 5ecd78222e [kernel] Add an option to the cloner for cloning annotations
Fixes #33099

Bug: http://dartbug.com/33099
Change-Id: I291e75fa49fb6bf62557cfeab0c874c5de9b618d
Reviewed-on: https://dart-review.googlesource.com/57264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-31 10:11:52 +00:00
Peter von der Ahé bb0808db80 Replace Builder by Declaration
Change-Id: I1d9997ab22290e9fc882b64b0934f70c6aed2261
Reviewed-on: https://dart-review.googlesource.com/57505
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-05-31 09:19:33 +00:00
Peter von der Ahé 032925c4ff Remove obsolete features
Remove tree-shaker as we're not using it, and it creates problems
when the SDK changes.

Remove scopes from AstBuilder as we will be phasing out AstBuilder
in favor of using BodyBuilder and the Forest API.

Change-Id: I51950c5d8bfb0493587336325f9da8f5bf8ecea6
Reviewed-on: https://dart-review.googlesource.com/57261
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-31 07:24:54 +00:00
Dmitry Stefantsov 7dc4fbf5a2 [fasta] Add support for annotations on enum values
Fixes #33083

Bug: https://github.com/dart-lang/sdk/issues/33083
Change-Id: If278ee3c59489944e2e821ae48ba3cb363dbbdd1
Reviewed-on: https://dart-review.googlesource.com/56496
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-29 10:41:55 +00:00
Alexander Aprelev f981f09760 Revert "Clone annotations when cloning nodes that have them"
This reverts commit 75a75263d3 as it breaks Flutter

Bug: https://github.com/dart-lang/sdk/issues/33242
Change-Id: I825b0da4757f1ff9a318f8203605761d61d25e01
Reviewed-on: https://dart-review.googlesource.com/56722
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-26 03:16:14 +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
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
Kevin Millikin 51fa5c1662 Correctly transform async functions with FutureOr return types
The async transformer did not allocate a completer with the correct
type in the case for async functions with a FutureOr return type.

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

Change-Id: I72654f24576295e38e8d79dff30aae5c90cb2564
Reviewed-on: https://dart-review.googlesource.com/56488
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-24 10:54:03 +00:00
Aske Simon Christensen 8427d53a4d Extra precedence level in parser to distinguish postfix operators and selectors
Fixes https://github.com/dart-lang/sdk/issues/31185

Change-Id: I77d617f6abd367d857741d04cf47571ea7492c6a
Reviewed-on: https://dart-review.googlesource.com/56111
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-05-23 16:13:55 +00:00
Dan Rubel 0271003c33 Extract parseFunctionLiteral from parseType
This is another step towards removing parseType and improving recovery.

Change-Id: Ie2cb1999406bc603355015e8a3b9aaa854f785db
Reviewed-on: https://dart-review.googlesource.com/56120
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-23 13:40:06 +00:00
Dmitry Stefantsov 9f1097948a [fasta] Add and use a type-inference-specific interface of BodyBuilder
Change-Id: I04c954c4233cc6c43b1f065be95f587a09ed5003
Reviewed-on: https://dart-review.googlesource.com/56328
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-23 13:15:05 +00:00
Aske Simon Christensen 6cc0d9770f Skip expressions by parsing them with a no-op listener.
This change slows down Fasta by around 0.5%, as it now does a full
parse of expressions outside bodies in the outline and diet parsing
phases, but it is, for now, a more robust solution than the heuristic
skipExpression, fixing several crashes.

Fixes https://github.com/dart-lang/sdk/issues/31155
Fixes https://github.com/dart-lang/sdk/issues/31171
Fixes https://github.com/dart-lang/sdk/issues/31188

Change-Id: Id5639dbd8b4c3f1f7e42eed66e3bee60f37bc3dc
Reviewed-on: https://dart-review.googlesource.com/55660
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-22 16:51:29 +00:00
Aske Simon Christensen e191d4feb5 Simplify errors on invalid arguments
Change-Id: I1bd94725b4e4e44e706c6d22543bbea22649ec69
Reviewed-on: https://dart-review.googlesource.com/55680
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-22 11:14:22 +00:00
Alexander Aprelev e71bd048e5 [vm, kernel] Fix async stack code traversal in dart2.
With this change debugger requests yield(await) positions from kernel builder so it can confirm which frame handles what exceptions.
This also renames ':completer' to ':async_completer' in constructed kernel, so it is compliant with what VM expects to see(and updates test expectations accordingly).
Further it fixes async stack navigation for sync-async that became default in dart vm since first version went for the review((uses `future` getter, rather than property).
It also makes `future` getter non-debuggable to allow stepping-out of async methods.

Make Handle zone-scoped. Clean up frame counter var name.

Bug: https://github.com/dart-lang/sdk/issues/29056

Change-Id: Ia71f3c851a6b313655b57dad28c296f5dd081eda
Reviewed-on: https://dart-review.googlesource.com/54640
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-22 00:27:01 +00:00
Peter von der Ahé 0c2b349827 Blocks and variable declarations in Forest
This is a starting point for supporting blocks and variable
declarations in the forest API. I'm not sure exactly how the
analyzer handles variable declarations, so we'll probably have
to iterate on that part.

Change-Id: I93aec818baec24f8b038f02c66699117070d6b0c
Reviewed-on: https://dart-review.googlesource.com/55683
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-18 13:55:47 +00:00
Dmitry Stefantsov d59745029a [fasta] Update expectation files after CL 50945
Change-Id: I639fe81e848bec4a3d8735f55750d59eb422763d
Reviewed-on: https://dart-review.googlesource.com/54246
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-05-17 14:27:46 +00:00
Jens Johansen fd26343f98 Fix invalidation not sticking on compile error
Before this CL, the invalidated URLs would be cleared sooner than we
threw away the old "userCode".
On a compile time error (issuing an erroneousComponent) we restore
the old userCode, thus in practical terms forgetting about whatever
had been invalidated prior to that.

This CL introduces a test and fixes the problem.

Change-Id: I8f5329c2f499ec3842d0b7d67e2eda1de1e7d938
Reviewed-on: https://dart-review.googlesource.com/52321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-05-15 14:25:16 +00:00
Samir Jindel 1a23ff68a5 Fix incorrect handling of NSM forwarders and pull all logic into CFE. (Take 2)
The behavioral difference is that named and optional arguments are filled in
with their default values in the `Invocation` object passed to `noSuchMethod`.

On the implementation side we make NSM forwarders concrete and fill in their
bodies in the CFE. The custom (and somewhat hacky) VM support is no longer
needed, and Dart2JS can benefit from this implementation as well.

According to discussion on #33031 we will be able to re-land this soon without
breaking Mockito.

Prior failures on precompiler bots are fixed in Patchset 2.

Change-Id: If1b7fe4cf6da5ef38f330e1ad226121bcfc958a1
Reviewed-on: https://dart-review.googlesource.com/54401
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-15 11:23:32 +00:00
Kevin Millikin 8dbe716085 Remove the unused GenericCovariantInterface bit
None of the back ends are using it and it imposes a cost to have to
compute it and try to preserve it.

Change-Id: I217e1191b535829021fa11f2698cadd8d4baf1c8
Reviewed-on: https://dart-review.googlesource.com/54383
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-09 15:04:43 +00:00
Dmitry Stefantsov fe3f87f192 [fasta] Reland "Handle annotations on formals and variables"
The original CL: https://dart-review.googlesource.com/c/sdk/+/51840

Bug: http://dartbug.com/28434
Change-Id: I0812ef4223337f5bf72218dfac0f26f76a6b9df1
Reviewed-on: https://dart-review.googlesource.com/52449
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-05-09 09:53:42 +00:00
Kevin Millikin 8f6c6c2a8e Implement some missing override checking
Detect the following conflicts:

  - declaring a method and inheriting a setter or getter with the same
    name

  - declaring a getter or setter and inheriting a method with the same
    name

  - inheriting both a method and a getter or setter (or both) with the
    same name

Declaring a method and a getter with the same name is already
detected.  Declaring a method and a setter with the same name is not
yet detected, because it should be done in the same way as
method/getter declaration conflicts.

Bug: https://github.com/dart-lang/sdk/issues/32613
Change-Id: I2d168894453d7032372388faa0872d3fc7aa9ef7
Reviewed-on: https://dart-review.googlesource.com/53803
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-05-08 13:40:51 +00:00
Samir Jindel 03abbc73d2 CFE support for expression evaluation, refactored.
Change-Id: I7eac1020b7aa11ea0276f909d7b11ee6388b1aa7
Reviewed-on: https://dart-review.googlesource.com/53209
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-08 11:20:35 +00:00
Samir Jindel 054559c5f3 Revert "CFE support for compiling individual expressions in a context."
This reverts commit 9038b8f45f.

Revert "Refactoring to allow compilation inside a library loaded from Dill."

This reverts commit 12d697b2ea.

Change-Id: Ia617e464d0c34a6685d351b73abf20def75021ad
Reviewed-on: https://dart-review.googlesource.com/53420
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-08 11:20:35 +00:00
Dmitry Stefantsov 4f586e265e [fasta] Update expectation files after CL 50941
Change-Id: I85aba2501a7b8a911e122f0a802dfc21b7e87e1e
Reviewed-on: https://dart-review.googlesource.com/51620
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-05-08 10:53:47 +00:00
Alexander Aprelev 2765fcf2ae Revert "Revert "Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE."""
This reverts commit 9a7e1f64a2 as it
breaks mockito tests and commit 0bc6e7217a as being done for
9a7e1f64a2.

Bug: https://github.com/dart-lang/sdk/issues/33031
Change-Id: Id20a83c8a7a62ec73446180ecb37e9200f3a92b6
Reviewed-on: https://dart-review.googlesource.com/53540
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-03 06:01:08 +00:00
Alexander Aprelev 9a7e1f64a2 Revert "Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE.""
This reverts commit 24dd9b4176 as it broke
the presubmit buildbots.

Change-Id: If225ad7c5728413860ce7b5493e8a7fcd92f54e8
Reviewed-on: https://dart-review.googlesource.com/53461
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-05-02 19:48:25 +00:00
Samir Jindel 24dd9b4176 Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE."
This reverts commit 7d5025e814.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Fix incorrect handling of NSM forwarders and pull all logic into CFE.
> 
> The original implementation was designed around a shared misunderstanding
> of optional parameter handling in the spec. (which was also ambiguous about type parameters).
> 
> The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
> This behavior can be implemented without any backend support, as is done in this CL.
> 
> Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
> Reviewed-on: https://dart-review.googlesource.com/52802
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>

TBR=dmitryas@google.com,sjindel@google.com

Change-Id: Ice6cd36cc62772e013bded83e0f589fe4b5e9d53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/53400
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-02 16:05:26 +00:00
Samir Jindel 0bc6e7217a Update expression compilation expectations.
Change-Id: Ia335aad6a736723b571d611f849ba7e8ad991865
Reviewed-on: https://dart-review.googlesource.com/53382
Reviewed-by: Jens Johansen <jensj@google.com>
2018-05-02 13:44:21 +00:00
Samir Jindel 9038b8f45f CFE support for compiling individual expressions in a context.
Change-Id: I6469fb16e8846eccaeca3f8585872f4b69dd3f1e
Reviewed-on: https://dart-review.googlesource.com/38123
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-05-02 12:45:03 +00:00
Samir Jindel 7d5025e814 Fix incorrect handling of NSM forwarders and pull all logic into CFE.
The original implementation was designed around a shared misunderstanding
of optional parameter handling in the spec. (which was also ambiguous about type parameters).

The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
This behavior can be implemented without any backend support, as is done in this CL.

Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
Reviewed-on: https://dart-review.googlesource.com/52802
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-02 12:18:30 +00:00
Kevin Millikin 9371ca061c Remove all the contravariance bits
Change-Id: Ib43b32d12749ddac0a93795cb5e8543eb5131dd9
Reviewed-on: https://dart-review.googlesource.com/52867
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-05-01 10:56:11 +00:00
Samir Jindel 69f35c18bc Test code for CFE expression compilation.
Change-Id: I90f953592d66be04bfb26ffb5f604ba5e7f010a5
Reviewed-on: https://dart-review.googlesource.com/51322
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-04-30 15:33:11 +00:00
Dmitry Stefantsov 5af05d407d [fasta] Report type argument number mismatch during outline building
Change-Id: I1c1f22f3117ccbfc8620b3b0459bc96ed1ad1bdf
Reviewed-on: https://dart-review.googlesource.com/51128
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-04-30 13:01:15 +00:00
Martin Kustermann 859a216e89 Add missing annotations in Library.visitChildren/transformChildren
Change-Id: I0e06b19a2d47383a2cbcbdda123e4d6e41acf537
Reviewed-on: https://dart-review.googlesource.com/52444
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-04-25 10:20:18 +00:00
Dmitry Stefantsov 1f7fa3e1ad Revert "[fasta] Handle annotations on formals and variables"
This reverts commit 0289071afe.

The reverted commit breaks precomp bots.

Change-Id: I3218d5a0779e1f30f4172ede2294be558ded2abd
Reviewed-on: https://dart-review.googlesource.com/52103
Reviewed-by: Jens Johansen <jensj@google.com>
2018-04-20 13:32:59 +00:00
Dmitry Stefantsov 0289071afe [fasta] Handle annotations on formals and variables
Bug: http://dartbug.com/28434
Change-Id: If386d24f95d14a38150c9316caf7a17065583e32
Reviewed-on: https://dart-review.googlesource.com/51840
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-04-20 11:19:39 +00:00
Aske Simon Christensen e33a636317 Fixes to frontend tests.
Tests contained erroneously abstract methods and non-abstract classes
that made them not proper Dart 2.

Change-Id: Ie04935f3ffd4aa4e9756048de9668c5481553733
Reviewed-on: https://dart-review.googlesource.com/51845
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-20 10:54:59 +00:00
Aske Simon Christensen f50c86c419 Fixed noSuchMethod implementation in future subclass tests.
Change-Id: Ia8f5eb36b2103b7312062167ae917e9c97b738b5
Reviewed-on: https://dart-review.googlesource.com/51843
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-20 10:41:39 +00:00
Aske Simon Christensen 2b09c1efc0 Revert "Error on missing method implementation in non-abstract class"
This reverts commit 7cc55d0372.

Reason for revert: More test fixes needed.

Change-Id: Ib36159184ffbd14ce3f7cca184ce2b8cdfec237c
Reviewed-on: https://dart-review.googlesource.com/51680
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-18 17:27:22 +00:00
Aske Simon Christensen 7cc55d0372 Error on missing method implementation in non-abstract class
Closes https://github.com/dart-lang/sdk/issues/32013

Change-Id: I8f49d2640ef92a3d9d723969208cdb5f397e806d
Reviewed-on: https://dart-review.googlesource.com/43660
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-18 14:39:09 +00:00
Jens Johansen 16696ca9d5 Cleanup in incremental compiler test
Address comments from https://dart-review.googlesource.com/c/sdk/+/49642.

Change-Id: I80bc2f851d5f65b81d9e44e2c412f2b0b2d208c2
Reviewed-on: https://dart-review.googlesource.com/50200
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-17 09:39:46 +00:00
Samir Jindel f85480b4dd Add tests for CFE implementation of expression compilation.
Change-Id: Ib7af386876d831e84ca97c42bbe3084c96fcc114
Reviewed-on: https://dart-review.googlesource.com/49906
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-16 19:29:38 +00:00
Peter von der Ahé 974a8ee21d Fix crash in named function expression
Fixes https://github.com/dart-lang/sdk/issues/32694

Change-Id: Idfc2dbe11e44d6d927924a6fc54cf31cee66a6ae
Reviewed-on: https://dart-review.googlesource.com/51120
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-04-13 12:02:47 +00:00
Peter von der Ahé 1e312819ca Ensure errors guard erroneous expressions.
This changes wrapInCompileTimeError so we are certain that
compile-time errors are reported before the erroneous nodes.

We want to preserve erroneous nodes as, long term, this should help
with code completion.

Also introduce a located version as my next CL I'll have slightly
more accurate locations.

Change-Id: Id83d4b7a7d4fe260916816d72fac331251bad948
Reviewed-on: https://dart-review.googlesource.com/50422
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-04-12 14:51:19 +00:00
Jens Johansen df6055d876 Only bypass cache when .packages is invalidated
In a86b864fa9 the incremental compiler was
updated to always bypass the cache when getting a UrlTranslator to be
able to handle the case where .packages had been updated.

This was driven by Flutter not invalidating .packages.

This has now been introduced in flutter with
https://github.com/flutter/flutter/pull/16467
and we can now limit when we bypass the cache to when the .packages file
has been invalidated.

This CL does just that, and further more adds tests where .packages either
appears or disappears.

Change-Id: I3e2d001a993a59c115bc00fcf714f97094357d35
Reviewed-on: https://dart-review.googlesource.com/50940
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-12 11:40:44 +00:00