This "knob" to turn off constant evaluation for annotations is required
because the TFA transformation leaves annotations in a state where they
cannot be evaluated anymore.
Change-Id: I7720a07ef42ff69834e24a856613ea2e846b4f2d
Reviewed-on: https://dart-review.googlesource.com/52803
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
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>
Instead of simply throwing an exception when a compile-time error was
discovered during constant evaluation, we report the error and continue
transforming.
This also collects a context, which can be used by error reporters to
show users in which context an error occured.
The reason for using an interface for reporting errors is to be able to
report reasonable nice error messages, keep the transformation inside
package:kernel and allow users of the transformation to possibly report
nicer error message, e.g. by adding quotes of source positions (which
will come in another CL). This makes it slightly verbose.
Change-Id: I965cafc690dddb525b20368d03bb978e18a6ee58
Reviewed-on: https://dart-review.googlesource.com/52447
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Simplify by no longer using the signed unboxed int32 type on
64 bit platforms.
R=vegorov@google.com
Change-Id: Ic8eab7308f2ce01e5618344f50f72b95ce13a0dc
Reviewed-on: https://dart-review.googlesource.com/52762
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The device running the test doesn't have dart_bootstrap or the SDK tree.
Change-Id: Ifb8047c6ddbc8d9d7fd5d0b728ab5ee732403bfc
Reviewed-on: https://dart-review.googlesource.com/52987
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Found two mistakes in the tests:
- label2_negative_test had no labels whatsoever.
- label8_negative_test called an undefined function, doAgain().
Change-Id: I4d17c969a2b1422ff96cf68996225ecaaf5fe829
Reviewed-on: https://dart-review.googlesource.com/52868
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
In the process, I discovered multitests can't handle imports to
non-existent libraries. So I fixed that and cleaned up the code.
Change-Id: I9a8557e84f91ba7858bdf98f8732cd0ded55aa1a
Reviewed-on: https://dart-review.googlesource.com/52869
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This test "passes" now that sync-async is enabled by default because the test
completes before it gets a chance to fail.
TBR=sra@google.com
Change-Id: I4e8aaade6b618ab8cd79fbfff354dc99214feb27
Reviewed-on: https://dart-review.googlesource.com/52982
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This reverts commit fbfe5691cb.
Reason for revert: Subtle backwards incompatibility, with no obvious win-win fix.
Original change's description:
> Change completionTarget.forOffset to accept & wrap dangling AstNodes.
>
> Deprecate the entryPoint parameter, but still accept it in place of what
> used to be (positionally) compilationUnit.
>
> Detect if we have a compilation unit or not; and in the case we don't,
> add a new protection by asserting that it has no parent (its the root of
> the dangling tree).
>
> Its more of an implementation detail that completion contributors don't
> work well on dangling nodes, so fix it up for clients rather than
> expecting them to do it themselves.
>
> Change-Id: I3e454734e5b515f4e536f7229d541ca8c6aed60c
> Reviewed-on: https://dart-review.googlesource.com/52645
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Change-Id: I64a6689f7862fb2d256b348491c79c58ee0fe1a9
Reviewed-on: https://dart-review.googlesource.com/52962
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.
Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.
Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The performance I see is similar to using functions.
R=brianwilkerson@google.com
Change-Id: Ib5f675f07b422bd9e6f28df0f9d7ea8b24669f63
Reviewed-on: https://dart-review.googlesource.com/52881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Even if we assign to something that wants a different type, we might
chain some property access on it later on, so it is not nice to don't
suggest anything at all. Instead, we should give higher relevance to
compatible types, but keep all the rest with default relevance, as we
did already for everything other than instance creations.
R=brianwilkerson@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/1107
Change-Id: I86c3c5dded4ad4cbbf28a60c0ae2847f07a3373b
Reviewed-on: https://dart-review.googlesource.com/52863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL fixes error message in NoSuchMethodError thrown by null checks
and line numbers in corresponding stack traces (in AOT).
Name of the called function is placed into object pool, and metadata
for null check site is generated in CodeSourceMap.
Size of flutter gallery in release mode:
Before After
RW 2165286 2201642 (+1.68%)
RO 2122192 2168224 (+2.17%)
RX 6871072 6871072 (+0.00%)
Total 11163079 11245467 (+0.74%)
Closes https://github.com/dart-lang/sdk/issues/32863
Change-Id: I5ad1190f2ec9452a669863f7dd114ea5f9092d52
Reviewed-on: https://dart-review.googlesource.com/52703
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Deprecate the entryPoint parameter, but still accept it in place of what
used to be (positionally) compilationUnit.
Detect if we have a compilation unit or not; and in the case we don't,
add a new protection by asserting that it has no parent (its the root of
the dangling tree).
Its more of an implementation detail that completion contributors don't
work well on dangling nodes, so fix it up for clients rather than
expecting them to do it themselves.
Change-Id: I3e454734e5b515f4e536f7229d541ca8c6aed60c
Reviewed-on: https://dart-review.googlesource.com/52645
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
The symbols we previously needed (SyntheticBeginToken and
SyntheticToken) are now exported from the analyzer as of
dc21d3ce9d.
Change-Id: I5d0901c544fed0983d45c1da1dccfd5659a7777c
Reviewed-on: https://dart-review.googlesource.com/52821
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 86ba29265a.
The replacement API (int.tryParse) has only just been introduced and
is not yet avaiable to internal Google users. I plan to un-do the
commit in about a week once the internal SDK has been updated.
Change-Id: Ic9206231861400d42f4814e4a56bde57ba8705a5
Reviewed-on: https://dart-review.googlesource.com/52822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
* Fix a runtime error when dart_style is itself run in Dart 2.
* Force splitting an empty block as the then body of an if with an else.
* Use the new lowercase Dart 2 constant names.
https://github.com/dart-lang/sdk/issues/32961
Change-Id: I283f28a5e75016528093358a899b7f983ae1445e
Reviewed-on: https://dart-review.googlesource.com/52760
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Based on https://dart-review.googlesource.com/c/sdk/+/52340, but adds
the necessary plumbing through the test system to pass through
negations to strong and preview-dart-2. Also adds support for those
negations to the analyzer.
Change-Id: I9793ff28bb593d25bbb0a2ed8736b5b53e0a62d8
Reviewed-on: https://dart-review.googlesource.com/52461
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Currently, kernel metadata does not support references to nodes which
are not reachable from root Component. This CL adds an error if such
reference exists, instead of silently writing zero offset.
Change-Id: I6de886296bea66bd732f379cc99e0e3693ea79af
Reviewed-on: https://dart-review.googlesource.com/52527
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>