Paul Berry
45b02f8216
Use the new spec for Future flattening for type inference
...
Change Fasta type inference and Kernel type checking to use the new
definition for Future flattening, which is really unwrapping (peeling
off one layer of Future or FutureOr). Use this for inferring types of
`await` expressions and return types from `async` functions.
Ensure that we are using the same notion of flattening for inference
and checking. (Maybe it was a red flag that we weren't.)
This fixes await_test so that it produces a runtime error rather than
a compile time error - see #31541 .
A similar change will need to be made to the analyzer - see #31887 .
Change-Id: I7d936e9788969a48fdc216628eaa793389fb5e30
Reviewed-on: https://dart-review.googlesource.com/34504
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-01-15 07:09:36 +00:00
Paul Berry
1bdf361ed4
Strong mode fix for future_impl.dart.
...
Change-Id: Icbc36fecd79aedf87340e9d20d1901759492400a
Reviewed-on: https://dart-review.googlesource.com/21464
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-20 21:27:47 +00:00
Leaf Petersen
63918ea921
Remove comment syntax from lib/async.
...
Eliminate uses of the comment syntax in lib/async. This is mostly
done simply by turning explicit (but commented) casts into implicit
casts to avoid regressing dart2js performance.
Bug:
Change-Id: I286c7bffbf609b5e2fa24b9d48b90876c2c45a9b
Reviewed-on: https://dart-review.googlesource.com/21566
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-17 20:40:47 +00:00
Lasse R.H. Nielsen
b0f6c4c8b1
Don't deprecate old constant names yet.
...
Flutter reacts badly to using deprecated members.
Change-Id: Id7933ddbc0c2fa68d9a232e2ad4c74dfd0ecdf35
Reviewed-on: https://dart-review.googlesource.com/21601
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-17 10:58:33 +00:00
Lasse R.H. Nielsen
0b58c4bd10
Change some constant declarations to lowerCase.
...
Retain the old values.
Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.
Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen
e61fc07b58
Revert "Change some constant declarations to lowerCase."
...
This reverts commit c048cfb178
.
Reason for revert: VM code fingerprints needs update.
Original change's description:
> Change some constant declarations to lowerCase.
>
> Retain the old values.
>
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>
TBR=lrn@google.com ,floitsch@google.com
Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen
c048cfb178
Change some constant declarations to lowerCase.
...
Retain the old values.
Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Florian Loitsch
8752e7a6cd
Remove obsolete documentation.
...
Fixes #27735 .
Fixes #18625 .
Fixes #10200 .
Bug: http://dartbug.com/27735 http://dartbug.com/18625 http://dartbug.com/10200
Change-Id: I81dcaf2167f660527439bb117cfb0ee7d9188256
Reviewed-on: https://dart-review.googlesource.com/10240
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-10-03 11:23:11 +00:00
Leaf Petersen
8c924f2923
Tighten the is check in handleError.
...
Bug:
Change-Id: I23f49f65a395579293f0567e8069ccd931e00c4a
Reviewed-on: https://dart-review.googlesource.com/7842
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-26 13:38:05 +00:00
Leaf Petersen
e350bb4565
Eliminate fuzzy arrow uses in SDK libraries.
...
Bug:
Change-Id: Ia1a00966b8d77c5aa812ed19eca136c47132ae58
Reviewed-on: https://dart-review.googlesource.com/8540
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-26 12:56:05 +00:00
Florian Loitsch
38bf70d7ac
Use generic functions in zones.
...
Migrated from https://chromiumcodereview.appspot.com/2893893002/
Change-Id: I0bd6dc1438eb1e6762e7760a08b5a760b07d4b10
Reviewed-on: https://dart-review.googlesource.com/4942
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-09-20 15:46:06 +00:00
Florian Loitsch
9ca1960291
Add documentation to StreamTransformer.fromHandlers
.
...
Change-Id: Iba1350ae416379a2b9a0d6846426e65a034424ce
Reviewed-on: https://dart-review.googlesource.com/3980
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-08 08:19:25 +00:00
Leaf Petersen
f606e559c5
Avoid relying on fuzzy arrow for arity check in _FutureListener
...
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/3009893002 .
2017-08-30 14:18:52 -07:00
Leaf Petersen
bdfc674a54
SDK core library fuzzy arrow fixes.
...
Fix a couple of places in the core libraries that were relying on
fuzzy arrow (lack of) checking.
BUG=
R=lrn@google.com
Review-Url: https://codereview.chromium.org/3005653002 .
2017-08-29 14:03:38 -07:00
Lasse R.H. Nielsen
c8b6c19314
Revert "Add ticks counter to Timer."
...
Tests broken in DDC
Review-Url: https://codereview.chromium.org/3011503002 .
2017-08-28 13:14:09 +02:00
Lasse R.H. Nielsen
39c8f64ea3
Add ticks counter to Timer.
...
Avoid VM scheduling multiple timer events if it gets delayed. This doesn't
scale for processes that are suspended for extended amounts of time.
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/3003853002 .
2017-08-28 12:57:45 +02:00
Zachary Anderson
734beef062
[infra] Translate _sources.gypi files to _sources.gni files
...
Also deletes code that becomes dead as a result.
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2996903002 .
2017-08-14 21:54:36 -07:00
Florian Loitsch
ee46026671
Don't use LinkedList
in the core libraries anymore.
...
R=lrn@google.com
Committed: fe17b5b2bc
Reverted: 5d4a786f44
Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-28 21:14:11 +02:00
Ryan Macnak
1bfd01c1f7
Revert "Use relative URIs for core library part-of statements."
...
This reverts commit 62bc61b367
.
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2968413002 .
2017-07-07 11:18:24 -07:00
Lasse R.H. Nielsen
32a2d2079a
Update docs on Stream.skip/take/skipWhile/takeWhile.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2975583002 .
2017-07-07 13:52:18 +02:00
Florian Loitsch
42fd6cfd77
Revert "Remaining private libs"
...
This reverts commit 91db4489ee
.
Review-Url: https://codereview.chromium.org/2973823002 .
2017-07-06 16:39:18 +02:00
Lasse R.H. Nielsen
91db4489ee
Remaining private libs
...
Handle internal libraries correctly.
Revert `part of "file.dart"` to `part of "dart:file"` to avoid warnings in fasta.
BUG=
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2974433002 .
2017-07-06 14:58:27 +02:00
Lasse R.H. Nielsen
62bc61b367
Use relative URIs for core library part-of statements.
...
Reapply "Change some platform libraries to use `part of URI`."
Change to used relative URIs in the part-of declarations.
R=brianwilkerson@google.com , floitsch@google.com
Review-Url: https://codereview.chromium.org/2911903002 .
2017-07-03 10:04:06 +02:00
Florian Loitsch
978213d427
Revert "Make Zone API strong mode clean."
...
This reverts commit 0b35711d48
.
BUG=
Review-Url: https://codereview.chromium.org/2963743002 .
2017-06-28 13:31:32 +02:00
Florian Loitsch
0b35711d48
Make Zone API strong mode clean.
...
Review-Url: https://codereview.chromium.org/2959163002 .
2017-06-28 13:16:39 +02:00
Erik Corry
029b1cb948
Spelling fixes e to i.
...
R=kevmoo@google.com
BUG=
Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Kevin Moore
239b0c088c
Fix a couple of doc comment references - and many spelling mistakes
...
Review-Url: https://codereview.chromium.org/2946283002 .
2017-06-22 17:32:29 -07:00
Lasse Reichstein Holst Nielsen
2a14e68d78
Clean-up of Future documentation and small fix-ups.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2917683002 .
2017-06-02 07:53:47 +02:00
Florian Loitsch
33f360cc38
Revert "Add groupBy to Stream."
...
This reverts commit 3e8bfb1adb
and 3f90b06836
.
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2921663002 .
2017-06-01 16:11:39 +02:00
Kevin Moore
46110c331b
fix doc comments in dart:io and collection types
...
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2905013003 .
2017-05-31 09:08:12 -07:00
Lasse Reichstein Holst Nielsen
fbe98e6bfc
Update stream documentation.
...
Fixes #29694
BUG= http://dartbug.com/29694
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2899273003 .
2017-05-29 09:14:40 +02:00
Lasse Reichstein Holst Nielsen
25a770fc97
Fix Stream.distinct.
...
Due to incorrectly shared state, a broadcast distinct stream listened to
more than once would give incorrect results.
Also update docs.
Fixes #29638 , #29627 .
BUG= http://dartbug.com/29638 , http://dartbug.com/29627
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2885993005 .
2017-05-18 16:53:23 +02:00
Leaf Petersen
8cdcfb98e2
Use Null argument for callback arity check in async_error.
...
Avoid relying on fuzzy arrow semantics by using Null for the callback type
parameter to be checked against. Any function of the right arity will pass the "is"
check.
BUG=
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2878553003 .
2017-05-11 17:36:47 -07:00
Lasse R.H. Nielsen
953f78d6dd
Revert "Change some platform libraries to use part of URI
."
...
This makes the analyzer generate a variety of odd errors.
Best guess is that it somehow fails to recognize Object as the Object class
(stack overflow while traversing superclasses, cannot assign Foo<T> to
Foo<Object> and similar errors can be explained by that).
Review-Url: https://codereview.chromium.org/2880543002 .
2017-05-11 11:42:21 +02:00
Lasse R.H. Nielsen
540bb7a0ec
Change some platform libraries to use part of URI
.
...
Use new dart-style. Now needs an SDK built with this checked in as well.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2871123004 .
2017-05-11 10:56:02 +02:00
Lasse R.H. Nielsen
3f90b06836
Rename StreamGroup to GroupedEvents.
...
Avoids clash with StreamGroup from package:async.
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2872263003 .
2017-05-11 10:53:21 +02:00
Lasse R.H. Nielsen
7157b6aef2
Make Future._nullFuture be initialized synchronously.
...
Also type it as Future<Null> now that it makes sense.
Because there is no reason not to.
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2867763003 .
2017-05-10 09:21:08 +02:00
Florian Loitsch
5202df2238
Warn when adding something to a closed sink and improve documentation.
...
Adding to a closed sink will throw once https://codereview.chromium.org/2857393003/ is committed.
Also:
Fixes #29122 .
BUG= http://dartbug.com/29122
R=lrn@google.com , whesse@google.com
Committed: 8e19729b89
Reverted: 8f3ae7e7e1
Committed: c0090fa01f
Reverted: a4eb8b8fe3
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-08 15:52:19 +02:00
Florian Loitsch
a4eb8b8fe3
Revert "Warn when adding something to a closed sink and improve documentation."
...
This reverts commit c0090fa01f
.
Review-Url: https://codereview.chromium.org/2872603002 .
2017-05-08 15:18:46 +02:00
Florian Loitsch
c0090fa01f
Warn when adding something to a closed sink and improve documentation.
...
Adding to a closed sink will throw once https://codereview.chromium.org/2857393003/ is committed.
Also:
Fixes #29122 .
BUG= http://dartbug.com/29122
R=lrn@google.com , whesse@google.com
Committed: 8e19729b89
Reverted: 8f3ae7e7e1
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-08 14:27:06 +02:00
Florian Loitsch
c2ba323ad4
Update StreamTransformer documentation.
...
Fixes #29523 .
BUG= http://dartbug.com/29523
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2864863002 .
2017-05-08 11:29:47 +02:00
Lasse R.H. Nielsen
3e8bfb1adb
Add groupBy to Stream.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2850393003 .
2017-05-08 10:25:17 +02:00
Florian Loitsch
8f3ae7e7e1
Revert "Throw when adding something to a closed sink and improve documentation."
...
This reverts commit 8e19729b89
.
BUG=
Review-Url: https://codereview.chromium.org/2864443002 .
2017-05-04 12:52:47 +02:00
Florian Loitsch
8e19729b89
Throw when adding something to a closed sink and improve documentation.
...
As port of this CL all changes of https://codereview.chromium.org/20036002 are reverted.
Also fixes issue 29122.
BUG= http://dartbug.com/29122
R=lrn@google.com , whesse@google.com
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-04 11:42:22 +02:00
Vijay Menon
d5ecaf1088
Loosen type check on runZoned errorHandler
...
R=floitsch@google.com , lrn@google.com
Review-Url: https://codereview.chromium.org/2858843002 .
2017-05-03 05:30:06 -07:00
Lasse R.H. Nielsen
5a1a1509fc
Fix some bad documentation links.
...
Addresses some of the cases of issue #29534 .
BUG= http://dartbug.com/29534
Review-Url: https://codereview.chromium.org/2856123003 .
2017-05-03 13:10:46 +02:00
Lasse R.H. Nielsen
8c742bd500
Change Future.doWhile to use a loop for non-future results instead of recursion.
...
Avoids stack overflow on long sequences of non-future results.
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2853203002 .
2017-05-02 12:56:55 +02:00
Florian Loitsch
5aff94f980
Fix some strong mode issues in the core libraries.
...
R=vsm@google.com
Committed: e5c091e048
Reverted: a382f7845c
Review-Url: https://codereview.chromium.org/2764943002 .
2017-05-01 15:20:30 +02:00
Bob Nystrom
7f7c681893
Fix a batch of DDC SDK compile errors.
...
R=floitsch@google.com , vsm@google.com
Review-Url: https://codereview.chromium.org/2848703003 .
2017-04-27 17:27:02 -07:00
Lasse Reichstein Holst Nielsen
6156495d77
Fix bug in Future.forEach. Add tests.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2851443002 .
2017-04-27 16:11:40 +02:00