< prev index next >

src/hotspot/share/opto/type.cpp

Print this page
*** 4559,11 ***
    default:
      break;
    }
  
    if( _offset != 0 ) {
!     int header_size = objArrayOopDesc::header_size() * wordSize;
      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();
--- 4559,12 ---
    default:
      break;
    }
  
    if( _offset != 0 ) {
!     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();
< prev index next >