Commit graph

8276 commits

Author SHA1 Message Date
Lasse R.H. Nielsen 34f09ac4c8 Wave 2.2 Step 2: Deprecated first/lastWhere's defaultValue parameter.
Change-Id: Iabfd7a990ff723a2d861ee7034f6569c2ca948cc
Reviewed-on: https://dart-review.googlesource.com/43401
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-03-01 14:12:08 +00:00
Lasse R.H. Nielsen 9ee735b659 Add missing methods to List and Map implementations.
Optimize FollowedBy when the operands have efficient length.

Change-Id: I0af59240d70b929358c06b8d57a85df2deee6aaf
Reviewed-on: https://dart-review.googlesource.com/43665
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-28 12:26:53 +00:00
Jenny Messerly 8bce74bc05 Remove dart:html import of dart:isolate
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>
2018-02-28 07:25:00 +00:00
Kathy Walrath aee7d5773d API doc updates
* Update the API doc index page
* Update dart:io API description

Change-Id: I3e3574fc8d188e0d2fb5033c523f314590c4214c
Reviewed-on: https://dart-review.googlesource.com/43891
Reviewed-by: Kathy Walrath <kathyw@google.com>
Commit-Queue: Kathy Walrath <kathyw@google.com>
2018-02-28 01:23:46 +00:00
Siva Chandra 4f5ad1918c Make strong mode the default under --preview-dart-2.
Change-Id: Ic1637d65a34f6b0310439293f7d83cb351f2c89c
Reviewed-on: https://dart-review.googlesource.com/43200
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-02-27 22:16:07 +00:00
Sigmund Cherem e33f4f7c2e Fail if mirrors are really used.
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>
2018-02-27 04:57:27 +00:00
Lasse R.H. Nielsen 8d38d94ddb Add static list methods.
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>
2018-02-26 11:34:43 +00:00
Terry Lucas 9f09ef0af3 - Fixed callback signatures with indexed_db open method to expose VersionChangeEvent and
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>
2018-02-23 14:29:45 +00:00
Maksim Ryzhikov a218445ead Fix Doc typo in the example
Closes #32287
https://github.com/dart-lang/sdk/pull/32287

GitOrigin-RevId: 6ea54882bd45566454ab44adbfa96ca11aa4ec3d
Change-Id: Ieba69f244e5ddef77e2074f666bec04825e47bc5
Reviewed-on: https://dart-review.googlesource.com/43360
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-23 10:20:50 +00:00
Lasse Reichstein Holst Nielsen eaf49211ce Document deprecation of @proxy.
Fixes #32251

Bug: http://dartbug.com/32251
Change-Id: I080f95eb99ed5c3dc058ac84fd9194ff72f59b0a
Reviewed-on: https://dart-review.googlesource.com/42760
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-02-23 09:26:23 +00:00
Kevin Moore 922c0b5664 Fix Doc comment issues with Map and mirrors
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>
2018-02-23 01:59:44 +00:00
Stephen Adams 9598a1d1fa Add HAbs instruction
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>
2018-02-22 22:21:41 +00:00
Vyacheslav Egorov a564c1f79c [corelib] Fix strong mode issue in http implementation
Fixes https://github.com/dart-lang/sdk/issues/32274
Fixes https://github.com/flutter/flutter/issues/14819

Bug: 32274
Change-Id: I4d294681d0d751119b8966fb3ce26f6fdbf81e39
Reviewed-on: https://dart-review.googlesource.com/43020
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-02-22 13:35:33 +00:00
Stephen Adams 284312b101 Test for compiled-to-JavaScript version of BigInt.isValidInt
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>
2018-02-22 04:07:52 +00:00
Sigmund Cherem ed041212d8 Changes to JSInt and JSNumber to make the sdk strong-clean
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>
2018-02-21 01:59:19 +00:00
Sigmund Cherem e6e6efc3bc Changes to patch files to make them strong-clean
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>
2018-02-20 20:19:15 +00:00
Stephen Adams e1cfc35572 Update dart2js/ddc int.bitLength
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>
2018-02-16 22:26:35 +00:00
Lasse R.H. Nielsen fed7120b07 Make UnmodifiableMapView not lose unmodifiability on cast/retype.
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>
2018-02-14 12:49:23 +00:00
Régis Crelier 4c9a842d61 [corelib] Cleanup isValidInt and toInt() in new BigInt implementation.
Change-Id: I1f107d4f6e26ea3644bc6c9f7cff5ee6fac43958
Reviewed-on: https://dart-review.googlesource.com/40512
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-02-14 03:43:52 +00:00
Rafal Wachol 91890156cc Added ability to set User Agent for Websocket connection.
Bug: https://github.com/dart-lang/sdk/issues/32008
Change-Id: Ia74689e808a57b00a518e6a32f1763a40afc5860
Reviewed-on: https://dart-review.googlesource.com/40220
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-02-13 06:15:53 +00:00
Stephen Adams d78c05279a dart2js runtime Dart 2 subtype check (mostly)
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>
2018-02-12 23:54:48 +00:00
Zachary Anderson 23fe39e89f [dart:typed_data] Adds unmodifiable list views
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>
2018-02-12 16:30:51 +00:00
Lasse R.H. Nielsen 0d5ce913c9 Add cast/retype to Stream, StreamTransformer and Converter.
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>
2018-02-09 14:09:39 +00:00
Lasse R.H. Nielsen bdc6e9c862 Add ticks counter to Timer.
Change-Id: Ie5ed28fa8b7ef9c6aea97331267cf3c717b17099
Reviewed-on: https://dart-review.googlesource.com/21342
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 10:16:00 +00:00
Lasse R.H. Nielsen 6f78471687 New methods on Iterable, List, Set, Queue, Map.
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>
2018-02-07 06:12:53 +00:00
Zachary Anderson c8a8674d97 [dart:cli] Fix waitFor for Future that completes with null
fixes #32052

Change-Id: Id7a8b0da09c95436387eb57cc47b0b1489db0f0c
Reviewed-on: https://dart-review.googlesource.com/38924
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-02-06 15:43:33 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
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>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 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>
2018-02-06 11:17:46 +00:00
Terry Lucas d7a8aa155f Fixed a number of File API methods in DDC.
R=vsm@google.com

Change-Id: I77881201f1e89f731476655476eb865e10d581a1
Reviewed-on: https://dart-review.googlesource.com/38164
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-05 22:29:00 +00:00
Peter von der Ahé 861550a28c Read patch files in strong mode
Closes https://github.com/dart-lang/sdk/issues/28822

Change-Id: I05e1d9885a39efca131d78d06cfd8a0e84276bb9
Reviewed-on: https://dart-review.googlesource.com/36641
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-05 14:35:36 +00:00
Devon Carew 9dfb7b2f75 dart:convert typo
Change-Id: Icbb22730a1ebfeaf19b34bbf363ddd12dc01fff2
Reviewed-on: https://dart-review.googlesource.com/38420
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-02-03 05:10:59 +00:00
Florian Loitsch 3b8e4d41a7 Reapply "Run async functions immediately."
Which was reverted in commit 032be73dbe.
Originally commited in commit 67bac0bce6.
Original review URL: https://dart-review.googlesource.com/5263

Change-Id: Ic7333c29e502a3924dc6aade8ffa46fc8aa5b04a
Reviewed-on: https://dart-review.googlesource.com/38120
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-02 15:50:16 +00:00
Florian Loitsch 032be73dbe Revert "Run async functions immediately."
This reverts commit 67bac0bce6.

Reason for revert: broke the bot.

Original change's description:
> Run async functions immediately.
> 
> Migrated from https://codereview.chromium.org/2478703003/
> 
> Change-Id: I1d678c01ba5876490b12c676c500171328361d31
> Reviewed-on: https://dart-review.googlesource.com/5263
> Commit-Queue: Florian Loitsch <floitsch@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=whesse@google.com,rnystrom@google.com,vegorov@google.com,kustermann@google.com,zra@google.com,floitsch@google.com,jmesserly@google.com,vsm@google.com,regis@google.com,sigmund@google.com

Change-Id: I20c948057423c3fa5aa8c72843f8f2a17e086ad5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/37981
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-01 15:01:21 +00:00
Florian Loitsch 67bac0bce6 Run async functions immediately.
Migrated from https://codereview.chromium.org/2478703003/

Change-Id: I1d678c01ba5876490b12c676c500171328361d31
Reviewed-on: https://dart-review.googlesource.com/5263
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-02-01 14:08:57 +00:00
Lasse Reichstein Holst Nielsen 0c18b643c6 Add RegExp.escape methods.
Fixes 4706

Bug: http://dartbug.com/4706
Change-Id: If635cb0eb7c20405ab0127a443fe51176191b5ad
Reviewed-on: https://dart-review.googlesource.com/35641
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-02-01 09:56:47 +00:00
Régis Crelier 25d7d355db Provide distinct BigInt implementation classes in VM, dart2js, and dartdevc.
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>
2018-01-29 18:12:34 +00:00
Samir Jindel 68554ab8f5 [kernel] Support "dart-ext:..." imports in the CFE.
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>
2018-01-29 14:04:25 +00:00
Zachary Anderson 6523896c6f [dart:io] Adds ProcessStartMode.INHERIT_STDIO
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>
2018-01-23 22:50:06 +00:00
Zachary Anderson 71d356d5fe [fuchsia][dart:io] Allow the embedder to specify handles for stdio
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>
2018-01-22 21:09:39 +00:00
Terry Lucas 0a02050867 Fixed DirectoryReader returned from createReader to exist in DDC.
R=vsm@google.com

Change-Id: I6761da70b2f51f235534ee10fa0b7cb7a7a98659
Reviewed-on: https://dart-review.googlesource.com/36020
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-01-19 18:14:05 +00:00
Lasse R.H. Nielsen 20c6215c52 Prepare SDK for wave 2.2 migration.
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>
2018-01-19 09:16:55 +00:00
Zachary Anderson 09fd9dec7a [dart:cli] Fix doc comment typo
Change-Id: Id68426b6a570d250f7f11a4d6d3e054caa90c6a6
Reviewed-on: https://dart-review.googlesource.com/35762
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-18 18:49:34 +00:00
Zachary Anderson 09dc8611b4 [infra] Add cli lib to built sdk lib/ dir
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>
2018-01-18 17:46:39 +00:00
Zachary Anderson 9c40a7e662 Reland: [dart:cli] Adds waitFor(Future)
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>
2018-01-18 16:38:54 +00:00
Erik Corry c8ae9bf77b [VM] Stop treating 0x180e as whitespace
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>
2018-01-18 10:37:15 +00:00
James Robinson 138d587e3a [gn] Remove uses of is_fuchsia_host GN variable
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>
2018-01-18 06:05:56 +00:00
Stephen Adams 8a7c3331df dart2js: Make String.split return List<String>
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>
2018-01-18 02:02:24 +00:00
Alexander Markov 7bd5093f83 [corelib] Fix type argument of Iterable from EmptyIterable.map
Change-Id: Ifee26537d05848e4ea6d354f5d57e0f14574d050
Reviewed-on: https://dart-review.googlesource.com/35460
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-01-17 22:31:18 +00:00
Kevin Moore 0d785569d1 Fix library dartdoc references
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>
2018-01-17 20:01:18 +00:00
Sigmund Cherem c241078b10 Cleanup dart2js snapshot generation
- 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>
2018-01-17 00:35:34 +00:00