diff src/share/vm/utilities/growableArray.hpp @ 20327:411e30e5fbb8

8026796: Make replace_in_map() on parent maps generic Summary: propagate node replacements along control flow edges to callers Reviewed-by: kvn, vlivanov
author roland
date Wed, 13 Aug 2014 11:00:22 +0200
parents 46bbe04d1cad
children 7848fc12602b
line wrap: on
line diff
--- a/src/share/vm/utilities/growableArray.hpp	Wed Apr 23 12:37:36 2014 +0200
+++ b/src/share/vm/utilities/growableArray.hpp	Wed Aug 13 11:00:22 2014 +0200
@@ -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());
     }
   }