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

Unified Diff: lib/array.dart

Issue 8348025: - Remove the remaining Array interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years, 2 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 | « no previous file | lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/array.dart
===================================================================
--- lib/array.dart (revision 543)
+++ lib/array.dart (working copy)
@@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// TODO(ngeoffray): Temporary definition until we remove all uses of 'Array'.
-interface Array<T> extends List<T> {
-}
-
class ListFactory<T> {
factory List.from(Iterable<T> other) {
@@ -38,7 +34,7 @@
}
// TODO(srdjan): Use shared array implementation.
-class ObjectArray<T> implements Array<T> {
+class ObjectArray<T> implements List<T> {
factory ObjectArray(int length) native "ObjectArray_allocate";
@@ -52,7 +48,7 @@
int get length() native "ObjectArray_getLength";
- void copyFrom(Array src, int srcStart, int dstStart, int count) {
+ void copyFrom(List src, int srcStart, int dstStart, int count) {
if (src is ObjectArray) {
_copyFromObjectArray(src, srcStart, dstStart, count);
} else {
@@ -171,7 +167,7 @@
// classes (and inline cache misses) versus a field in the native
// implementation (checks when modifying). We should keep watching
// the inline cache misses.
-class ImmutableArray<T> implements Array<T> {
+class ImmutableArray<T> implements List<T> {
T operator [](int index) native "ObjectArray_getIndexed";
@@ -182,7 +178,7 @@
int get length() native "ObjectArray_getLength";
- void copyFrom(Array src, int srcStart, int dstStart, int count) {
+ void copyFrom(List src, int srcStart, int dstStart, int count) {
throw const UnsupportedOperationException(
"Cannot modify an immutable array");
}
@@ -290,7 +286,7 @@
// Iterator for arrays with fixed size.
class FixedSizeArrayIterator<T> implements Iterator<T> {
- FixedSizeArrayIterator(Array array)
+ FixedSizeArrayIterator(List array)
: _array = array, _length = array.length, _pos = 0 {
assert(array is ObjectArray || array is ImmutableArray);
}
@@ -306,7 +302,7 @@
return _array[_pos++];
}
- final Array<T> _array;
+ final List<T> _array;
final int _length; // Cache array length for faster access.
int _pos;
}
« no previous file with comments | « no previous file | lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698