| Index: runtime/vm/growable_array.h
|
| diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h
|
| index 49ae5fa230a731d39c1bc72b0a4d9e1d670982ec..2a7fd98be540b81d4a65c51d446fb5376cb47e66 100644
|
| --- a/runtime/vm/growable_array.h
|
| +++ b/runtime/vm/growable_array.h
|
| @@ -59,7 +59,7 @@ class BaseGrowableArray : public B {
|
| }
|
|
|
| void AddArray(const BaseGrowableArray<T, B>& src) {
|
| - for (int i = 0; i < src.length(); i++) {
|
| + for (intptr_t i = 0; i < src.length(); i++) {
|
| Add(src[i]);
|
| }
|
| }
|
| @@ -76,6 +76,14 @@ class BaseGrowableArray : public B {
|
| }
|
| }
|
|
|
| + void InsertAt(intptr_t idx, const T& value) {
|
| + Resize(length() + 1);
|
| + for (intptr_t i = length_ - 2; i >= idx; i--) {
|
| + data_[i + 1] = data_[i];
|
| + }
|
| + data_[idx] = value;
|
| + }
|
| +
|
| // Sort the array in place.
|
| inline void Sort(int compare(const T*, const T*));
|
|
|
|
|