Index: runtime/lib/array.dart |
=================================================================== |
--- runtime/lib/array.dart (revision 938) |
+++ runtime/lib/array.dart (working copy) |
@@ -82,7 +82,10 @@ |
List<T> getRange(int start, int length) { |
if (length == 0) return []; |
Arrays.rangeCheck(this, start, length); |
- return new List<T>.fromList(this, start, start + length); |
+ List list = new List<T>(); |
+ list.length = length; |
+ Arrays.copy(this, start, list, 0, length); |
+ return list; |
} |
/** |
@@ -201,7 +204,10 @@ |
List<T> getRange(int start, int length) { |
if (length == 0) return []; |
Arrays.rangeCheck(this, start, length); |
- return new List<T>.fromList(this, start, start + length); |
+ List list = new List<T>(); |
+ list.length = length; |
+ Arrays.copy(this, start, list, 0, length); |
+ return list; |
} |
/** |