< prev index next > src/hotspot/share/opto/type.cpp
Print this page
default:
break;
}
if( _offset != 0 ) {
- int header_size = objArrayOopDesc::header_size() * wordSize;
+ BasicType basic_elem_type = elem()->basic_type();
+ int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
if( _offset == OffsetTop ) st->print("+undefined");
else if( _offset == OffsetBot ) st->print("+any");
else if( _offset < header_size ) st->print("+%d", _offset);
else {
- BasicType basic_elem_type = elem()->basic_type();
int array_base = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
int elem_size = type2aelembytes(basic_elem_type);
st->print("[%d]", (_offset - array_base)/elem_size);
}
}
< prev index next >