src/share/vm/utilities/growableArray.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/utilities/growableArray.hpp	Tue Dec  1 18:28:28 2009
--- new/src/share/vm/utilities/growableArray.hpp	Tue Dec  1 18:28:28 2009

*** 180,189 **** --- 180,200 ---- void append_if_missing(const E& elem) { 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]; }

src/share/vm/utilities/growableArray.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File