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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>