CLion reports "ptr_type" is unused here:
const TypeAryPtr* TypeAryPtr::cast_to_autobox_cache(bool cache) const {
...
// 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();
...
}
I wonder if cast_to_ptr_type on the next line was supposed to use ptr_type? If not, then ptr_type definition can be just pruned (and this might be just the Enhancement, not bug).
Assigning to Vladimir, because that code is fromJDK-8078629.
const TypeAryPtr* TypeAryPtr::cast_to_autobox_cache(bool cache) const {
...
// 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();
...
}
I wonder if cast_to_ptr_type on the next line was supposed to use ptr_type? If not, then ptr_type definition can be just pruned (and this might be just the Enhancement, not bug).
Assigning to Vladimir, because that code is from
- relates to
-
JDK-8078629 VM should constant fold Unsafe.get*() loads from final fields
-
- Resolved
-