< prev index next >
src/share/vm/opto/type.cpp
Print this page
*** 3198,3210 ****
klass_is_exact = true;
}
}
}
return TypeInstPtr::make(TypePtr::BotPTR, klass, klass_is_exact, NULL, 0);
! } else if (klass->is_obj_array_klass()) {
! // Element is an object array. Recursively call ourself.
! const TypeOopPtr *etype = TypeOopPtr::make_from_klass_common(klass->as_obj_array_klass()->element_klass(), false, try_for_exact);
bool xk = etype->klass_is_exact();
const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS);
// We used to pass NotNull in here, asserting that the sub-arrays
// are all not-null. This is not true in generally, as code can
// slam NULLs down in the subarrays.
--- 3198,3210 ----
klass_is_exact = true;
}
}
}
return TypeInstPtr::make(TypePtr::BotPTR, klass, klass_is_exact, NULL, 0);
! } else if (klass->is_obj_array_klass() || klass->is_value_array_klass()) {
! // Element is an object or value array. Recursively call ourself.
! const TypeOopPtr* etype = TypeOopPtr::make_from_klass_common(klass->as_array_klass()->element_klass(), false, try_for_exact);
bool xk = etype->klass_is_exact();
const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS);
// We used to pass NotNull in here, asserting that the sub-arrays
// are all not-null. This is not true in generally, as code can
// slam NULLs down in the subarrays.
*** 3243,3256 ****
if (!o->can_be_constant()) return NULL;
} else if (!o->should_be_constant()) {
return TypeInstPtr::make(TypePtr::NotNull, klass, true, NULL, 0);
}
return TypeInstPtr::make(o);
! } else if (klass->is_obj_array_klass()) {
// Element is an object array. Recursively call ourself.
const TypeOopPtr *etype =
! TypeOopPtr::make_from_klass_raw(klass->as_obj_array_klass()->element_klass());
const TypeAry* arr0 = TypeAry::make(etype, TypeInt::make(o->as_array()->length()));
// We used to pass NotNull in here, asserting that the sub-arrays
// are all not-null. This is not true in generally, as code can
// slam NULLs down in the subarrays.
if (require_constant) {
--- 3243,3256 ----
if (!o->can_be_constant()) return NULL;
} else if (!o->should_be_constant()) {
return TypeInstPtr::make(TypePtr::NotNull, klass, true, NULL, 0);
}
return TypeInstPtr::make(o);
! } else if (klass->is_obj_array_klass() || klass->is_value_array_klass()) {
// Element is an object array. Recursively call ourself.
const TypeOopPtr *etype =
! TypeOopPtr::make_from_klass_raw(klass->as_array_klass()->element_klass());
const TypeAry* arr0 = TypeAry::make(etype, TypeInt::make(o->as_array()->length()));
// We used to pass NotNull in here, asserting that the sub-arrays
// are all not-null. This is not true in generally, as code can
// slam NULLs down in the subarrays.
if (require_constant) {
*** 5113,5133 ****
//----------------------compute_klass------------------------------------------
// Compute the defining klass for this class
ciKlass* TypeAryPtr::compute_klass(DEBUG_ONLY(bool verify)) const {
// Compute _klass based on element type.
ciKlass* k_ary = NULL;
- const TypeInstPtr *tinst;
const TypeAryPtr *tary;
const Type* el = elem();
if (el->isa_narrowoop()) {
el = el->make_ptr();
}
// Get element klass
! if ((tinst = el->isa_instptr()) != NULL) {
! // Compute array klass from element klass
! k_ary = ciObjArrayKlass::make(tinst->klass());
} else if ((tary = el->isa_aryptr()) != NULL) {
// Compute array klass from element klass
ciKlass* k_elem = tary->klass();
// If element type is something like bottom[], k_elem will be null.
if (k_elem != NULL)
--- 5113,5132 ----
//----------------------compute_klass------------------------------------------
// Compute the defining klass for this class
ciKlass* TypeAryPtr::compute_klass(DEBUG_ONLY(bool verify)) const {
// Compute _klass based on element type.
ciKlass* k_ary = NULL;
const TypeAryPtr *tary;
const Type* el = elem();
if (el->isa_narrowoop()) {
el = el->make_ptr();
}
// Get element klass
! if (el->isa_instptr() || el->isa_valuetypeptr()) {
! // Compute object array klass from element klass
! k_ary = ciArrayKlass::make(el->is_oopptr()->klass());
} else if ((tary = el->isa_aryptr()) != NULL) {
// Compute array klass from element klass
ciKlass* k_elem = tary->klass();
// If element type is something like bottom[], k_elem will be null.
if (k_elem != NULL)
< prev index next >