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

Unified Diff: runtime/lib/array.dart

Issue 107333003: Fix an old TODO. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « no previous file | 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
===================================================================
--- runtime/lib/array.dart (revision 31056)
+++ runtime/lib/array.dart (working copy)
@@ -78,7 +78,7 @@
_copyFromObjectArray(iterable, skipCount, start, length);
} else {
if (iterable is List) {
- Arrays.copy(iterable, skipCount, this, start, length);
+ Lists.copy(iterable, skipCount, this, start, length);
} else {
Iterator it = iterable.iterator;
while (skipCount > 0) {
@@ -108,13 +108,13 @@
}
List<E> sublist(int start, [int end]) {
- Arrays.indicesCheck(this, start, end);
+ Lists.indicesCheck(this, start, end);
if (end == null) end = this.length;
int length = end - start;
if (start == end) return [];
List list = new _GrowableList<E>.withCapacity(length);
list.length = length;
- Arrays.copy(this, start, list, 0, length);
+ Lists.copy(this, start, list, 0, length);
return list;
}
@@ -209,12 +209,12 @@
}
int indexOf(Object element, [int start = 0]) {
- return Arrays.indexOf(this, element, start, this.length);
+ return Lists.indexOf(this, element, start, this.length);
}
int lastIndexOf(Object element, [int start = null]) {
if (start == null) start = length - 1;
- return Arrays.lastIndexOf(this, element, start);
+ return Lists.lastIndexOf(this, element, start);
}
Iterator<E> get iterator {
@@ -361,13 +361,13 @@
}
List<E> sublist(int start, [int end]) {
- Arrays.indicesCheck(this, start, end);
+ Lists.indicesCheck(this, start, end);
if (end == null) end = this.length;
int length = end - start;
if (start == end) return [];
List list = new List<E>();
list.length = length;
- Arrays.copy(this, start, list, 0, length);
+ Lists.copy(this, start, list, 0, length);
return list;
}
@@ -472,12 +472,12 @@
}
int indexOf(Object element, [int start = 0]) {
- return Arrays.indexOf(this, element, start, this.length);
+ return Lists.indexOf(this, element, start, this.length);
}
int lastIndexOf(Object element, [int start = null]) {
if (start == null) start = length - 1;
- return Arrays.lastIndexOf(this, element, start);
+ return Lists.lastIndexOf(this, element, start);
}
Iterator<E> get iterator {
« no previous file with comments | « no previous file | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698