< prev index next >
src/hotspot/share/opto/library_call.cpp
Print this page
@@ -2380,11 +2380,11 @@
DecoratorSet decorators = C2_UNSAFE_ACCESS;
guarantee(!is_store || kind != Acquire, "Acquire accesses can be produced only for loads");
guarantee( is_store || kind != Release, "Release accesses can be produced only for stores");
assert(type != T_OBJECT || !unaligned, "unaligned access not supported with object type");
- if (type == T_OBJECT || type == T_ARRAY) {
+ if (is_reference_type(type)) {
decorators |= ON_UNKNOWN_OOP_REF;
}
if (unaligned) {
decorators |= C2_UNALIGNED;
@@ -2728,11 +2728,11 @@
const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
Compile::AliasType* alias_type = C->alias_type(adr_type);
BasicType bt = alias_type->basic_type();
if (bt != T_ILLEGAL &&
- ((bt == T_OBJECT || bt == T_ARRAY) != (type == T_OBJECT))) {
+ (is_reference_type(bt) != (type == T_OBJECT))) {
// Don't intrinsify mismatched object accesses.
return false;
}
// For CAS, unlike inline_unsafe_access, there seems no point in
@@ -2765,11 +2765,11 @@
return true;
}
int alias_idx = C->get_alias_index(adr_type);
- if (type == T_OBJECT || type == T_ARRAY) {
+ if (is_reference_type(type)) {
decorators |= IN_HEAP | ON_UNKNOWN_OOP_REF;
// Transformation of a value which could be NULL pointer (CastPP #NULL)
// could be delayed during Parse (for example, in adjust_map_after_if()).
// Execute transformation here to avoid barrier generation in such case.
@@ -4815,12 +4815,12 @@
}
if (has_src && has_dest && can_emit_guards) {
BasicType src_elem = top_src->klass()->as_array_klass()->element_type()->basic_type();
BasicType dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
- if (src_elem == T_ARRAY) src_elem = T_OBJECT;
- if (dest_elem == T_ARRAY) dest_elem = T_OBJECT;
+ if (is_reference_type(src_elem)) src_elem = T_OBJECT;
+ if (is_reference_type(dest_elem)) dest_elem = T_OBJECT;
if (src_elem == dest_elem && src_elem == T_OBJECT) {
// If both arrays are object arrays then having the exact types
// for both will remove the need for a subtype check at runtime
// before the call and may make it possible to pick a faster copy
< prev index next >