src/share/vm/c1/c1_RangeCheckElimination.cpp

changeset 4972
6a3629cf7075
parent 4869
d595e8ddadd9
child 6198
55fb97c4c58d
     1.1 --- a/src/share/vm/c1/c1_RangeCheckElimination.cpp	Tue Apr 16 17:06:39 2013 +0200
     1.2 +++ b/src/share/vm/c1/c1_RangeCheckElimination.cpp	Wed Apr 24 09:42:08 2013 +0200
     1.3 @@ -459,7 +459,7 @@
     1.4  
     1.5      // Iterate over all different indices
     1.6      if (_optimistic) {
     1.7 -      for (int i=0; i<indices.length(); i++) {
     1.8 +      for (int i = 0; i < indices.length(); i++) {
     1.9          Instruction *index_instruction = indices.at(i);
    1.10          AccessIndexedInfo *info = _access_indexed_info[index_instruction->id()];
    1.11          assert(info != NULL, "Info must not be null");
    1.12 @@ -531,9 +531,7 @@
    1.13              remove_range_check(ai);
    1.14            }
    1.15          }
    1.16 -        _access_indexed_info[index_instruction->id()] = NULL;
    1.17        }
    1.18 -      indices.clear();
    1.19  
    1.20        if (list_constant.length() > 1) {
    1.21          AccessIndexed *first = list_constant.at(0);
    1.22 @@ -560,6 +558,13 @@
    1.23          }
    1.24        }
    1.25      }
    1.26 +
    1.27 +    // Clear data structures for next array
    1.28 +    for (int i = 0; i < indices.length(); i++) {
    1.29 +      Instruction *index_instruction = indices.at(i);
    1.30 +      _access_indexed_info[index_instruction->id()] = NULL;
    1.31 +    }
    1.32 +    indices.clear();
    1.33    }
    1.34  }
    1.35  

mercurial