The previous system let you use this to define an "unspecified error":
int i = "bad";
// [unspecified error]
The marker comment meant that *both* front ends had to report some error
on the previous line, but any error at any position was considered
acceptable.
Unfortunately, this doesn't let us incrementally specify an error for
one front end while leaving it unspecified for the other. This means
that when, say, the analyzer implementation lands first, we can't pin
down its errors while still leaving the CFE errors unspecified until
its ready.
This addresses that by making "unspecified" a property of each front
end, not the error itself. The new syntax is:
int i = "bad";
// ^^^
// [analyzer] unspecified
// [cfe] unspecified
This means the same thing as the previous example: both front ends must
report some error on the previous line. The column information is
authored as a best effort, but ignored.
Now, let's say the CFE implementation lands. The above can be changed
to:
int i = "bad";
// ^^^
// [analyzer] unspecified
// [cfe] Real error message.
At this point, the CFE test must report that exact error at that exact
position and message. But the analyzer is still free to report any
error code anywhere on that line.
This syntax is a little more verbose, but it's simpler and more
flexible.
Change-Id: I37f937d245fd8ec8054acb6128256f9fff6241e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109728
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This reverts commit 62674b977d.
Reason for revert: There is no reason we should ever encounter an unevaluated
constant in DDK and doing so implies there is an error in the constant evaluation.
We hope to find all such errors with this assertion. If this causes any more test
failures, feel free to revert this again and create an issue so we can fix.
A fix for the issue seen in the flutter-hhh bot has landed:
https://github.com/flutter/engine/pull/10069
Original change's description:
> Revert "[dartdevc] Immediately throw when encountering an unevaluated constant"
>
> This reverts commit fd38424fa4.
>
> Temporarily disabling this to get Flutter roll going. See
> https://github.com/dart-lang/sdk/issues/37605
>
> TBR=nshahan@google.com
>
> Change-Id: I44dbb1d4aaf8d5f9cc05f096d26cade93a364f4c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110120
> Reviewed-by: Vijay Menon <vsm@google.com>
> Commit-Queue: Vijay Menon <vsm@google.com>
TBR=vsm@google.com,nshahan@google.com
Change-Id: Ibcb719d3e6c0026b11a812bec853e158b338d51a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110185
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This exposed an analyzer bug--see #37608.
Change-Id: I96af785ce81ebb7b142b4f71cb43942b2b15f879
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
We should add it only to the defining unit of dart:core, otherwise
we get it in every unit, which is a conflict, and it is still
unresolved.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: Ief28b949cc0fe1ed71c91a4efa679d15fbb26a6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110129
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
I was not able to find any existing tests, and it looks like an
important feature, which we don't want to break. I will need to verify
that it continues for work with summary2.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: Ied2985ebd7b71e85a4b49ec43bf22360fbdd01cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
There is no need for two separate abstract scanner classes,
so ArrayBasedScanner functionality has been moved into AbstractScanner.
Change-Id: I88765b0b1fa5bf5c73f457ceb5f85cae73b33a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
The library tag handler needs to be available during set up of child isolate, during kernel loading for the isolate(due to usage of native extensions).
Setting up library tag handler in initialize_isolate callback is too late for that.
Change-Id: Ie152d2c699ce3318e90325e693b6c66d30267d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This change ensures that instances of UnmatchedToken are always prepended
to the token stream. This should prevent the exception that occurs in
https://github.com/dart-lang/sdk/issues/37491.
This addresses only one type of error token and we may see a similar
exception with other types of error tokens.
Future CLs will prepend other and eventually all error tokens.
Change-Id: I99cdc331c03f47b21c5a67d436a0e62ebf416e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Use the same language when describing a change that is only breaking
for implementors of a type
Change-Id: Ice9472f0582c3b737034a63fb8a3bc3adc5ae96e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108683
Reviewed-by: Vijay Menon <vsm@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Also, re-enable some tests that were unintentionally commented out.
Change-Id: I88ee5cf690c6c7132d80becae6952add229eba47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109983
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The combination of type expression hoisting, hot restart, and generic cache
reset triggers occasional breakage (see #37259). Not clearing the generic
cache should be safe, but will some leak memory: unloaded types will
pollute the cache. References to those unloaded types in user code,
however, should be cleared.
Bug: https://github.com/dart-lang/sdk/issues/37259
Change-Id: Ia15115a41556db7a19109f0178baa63ec0cfcb9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109100
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
This allows us to use ui-as-code and set literal features in these
packages.
This should be safe because (a) when these packages are used within
the SDK itself, they are used with the most recent SDK (whose version
is greater than 2.2.2), and (b) the only significant dependency on
these packages in pub is from the analyzer, which already has a
minimum SDK version of 2.2.2.
Change-Id: I4f7d4c9506904ee3016db95297b45e5bcf7989b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110060
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This will allow it to be used by both the front end and the analyzer.
Change-Id: I3af67aaf3ad7ff2cca0cb245518570892ad473e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109986
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
It was redundant with State.setReachable(false), and it did not have
the necessary logic to avoid creating State objects when unnecessary.
Change-Id: If9e0b8b586dab0e681f4ee0bc7b792d49e1e5f4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109897
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This CL moves the thread registry and the safepoint handler to the
[IsolateGroup]. This will cause all threads belonging to the isolate
group to safepoint together.
=> We will therefore start to get an idea of the impact this will have on
pause times.
So far it was only possible to enter a particular isolate (e.g. as mutator
thread or auxiliary thread). This CL adds support for entering an isolate
group (instead of a particular isolate) as an auxiliarly thread. The
current isolate group is available via `IsolateGroup::Current()`.
=> This is a preparation step to let GC threads enter the isolate
group as auxiliary threads, not associated with a particular isolate but
to an isolate group as a whole.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: I7069d07130938d370869f02060570143bfeb1b48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108801
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
NamedTypeBuilder and MixinApplicationBuilder are only subclassed by
KernelNamedTypeBuilder and KernelMixinApplicationBuilder, respectively,
so the distinction can be removed.
Change-Id: If0a6434d76c20c3c10a8e25b86d2a5542d5244b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109263
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>