dart:isolate was used for the `Future<Isolate>` return type of
spawnDomUri, which is an unimplemented experimental method. This method
now returns `Future`.
This change helps dart4web disable support for dart:isolate (#30538)
Change-Id: Ida87c2a27ac33d1b9a14feb7dd6d306a546a0aaf
Reviewed-on: https://dart-review.googlesource.com/43860
Reviewed-by: Terry Lucas <terry@google.com>
Some legacy libraries may import dart:mirrors, but not use it. This CL turns them
into a runtime error temporarily to give some time for the library
maintainers to remove the import to dart:mirrors in the future.
Change-Id: I876133908d2a61300256915aab54730bdff51649
Reviewed-on: https://dart-review.googlesource.com/43640
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Change-Id: I40574d695826a3ed038c7c756ce980fae001325d
Reviewed-on: https://dart-review.googlesource.com/43040
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Event type parameters instead of dynamic.
- Fixed missing interceptor in dart2js for MutationEvent (even though its deprecated
and should not be used). The MutationEvent is created when a node is deleted. Enabled
Dart MutationEvent class generation.
- Fixed/re-enabled all indexed_db tests to run and pass successfully.
Stephen please take a look - target in VersionChangeEvent is a final field, per your suggestion,
instead of a getter. The MutationEvent is returned in the browser and without the MutationEvent
Dart class the error:
Uncaught TypeError: t1.get$target is not a function
R=vsm@google.com,gabrielchow@google.com,sra@google.com
Change-Id: Ic36aea8c33b4263a32ff9d047ba3e6b979e03b10
Reviewed-on: https://dart-review.googlesource.com/41569
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
Change-Id: I86c8d849c8137854b3a2dfa966cf86c9475f9f72
Reviewed-on: https://dart-review.googlesource.com/43201
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This change is to recover 6% lost on Intl.NumberFormat.format.reused
when JSNumber was make Dart2 clean.
Use invoke_dynamic_specializer to replace call with HAbs instruction.
Inject receiver check to condition receiver to a non-null number to
improve. This part makes x.abs() one of the operations 'trusted' by
'--trust-primitives'.
Add one-shot accelerators for abs and get:sign.
Change-Id: Ia423c4b398114abe1d4a784febbe664710f0a242
Reviewed-on: https://dart-review.googlesource.com/42890
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
In JavaScript, and integral valued double is an 'int'.
Change-Id: I79dedcb00f74dc699f85a21a2052239ed25b7974
Reviewed-on: https://dart-review.googlesource.com/41640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This may introduce extra interceptor methods for JSInt, we should consider
optimizing these separately (see https://github.com/dart-lang/sdk/issues/32252)
Change-Id: I26ee463c8672d67cd44b21b6ac50a1842b6e7b1e
Reviewed-on: https://dart-review.googlesource.com/42523
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This is a partial list, there are still 8 issues remaining, most of them in
js_number.dart, one that is not but the FE is not giving me a location for some
reason.
Change-Id: I2bd1d24256147e255f487e100ce800c3ba791ce5
Reviewed-on: https://dart-review.googlesource.com/42122
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
1. Make bitLength work on very large values. This fixes problems with
BigInt.from on large values.
2. Restructure to allow Math.clz32 to be used once dart2js no longer
supporst IE11.
Change-Id: I255f030ff3b3630cdee63502d11a8b6630a4f008
Reviewed-on: https://dart-review.googlesource.com/41960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Change-Id: I44c084353b35e16cd2fd5481d86a7be6c0b62ef3
Reviewed-on: https://dart-review.googlesource.com/41160
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This change adds most of Dart 2 subtype checking to js_runtime.
The main observable change is the stronger subtyping of function types.
The subtype code is split into V1 and V2 methods with the intention to
eventually remove the V1 paths.
There is a lot of minor details that are still TODO:
- TODO: generalized void
- TODO: comparison on type variable by it's bound
- TODO: FutureOr
Change-Id: Id05db0aef5ce0d58416a72f1538a90ed67436b3e
Reviewed-on: https://dart-review.googlesource.com/37960
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
On Fuchsia, we need external typed data arrays that are backed by
read-only regions of memory. Today, writes to these typed data
lists crash the process. This change allows us to wrap the
external typed data in unmodifiable views so that an exception
is thrown instead of crashing.
related #32028
Change-Id: I94dc5e1771b73480cb0eb21799215c090000fd5f
Reviewed-on: https://dart-review.googlesource.com/40201
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Switch default for StreamController.addStream cancelOnError parameter to false.
Add orElse named argument to Stream.{first,last}Where.
First step in renaming the argument from defaultValue to orElse.
Change-Id: I22039c1f6933664ebc287c71e802799a64776f08
Reviewed-on: https://dart-review.googlesource.com/34822
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.
Change-Id: I7a12fea533d42b0fc8357086649df38ad01f3cdd
Reviewed-on: https://dart-review.googlesource.com/39140
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This reverts commit 0b59f24f97.
Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751
Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
>
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>
TBR=lrn@google.com,leafp@google.com
Change-Id: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.
Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
The classes are still identical, but will diverge as the VM will provide an
optimized version.
Change-Id: I8397fd927b89fa745ac7aa4b8d98e562140f731b
Reviewed-on: https://dart-review.googlesource.com/35521
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
They are encoded as annotations on the importing library, similarly to
how native methods are encoded.
Change-Id: I4dc1119b20949308e4856666693fe4e890e9ee87
Reviewed-on: https://dart-review.googlesource.com/35660
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Adds a ProcessStartMode in which the child process inherits the stdio
handles from the parent.
Change-Id: Ibe7b8ae08caccaed827ae0a911a3cced7803cb6b
Reviewed-on: https://dart-review.googlesource.com/36362
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
The content handlers on Fuchsia can potentially give each Isolate
different handles to use for stdout and stderr. This change provides
a hook for an embedder to call to supply the handles to Dart, and
removes hardcoding of stdio handles to 0, 1, 2.
Change-Id: Ic03b77adc9a911e9c754562fa6a91f9929e10dfc
Reviewed-on: https://dart-review.googlesource.com/36122
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
With these changes, migration can more efficiently convert existing
code, and can actually change the addStream signature to not specify
"true".
Change-Id: I65a90afe2716e9a99d41e5f55bf1e0dcc5d3e40e
Reviewed-on: https://dart-review.googlesource.com/35183
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Fixes analyzer test failures on the bots.
Change-Id: I426ce7be20bac0ab57b8921db0ffa5fe2be15871
Reviewed-on: https://dart-review.googlesource.com/35760
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This is a reland of https://dart-review.googlesource.com/#/c/sdk/+/28920/
with the following changes:
- It creates a new library dart:cli
- waitFor(Future) goes in dart:cli instead of dart:io
- Removes a flaky test, and adds a missing precompiler entrypoint
- Adds waitFor(Future)
- Improves doc comments
fixes#31102
Change-Id: I04d2c46fd0afac049dd4fd1353905dc20da18f90
Reviewed-on: https://dart-review.googlesource.com/29449
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Natalie Weizenbaum <nweiz@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This aligns us with JS engines and Unicode 6.3
R=lrn@google.com
Bug: 29060
Change-Id: I0b6356f0e652f7c9841bcf6485aa591a3d835061
Reviewed-on: https://dart-review.googlesource.com/35560
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
Some parts of the Dart build need to be customized when running the
host steps for a build ultimately targeting a Fuchsia build. This was
set by passing a special GN variable indicating that a configuration
was a host configuration targeting a Fuchsia build, but the built-in GN
variable 'target_os' has the same result as it is the same across all
toolchains in a particular build. This replaces the test:
is_fuchsia || is_fuchsia_host
with the equivalent:
target_os == "fuchsia"
and the less common:
is_fuchsia_host
with:
target_os != current_os && target_os == "fuchsia"
Change-Id: Iabec1fb2879b234ca44c9e03b2f4a62ffbc6fa4a
Reviewed-on: https://dart-review.googlesource.com/35542
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Two follow-on optimization would reduce the generated code to closer to the original size:
- It would be profitable to write an optimization the removes the type
information from any list when it can be proven the type information
is not used.
- Provided the split result list is not modified, we can strengthen
accesses to be non-null Strings.
Bug: https://github.com/dart-lang/sdk/issues/30548
Change-Id: I87ecdd129ec0227f982bd2e1f34193b3d6b0d81b
Reviewed-on: https://dart-review.googlesource.com/35081
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Change-Id: Idf83e7f5dfb95e0097fa73fa0a0ecd68c76d2ac9
Reviewed-on: https://dart-review.googlesource.com/35381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
- I beleive create_snapshot.dart is no longer in use: it was replaced by
create_snapshot_entry + GN application snapshot rules.
- utils_wrapper seems to be something really historical (maybe we thought we
were going to only have a single wrapper for all of our tools back in the
day). The only use of it is to track build dependencies in test.py, which I
think we can do by directly using dart2js.dart.snapshot instead.
Change-Id: I6e32403eb8c5d40f0b58e48ae5ff6fb60fd855b3
Reviewed-on: https://dart-review.googlesource.com/34923
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>