--- old/src/share/vm/utilities/growableArray.hpp 2009-12-01 18:28:28.906485534 +0100 +++ new/src/share/vm/utilities/growableArray.hpp 2009-12-01 18:28:28.748236834 +0100 @@ -182,6 +182,17 @@ if (!contains(elem)) append(elem); } + // inserts the given element before the element at index i + void insert_before(const int idx, const E& elem) { + check_nesting(); + if (_len == _max) grow(_len); + for (int j = _len - 1; j >= idx; j--) { + _data[j + 1] = _data[j]; + } + _len++; + _data[idx] = elem; + } + E at(int i) const { assert(0 <= i && i < _len, "illegal index"); return _data[i];