Index: sdk/lib/collection/list.dart |
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart |
index 9128228f71f5e02d3a8bd6e57ddfeee9f08c2f4f..47829d64706f36f56825dff991ae0f78036e0c9a 100644 |
--- a/sdk/lib/collection/list.dart |
+++ b/sdk/lib/collection/list.dart |
@@ -324,29 +324,14 @@ abstract class ListMixin<E> implements List<E> { |
return new SubListIterable(this, start, end); |
} |
- void insertRange(int start, int length, [E initialValue]) { |
+ void removeRange(int start, int end) { |
if (start < 0 || start > this.length) { |
throw new RangeError.range(start, 0, this.length); |
} |
- int oldLength = this.length; |
- int moveLength = oldLength - start; |
- this.length += length; |
- if (moveLength > 0) { |
- this.setRange(start + length, oldLength, this, start); |
- } |
- for (int i = 0; i < length; i++) { |
- this[start + i] = initialValue; |
- } |
- } |
- |
- void removeRange(int start, int length) { |
- if (start < 0 || start > this.length) { |
- throw new RangeError.range(start, 0, this.length); |
- } |
- if (length < 0 || start + length > this.length) { |
- throw new RangeError.range(length, 0, this.length - start); |
+ if (end < start || end > this.length) { |
+ throw new RangeError.range(end, start, this.length); |
} |
- int end = start + length; |
+ int length = end - start; |
setRange(start, this.length - length, this, end); |
this.length -= length; |
} |