Index: runtime/lib/growable_array.dart |
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart |
index 0b384a8c54b8da0c3dec39f4085b2202f9a6d9dd..ea0f7bcb3be202a31124513ffaa3feadec5b690f 100644 |
--- a/runtime/lib/growable_array.dart |
+++ b/runtime/lib/growable_array.dart |
@@ -21,6 +21,21 @@ class _GrowableObjectArray<T> implements List<T> { |
return result; |
} |
+ void remove(Object element) { |
+ for (int i = 0; i < this.length; i++) { |
+ if (this[i] == element) { |
+ int newLength = this.length - 1; |
+ Arrays.copy(this, |
+ index + 1, |
+ this, |
+ index, |
+ newLength - index); |
+ this.length = newLength; |
+ return; |
+ } |
+ } |
+ } |
+ |
void setRange(int start, int length, List<T> from, [int startFrom = 0]) { |
if (length < 0) { |
throw new ArgumentError("negative length $length"); |