This CL updates dart:io but not dart:_http. It updates the sdk sources,
the patch files, and tests.
Change-Id: I64c3da407f09fa2bc6eec582049c4ae3a8afbe6d
Reviewed-on: https://dart-review.googlesource.com/52990
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Most notably this fixes mixins, but a few others issues were discovered
as well. Fixes#32428.
This gets dartdevk closer to producing a valid Dart SDK file
Change-Id: I2973baef279d6b71ed29b97bec758b2d3209c275
Reviewed-on: https://dart-review.googlesource.com/51760
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Step (1) to flipping the default. When this lands and rolls in, we
can change internal code to explicitly opt-out.
See #32868
Change-Id: Ibd6fc08d6d71b0093decf5667e9b8cdc2b49e3d1
Reviewed-on: https://dart-review.googlesource.com/51444
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
This migrates the JS builtin's string type to the `<T>` type parameter
for a few more cases. This was done to eliminate null checks, casts and
dynamic calls when dartdevk builds the SDK, so it matches dartdevc.
Change-Id: I8570e5127149a45289a90002c27034333c3038ad
Reviewed-on: https://dart-review.googlesource.com/51207
Reviewed-by: Leaf Petersen <leafp@google.com>
It's possible for `dart.fn` (tearoff) to be called after `dart.lazyFn`,
so lazyFn needs to support a setter.
Change-Id: Iaba1a1d6145d94501c77de6a6a2c107eac2d92d7
Reviewed-on: https://dart-review.googlesource.com/51441
Reviewed-by: Vijay Menon <vsm@google.com>
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.
Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Also removes unsafe-force-compile for DDC's selfhost during snapshot
build, and fixes DDK's snapshot to train by selfhosting.
This does not enable preview-dart-2 for DDC/DDK's snapshots or on
the buildbots yet.
Change-Id: Id0b395eb67677d0e69dc5e827536a9039bc95816
Reviewed-on: https://dart-review.googlesource.com/51206
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
- changes top-level/static method tearoffs to work similar to instance
method tearoffs (attach typeinfo at the tearoff location).
- changes getters/setter signatures to a more compact representation.
- fixes incorrect reification of tearoffs in DDC Kernel backend,
causing a couple of tests to pass after the changes.
- module startup should also be faster, because we avoid using
`defineLazyProperty` for signatures.
Change-Id: I9d1705adcd5101a99f0599120cb927396eae778a
Reviewed-on: https://dart-review.googlesource.com/48455
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
When enclosingElement is `null` we fail to find the library. There are
several places in the compiler that depend on having a library available
for resolved elements.
Change-Id: I2746110d8caed97733c73e89e6baef3e96882563
Reviewed-on: https://dart-review.googlesource.com/49544
Reviewed-by: Vijay Menon <vsm@google.com>
This no longer fails on a bogus error (setting a stack on a primitive):
main() async => throw "hi";
Doesn't come up in tests as that path (rethrow) is only exercised for unhandled exceptions.
Change-Id: I69bcf8c1c6a0cf8841c626594f95c48114ae5aaa
Reviewed-on: https://dart-review.googlesource.com/48463
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
This works around broken FunctionTypeImpl.== in Analyzer. Also
makes DDK's type naming heuristic more consistent with DDC.
Change-Id: I09527fad681c3fdc6c66654e572e9b03c57491bd
Reviewed-on: https://dart-review.googlesource.com/37120
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
This disables most runtime features of dart:isolate, similar to dart:io.
For now, this supports `new ReceivePort()` and `ReceivePort.close` as
those are used by async tests to keep the Dart VM alive. Those are
no-ops in DDC. Also removes most of dart:_isolate_helper, except for
the JS API that's used to bootstrap DDC `main()`.
Change-Id: I84eab6cd39d05a70a6afe982e952076ddaaa8c0f
Reviewed-on: https://dart-review.googlesource.com/45754
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Translate assert statements in async functions. The translation of
the condition subexpression can produce a sequence of statements that
have been hoisted out of it. These need to be guarded so they are
executed only when asserts are enabled.
For this purpose, we introduce an AssertBlock. The semantics of the
assert block:
assert { s0; ...; sn; }
is the same as:
if (assertsEnabled) { s0; ...; sn; }
where assertsEnabled is a more primitive nullary expression that is
true iff. assertions are enabled. We chose not to encode this using a
construct like assertsEnabled because (1) we would have to support it
appearing as an arbitrary expression which we don't currently need
and (2) it requires deeper pattern matching to detect and skip the
guarded code when desired.
The translation is more complicated because if there is a message
subexpression in an assert, it is conditionally evaluated only if the
assert's condition is false.
Fixes https://github.com/dart-lang/sdk/issues/28498
Change-Id: I0912a57104ede3160533e49f65b6fb79b76f1500
Reviewed-on: https://dart-review.googlesource.com/46442
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This bug prevented various DDC features from working correctly at
runtime, such as tearoffs, dynamic call checking, generic methods, and
parameter type checks.
Change-Id: I02cd27abbcb1d5f42b9d4ac504c7dd8bc80c866a
Reviewed-on: https://dart-review.googlesource.com/45960
Reviewed-by: Vijay Menon <vsm@google.com>