Lasse Reichstein Holst Nielsen
862a894de6
Make cast do the same things as retype.
...
Deprecate `retype` and forward it to `cast`.
Change-Id: Ie17ffdd1eef0d3f19582bf638c5349927c7b5ebd
Reviewed-on: https://dart-review.googlesource.com/53802
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2018-05-09 08:00: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
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
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
Peter von der Ahé
e8aef37eac
Clean up patches so they can be compiled by Fasta.
...
Change-Id: Ie436375c78496366accf0ba82938e54cbe30b143
Reviewed-on: https://dart-review.googlesource.com/3001
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-05 14:05:50 +00:00
Jacob Richman
4360e99d18
Revert "Fix observatory tests broken by running dartfmt."
...
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.
BUG=
Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman
62be0eacfb
Revert "Fix observatory tests broken by running dartfmt."
...
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.
BUG=
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman
88f8aacd5f
Re-apply rolled back CL to apply dartfmt to runtime.
...
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak
ea4744a06f
Revert "Run dartfmt on all files under runtime."
...
This reverts commit 15f393f189 .
The change caused many service test failures due to changed line numbers.
TBR=jacobr@google.com
Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman
15f393f189
Run dartfmt on all files under runtime.
...
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -07:00
Kevin Millikin
f7b6f0cf1c
Make the VM's dart:core and dart:async library patches clean.
...
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 .
2016-12-15 10:10:09 +01:00
Lasse Reichstein Holst Nielsen
7957a1c256
Make EfficientLength extend Iterable.
...
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: https://github.com/dart-lang/sdk/commit/b08fb1373f88121bb4056adce9b71849a5bede2a
2016-11-28 08:04:04 +01:00
Ryan Macnak
6cf5c3baa3
Revert "Make EfficientLength extend Iterable."
...
This reverts commit b08fb1373f .
TBR=lrn@google.com
Review URL: https://codereview.chromium.org/2467283003 .
2016-11-02 13:20:41 -07:00
Lasse R.H. Nielsen
b08fb1373f
Make EfficientLength extend Iterable.
...
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 .
2016-11-02 14:05:35 +01:00
Matthias Hausner
9a751bec88
Remove stale comment in ImmutableList implementation
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1620923002 .
2016-01-22 15:53:07 -08:00
Lasse R.H. Nielsen
babcd4e9c0
Revert "Make EfficientLength public, as EfficientLengthIterable."
...
It's still not a good solution for detecting an Iterable with an efficient
length. It's not inherited by, e.g., a DelegatingIterable wrapper or similar
generic Iterable transformers.
Keep this as an internal optimization for quickly detecting the most common
efficient-length Iterable classes (List, Set, Queue, Map.keys/values), but
don't make it public.
A *real* solution would be adding a hasEfficientLength getter to Iterable, or
adding an efficientLength getter that may return null if it's not efficient.
This would something that a wrapper can attach to.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1154263003
2015-05-29 12:52:45 +02:00
lrn@google.com
92c526b2a2
Make EfficientLength public, as EfficientLengthIterable.
...
R=iposva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//1104063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45556 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 09:00:45 +00:00
lrn@google.com
8922b1065c
Add EfficientLength marker interface to some iterabels.
...
Use that in List.from and other methods to be more efficient when possible.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//26681002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28575 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 10:40:00 +00:00
iposva@google.com
e7e2e4bf03
- Rename arrays to lists:
...
_ObjectArray -> _List
_GrowableObjectArray -> _GrowableList
_ImmutableArray -> _ImmutableList
R=srdjan@google.com
Review URL: https://codereview.chromium.org//25813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28189 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 00:15:14 +00:00
floitsch@google.com
f10f791439
Adapt private variables with trailing underscores.
...
R=lrn@google.com
Review URL: https://codereview.chromium.org//23619086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27807 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 11:19:53 +00:00
floitsch@google.com
48b1656690
Allow Object when doing lookups.
...
According to our typing rules a Set<Apple> is a Set<Fruit>. However, before this change, we couldn't use it as a Set<Fruit>:
===
bool foo(Set<Fruit> fruits) {
// Would yield a type-error since we actually got a Set<Apple>.
return fruits.contains(new Banana());
}
foo(new Set<Apple>());
===
R=ajohnsen@google.com , blois@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//14246008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24326 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 12:45:10 +00:00
floitsch@google.com
5d058bb0eb
Adding isNotEmpty property to collection and string.
...
BUG= http://dartbug.com/3074
R=floitsch@google.com
Review URL: https://codereview.chromium.org//15263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23294 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 17:30:37 +00:00
lrn@google.com
485c8a5999
Move Iterable implementation to collection.
...
Add IterableMixin and IterableBase to dart:collection.
For now, the implementation is duplicated, because mixins and const
constructors don't mix. We hope that mixins will be improved in the
future to allow using the mixin to define the base class.
Review URL: https://codereview.chromium.org//14022007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21457 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 14:32:16 +00:00
floitsch@google.com
4a7dfd2da3
Big merge from experimental to bleeding edge.
...
Review URL: https://codereview.chromium.org//11783009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
floitsch@google.com
8e6f238f86
a === b -> identical(a, b)
...
Replace === null with == null.
BUG=http://dartbug.com/6380
Review URL: https://codereview.chromium.org//11361190
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +00:00
floitsch@google.com
2e778387b3
Make getKeys, getValues getters (keys, values).
...
Review URL: https://codereview.chromium.org//11267018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14093 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 19:22:11 +00:00
floitsch@google.com
09f6d09d88
Make isEmpty a getter.
...
Review URL: https://codereview.chromium.org//11238035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14022 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 15:04:32 +00:00
lrn@google.com
a083c1a108
Removed IllegalAccessException and UnsupportedOperationException.
...
Both were converted to StateError.
Review URL: https://codereview.chromium.org//11235054
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14012 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 12:36:10 +00:00
ager@google.com
abee5139e5
Reapply change to hide VM-only List implementation classes.
...
The performance issue was that I had not updated the method
recognizer.
BUG=
Review URL: https://codereview.chromium.org//10990083
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13003 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 11:08:38 +00:00
ager@google.com
fe66a0af1a
Revert hiding of VM-only coreimpl list implementation types. While I
...
investigate performance regression (even after fixing constructors
in the intrinsifier).
R=iposva@google.com ,srdjan@google.com ,fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//11000025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12963 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 14:07:56 +00:00
ager@google.com
8e6a2c8345
Hide VM-only coreimpl List implementation types. These should not be
...
exposed as visible parts of coreimpl.
Review URL: https://codereview.chromium.org//10990055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12952 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 12:37:30 +00:00
kasperl@google.com
9beb871852
Get rid of a lot of () for getters.
...
R=bak@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10919146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12017 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 11:50:07 +00:00
zundel@google.com
41cb747374
Fixed some static type warnings in vm core libraries
...
After running 'dartc' on the VM's core libraries, about 79 static type warnings popped out.
These ten or so were relatively easy to fix.
Review URL: https://chromiumcodereview.appspot.com//9692068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5794 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 21:27:18 +00:00
jjb@google.com
a2f2769ec3
Wrote functions to convert collections and maps to strings and invoked
...
these functions from the toString methods of all built-in Collection
and Map implementations. Wrote smoke tests and basher tests.
Review URL: https://chromiumcodereview.appspot.com//9431015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4421 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 02:28:01 +00:00
kasperl@google.com
c34ec0121c
Revert "Wrote functions to convert collections and maps to strings and invoked"
...
This reverts r4345.
R=jjb@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9416053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4347 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-17 06:36:06 +00:00
jjb@google.com
b4db1d6cc0
Wrote functions to convert collections and maps to strings and invoked
...
these functions from the toString methods of all built-in Collection
and Map implementations. Wrote smoke tests and basher tests.
BUG=4466785
Review URL: https://chromiumcodereview.appspot.com//9320028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4345 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-17 01:34:00 +00:00
srdjan@google.com
4c267997cd
Fix bug 557: Disallow user side allocation of ImmutableArray. Also added "instantiation-checks" for some other VM-internal classes.
...
Review URL: http://codereview.chromium.org//8648003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1811 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 19:48:25 +00:00
regis@google.com
a2bb53c7af
Implement type checking of map literals (issue 221).
...
Support proper syntax for map literals (at most one type argument is allowed)
and give a warning when legacy syntax is used.
Add tests.
Fix tests.
Review URL: http://codereview.chromium.org//8637018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1764 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 21:42:07 +00:00
iposva@google.com
4906ccd1db
- Remove the remaining Array interface.
...
Review URL: http://codereview.chromium.org//8348025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@556 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-19 15:44:55 +00:00
ngeoffray@google.com
70c01beb9b
Clean up (most) uses of Array. Still more to come in the VM corelib code base.
...
Review URL: http://codereview.chromium.org//8321024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@507 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 10:02:59 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00