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>
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>
Start by adding static castTo method to the interfaces. This provides everybody with the
desired implementation without exposing the classes.
When implementing the cast method, the recommended way is to (extend the base class,
but if you choose not to ...) use the castTo method.
If we ever get a language feature, we can implement the castTo method using that,
without being stuck with an unnecessary class.
Change-Id: I53274e60c88a4de519bead85d2ca44c1065a9c1a
Reviewed-on: https://dart-review.googlesource.com/26620
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
There is no actual implementation here yet (that's your job :) ), but there is:
- An external method in dart:_internal, extractTypeArguments().
- Empty patch methods for that for the VM, dart2js, and DDC. These need to have implementations
filled in.
- A "dart_internal" package to expose a subset of the API. It gives you:
extractListTypeArgument()
extractMapTypeArguments()
We'll bring this into Google, but not publish it externally unless we find we really need to.
- A test for the behavior. It probably has bugs since I can't run it.
See: https://github.com/dart-lang/sdk/issues/31371
Change-Id: I7d9f9a3a36f8e8be106440375c80d584898c83cb
Reviewed-on: https://dart-review.googlesource.com/26467
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Put a precise type on the printToZone variable, and change entry
calls in startRootIsolate to avoid casting arguments to Null.
Bug:
Change-Id: Ia7d23e8dafa93bd6246ec7fa9b8c14411db30421
Reviewed-on: https://dart-review.googlesource.com/18683
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Change-Id: I7f8d6b110f2f0c90b131a2538240c1b81bfa1578
Reviewed-on: https://dart-review.googlesource.com/17162
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
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 .
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Committed: 68818315b5
Committed: 3f74b8d82e
Review-Url: https://codereview.chromium.org/2529393002 .
Modify the following VM dart: library patches: collection, convert,
developer, _internal, isolate, math, mirrors, profiler, vmservice_io,
_vmservice, _builtin, nativewrappers, and io.
The modifications are mostly because:
- Patches should not be able to introduce new public members to a
library's API. In cases where the VM's patches introduce public
members, the patches are rewritten to introduce private members
instead.
- Patches should not be able to replace arbitrary members, only
ones declared external. In cases where the VM's patches replace
arbitrary members, those members are declared external in the
SDK sources and dart2js's patch files are rewritten to use the
original SDK implementation.
BUG=
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2564383002 .
Clean up the VM's dart:core and dart:async library patches so that
they are clean according to the patching rules implemented in the
analyzer. Specifically:
- If a member is patched in a patch file, it must be declared external
in the SDK.
- If a member is introduced in a patch file, it must be private.
- A non-private superclass member cannot be overridden in a patch
file.
BUG=
R=lrn@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2563633002 .
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2529393002 .
Committed: 68818315b5
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2529393002 .
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.
It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2467113003 .
Committed: b08fb1373f
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.
It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2467113003 .
This makes some nice code improvements for dart2js. dart2js can't
inline the MappedIterable factory constructor and specialize by
optimization, so specializing by hand removes the test "is
EfficientLength" for code like "x.where(f).map(g)".
R=lrn@google.com
Review URL: https://codereview.chromium.org/2354093002 .