8252494: C2: TypeAryPtr::cast_to_autobox_cache does not use ptr_type
Remove dead definition of ptr_type in TypeAryPtr::cast_to_autobox_cache. Also remove unnecessary cache parameter (always true) for simplicity. Reviewed-by: shade, vlivanov, thartmann
This commit is contained in:
parent
8777ded123
commit
9687dcabb6
@ -250,7 +250,7 @@ const Type* Type::make_from_constant(ciConstant constant, bool require_constant,
|
||||
guarantee(require_constant || oop_constant->should_be_constant(), "con_type must get computed");
|
||||
con_type = TypeOopPtr::make_from_constant(oop_constant, require_constant);
|
||||
if (Compile::current()->eliminate_boxing() && is_autobox_cache) {
|
||||
con_type = con_type->is_aryptr()->cast_to_autobox_cache(true);
|
||||
con_type = con_type->is_aryptr()->cast_to_autobox_cache();
|
||||
}
|
||||
if (stable_dimension > 0) {
|
||||
assert(FoldStableValues, "sanity");
|
||||
@ -4203,15 +4203,14 @@ int TypeAryPtr::stable_dimension() const {
|
||||
}
|
||||
|
||||
//----------------------cast_to_autobox_cache-----------------------------------
|
||||
const TypeAryPtr* TypeAryPtr::cast_to_autobox_cache(bool cache) const {
|
||||
if (is_autobox_cache() == cache) return this;
|
||||
const TypeAryPtr* TypeAryPtr::cast_to_autobox_cache() const {
|
||||
if (is_autobox_cache()) return this;
|
||||
const TypeOopPtr* etype = elem()->make_oopptr();
|
||||
if (etype == NULL) return this;
|
||||
// The pointers in the autobox arrays are always non-null.
|
||||
TypePtr::PTR ptr_type = cache ? TypePtr::NotNull : TypePtr::AnyNull;
|
||||
etype = etype->cast_to_ptr_type(TypePtr::NotNull)->is_oopptr();
|
||||
const TypeAry* new_ary = TypeAry::make(etype, size(), is_stable());
|
||||
return make(ptr(), const_oop(), new_ary, klass(), klass_is_exact(), _offset, _instance_id, _speculative, _inline_depth, cache);
|
||||
return make(ptr(), const_oop(), new_ary, klass(), klass_is_exact(), _offset, _instance_id, _speculative, _inline_depth, /*is_autobox_cache=*/true);
|
||||
}
|
||||
|
||||
//------------------------------eq---------------------------------------------
|
||||
|
@ -1226,7 +1226,7 @@ public:
|
||||
const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const;
|
||||
int stable_dimension() const;
|
||||
|
||||
const TypeAryPtr* cast_to_autobox_cache(bool cache) const;
|
||||
const TypeAryPtr* cast_to_autobox_cache() const;
|
||||
|
||||
static jint max_array_length(BasicType etype) ;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user