Commit graph

13 commits

Author SHA1 Message Date
lrn@google.com 05031864ee Change incorrect limit check in IterableMixinWorkaround.insertAllList.
Review URL: https://codereview.chromium.org//740653003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41896 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 12:00:11 +00:00
lrn@google.com ce08b80b53 Fix incorrect type variable usage in copied code.
Review URL: https://codereview.chromium.org//752513002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41895 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 11:18:58 +00:00
lrn@google.com 6ae29ec58e Create generic check methods for RangeError causing checks.
Use them where appropriate in core libraries.

There are many more possible uses in vm- and dart2js-libraries.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//745573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41893 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 10:29:15 +00:00
lrn@google.com cd16d94f1e Add concurrent modification check to ListMixin/IterableMixin.reduce.
Add tests of reduce and fold.

BUG= http://dartbug.com/21289
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//656773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41093 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 09:12:21 +00:00
lrn@google.com a2685542da Fix bad default value for SubListIterable.toList.
Analyzer is not happy.

Review URL: https://codereview.chromium.org//601193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40674 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 12:06:26 +00:00
lrn@google.com 8bba32d131 Make String.fromCharCodes take start/end.
This avoids having to make a sublist of a list of character codes before passing it to String.fromCharCodes.

    new String.fromCharCodes(codes.sublist(start, end))

becomes just

    new String.fromCharCodes(codes, start, end)

R=floitsch@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//515183002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40672 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 10:45:24 +00:00
lrn@google.com 729de01f79 Make IterableMixinWorkaround using classes return correctly typed Iterables.
BUG= http://dartbug.com/13646
R=floitsch@google.com

Review URL: https://codereview.chromium.org//397243002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38372 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 08:08:16 +00:00
lrn@google.com 989709f3a8 Reinstall previous behavior for Set and Queue toString.
A previous change made these omit elements to keep the toString length down.
That could break code that expects the original behavior.

This still avoids using IterableMixinWorkaround.

Add static toString methods on ListBase, SetBase, IterableBase so that users can
get the same behavior as our toString methods, and with the same cycle detection
safety.

Unify all collection toString methods in two methods:
- IterableBase.iterableToShortString
- IterableBase.iterableToFullString

R=floitsch@google.com

Review URL: https://codereview.chromium.org//297053002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36616 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-26 06:08:20 +00:00
lrn@google.com f449a85d1e Unify error messages for iterables and lists.
Add factory methods that generate the errors thrown for unmodifiable lists,
non-growable lists and iterations with the wrong number of elements.

R=iposva@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//262803003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35733 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 09:26:56 +00:00
lrn@google.com 8fd1e2f65d Make generator argument to Iterable.generate optional.
It defaults to an integer identity function.

Also optimize skip/take on the generated iterable by making it
take hold start and end positions instead of just the count.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//207823002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34240 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 09:54:46 +00:00
lrn@google.com 3b3e87cabc Revert "Rename internal library dart:_collection-dev to dart:_internal."
Dartium needs updating too.

Committed: https://code.google.com/p/dart/source/detail?r=31827

R=floitsch@google.com

Review URL: https://codereview.chromium.org//133273011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31877 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 12:06:38 +00:00
lrn@google.com ead87f47e9 Revert "Rename internal library dart:_collection-dev to dart:_internal."
Dartium needs updating too.

Review URL: https://codereview.chromium.org//133273011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31827 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 12:27:44 +00:00
lrn@google.com 0098710559 Rename internal library dart:_collection-dev to dart:_internal.
BUG= http://dartbug.com/14140
R=floitsch@google.com

Review URL: https://codereview.chromium.org//133893007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31823 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 09:24:46 +00:00
Renamed from sdk/lib/_collection_dev/iterable.dart (Browse further)