< prev index next >

src/hotspot/share/c1/c1_Instruction.cpp

Print this page

*** 292,308 **** bool StoreIndexed::is_exact_flattened_array_store() const { if (array()->is_loaded_flattened_array() && value()->as_Constant() == NULL) { ciKlass* element_klass = array()->declared_type()->as_value_array_klass()->element_klass(); ciKlass* actual_klass = value()->declared_type()->as_klass(); ! if (element_klass == actual_klass) { ! return true; ! } else { ! // This can happen with inlining: // void test45_inline(Object[] oa, Object o, int index) { oa[index] = o; } // void test45(MyValue1[] va, int index, MyValue2 v) { test45_inline(va, v, index); } ! return false; } } return false; } --- 292,307 ---- bool StoreIndexed::is_exact_flattened_array_store() const { if (array()->is_loaded_flattened_array() && value()->as_Constant() == NULL) { ciKlass* element_klass = array()->declared_type()->as_value_array_klass()->element_klass(); ciKlass* actual_klass = value()->declared_type()->as_klass(); ! ! // The following check can fail with inlining: // void test45_inline(Object[] oa, Object o, int index) { oa[index] = o; } // void test45(MyValue1[] va, int index, MyValue2 v) { test45_inline(va, v, index); } ! if (element_klass == actual_klass) { ! return true; } } return false; }
< prev index next >