Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1556)

Unified Diff: runtime/lib/array.dart

Issue 12262037: Make List.skip, List.take and List.reversed return Iterables, not Lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments, small fixes. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer-experimental/lib/src/generated/java_core.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 3ce453bba5e3625287e521949cf1ca9908b2a019..0f02eb4c01c30ff062241f0ecba9190cf985d55f 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -164,7 +164,7 @@ class _ObjectArray<E> implements List<E> {
return this.length == 0;
}
- List<E> get reversed => new ReversedListView<E>(this, 0, null);
+ Iterable<E> get reversed => new ReversedListIterable<E>(this);
void sort([int compare(E a, E b)]) {
IterableMixinWorkaround.sortList(this, compare);
@@ -402,7 +402,7 @@ class _ImmutableArray<E> implements List<E> {
return this.length == 0;
}
- List<E> get reversed => new ReversedListView<E>(this, 0, null);
+ Iterable<E> get reversed => new ReversedListIterable<E>(this);
void sort([int compare(E a, E b)]) {
throw new UnsupportedError(
« no previous file with comments | « pkg/analyzer-experimental/lib/src/generated/java_core.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698