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

Unified Diff: runtime/lib/array.dart

Issue 8321024: Clean up (most) uses of Array. Still more to come in the VM corelib code base. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
Index: runtime/lib/array.dart
===================================================================
--- runtime/lib/array.dart (revision 486)
+++ runtime/lib/array.dart (working copy)
@@ -2,34 +2,7 @@
// 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.
-class ArrayFactory<T> {
- factory Array.from(Iterable<T> other) {
- GrowableObjectArray<T> array = new GrowableObjectArray<T>();
- for (final e in other) {
- array.add(e);
- }
- return array;
- }
-
- factory Array.fromArray(Array<T> other, int startIndex, int endIndex) {
- Array array = new Array<T>();
- if (endIndex > other.length) endIndex = other.length;
- if (startIndex < 0) startIndex = 0;
- int count = endIndex - startIndex;
- if (count > 0) {
- array.length = count;
- Arrays.copy(other, startIndex, array, 0, count);
- }
- return array;
- }
-
- factory Array([int length = null]) {
- if (length === null) {
- return new GrowableObjectArray<T>();
- } else {
- return new ObjectArray<T>(length);
- }
- }
+interface Array<T> extends List<T> {
srdjan 2011/10/18 08:08:21 If this is a temporary definition, please add a co
ngeoffray 2011/10/18 08:15:01 Yes, that's a temporary definition. Added a commen
}
class ListFactory<T> {

Powered by Google App Engine
This is Rietveld 408576698