Index: runtime/lib/growable_array.dart |
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart |
index 404194b437e9090cade813f6b4b42153c4adf6b0..d19cc2f9df873fe0480058dd424ea2eecaee63b8 100644 |
--- a/runtime/lib/growable_array.dart |
+++ b/runtime/lib/growable_array.dart |
@@ -69,39 +69,14 @@ class _GrowableObjectArray<T> implements List<T> { |
IterableMixinWorkaround.setRangeList(this, start, end, iterable, skipCount); |
} |
- void removeRange(int start, int length) { |
- if (length == 0) { |
- return; |
- } |
- Arrays.rangeCheck(this, start, length); |
+ void removeRange(int start, int end) { |
+ Arrays.indicesCheck(this, start, end); |
Arrays.copy(this, |
- start + length, |
+ end, |
this, |
start, |
- this.length - length - start); |
- this.length = this.length - length; |
- } |
- |
- void insertRange(int start, int length, [T initialValue = null]) { |
- if (length == 0) { |
- return; |
- } |
- if ((length < 0) || (length is! int)) { |
- throw new ArgumentError("invalid length specified $length"); |
- } |
- if (start < 0 || start > this.length) { |
- throw new RangeError.value(start); |
- } |
- var old_length = this.length; |
- this.length = old_length + length; // Will expand if needed. |
- Arrays.copy(this, |
- start, |
- this, |
- start + length, |
- old_length - start); |
- for (int i = start; i < start + length; i++) { |
- this[i] = initialValue; |
- } |
+ this.length - end); |
+ this.length = this.length - (end - start); |
} |
List<T> sublist(int start, [int end]) { |