< prev index next >
src/hotspot/share/opto/compile.cpp
Print this page
*** 1837,1847 ****
if (flat->offset() == TypePtr::OffsetBot) {
alias_type(idx)->set_element(elemtype);
}
int field_offset = flat->is_aryptr()->field_offset().get();
if (elemtype->isa_valuetype() && field_offset != Type::OffsetBot) {
! ciValueKlass* vk = elemtype->is_valuetype()->value_klass();
field_offset += vk->first_field_offset();
field = vk->get_field_by_offset(field_offset, false);
}
}
if (flat->isa_klassptr()) {
--- 1837,1847 ----
if (flat->offset() == TypePtr::OffsetBot) {
alias_type(idx)->set_element(elemtype);
}
int field_offset = flat->is_aryptr()->field_offset().get();
if (elemtype->isa_valuetype() && field_offset != Type::OffsetBot) {
! ciValueKlass* vk = elemtype->value_klass();
field_offset += vk->first_field_offset();
field = vk->get_field_by_offset(field_offset, false);
}
}
if (flat->isa_klassptr()) {
*** 4300,4311 ****
if (superk == env()->Object_klass()) {
return SSC_always_true; // (0) this test cannot fail
}
ciType* superelem = superk;
! if (superelem->is_array_klass())
superelem = superelem->as_array_klass()->base_element_type();
if (!subk->is_interface()) { // cannot trust static interface types yet
if (subk->is_subtype_of(superk)) {
return SSC_always_true; // (1) false path dead; no dynamic test needed
}
--- 4300,4318 ----
if (superk == env()->Object_klass()) {
return SSC_always_true; // (0) this test cannot fail
}
ciType* superelem = superk;
! if (superelem->is_array_klass()) {
! ciArrayKlass* ak = superelem->as_array_klass();
! // Do not perform the subtype check on the element klasses for [V? arrays. The runtime type might
! // be [V due to [V <: [V? and the klass for [V? and [V is the same but the component mirror is not.
! if (ak->is_obj_array_klass() && !ak->storage_properties().is_null_free() && ak->element_klass()->is_valuetype()) {
! return SSC_full_test;
! }
superelem = superelem->as_array_klass()->base_element_type();
+ }
if (!subk->is_interface()) { // cannot trust static interface types yet
if (subk->is_subtype_of(superk)) {
return SSC_always_true; // (1) false path dead; no dynamic test needed
}
< prev index next >