Chromium Code Reviews| Index: compiler/lib/implementation/array.dart |
| =================================================================== |
| --- compiler/lib/implementation/array.dart (revision 400) |
| +++ compiler/lib/implementation/array.dart (working copy) |
| @@ -189,7 +189,9 @@ |
| } |
| List<T> getRange(int start, int length) { |
| - throw const NotImplementedException(); |
| + if (length == 0) return []; |
| + Arrays.rangeCheck(this, start, length); |
| + return new List<T>.fromList(this, start, start + length); |
|
floitsch
2011/10/13 16:15:14
We should really think of unifying the API.
[start
ngeoffray
2011/10/13 16:16:41
Yes, after the range methods have been implemented
|
| } |
| int indexOf(T element, int startIndex) { |