Mercurial > hg > truffle
diff src/share/vm/utilities/growableArray.hpp @ 20340:fbc31318922c hs25.40-b06
Merge
author | amurillo |
---|---|
date | Thu, 21 Aug 2014 14:42:54 -0700 |
parents | 411e30e5fbb8 |
children | 7848fc12602b |
line wrap: on
line diff
--- a/src/share/vm/utilities/growableArray.hpp Thu Aug 21 11:43:17 2014 -0700 +++ b/src/share/vm/utilities/growableArray.hpp Thu Aug 21 14:42:54 2014 -0700 @@ -349,6 +349,7 @@ // inserts the given element before the element at index i void insert_before(const int idx, const E& elem) { + assert(0 <= idx && idx <= _len, "illegal index"); check_nesting(); if (_len == _max) grow(_len); for (int j = _len - 1; j >= idx; j--) { @@ -360,7 +361,7 @@ void appendAll(const GrowableArray<E>* l) { for (int i = 0; i < l->_len; i++) { - raw_at_put_grow(_len, l->_data[i], 0); + raw_at_put_grow(_len, l->_data[i], E()); } }