hotspot/src/share/vm/opto/type.cpp
changeset 237 fba97e902303
parent 1 489c9b5090e2
child 360 21d113ecbf6a
equal deleted inserted replaced
236:9a04268c8eea 237:fba97e902303
  3162     switch (tap->ptr()) {
  3162     switch (tap->ptr()) {
  3163     case AnyNull:
  3163     case AnyNull:
  3164     case TopPTR:
  3164     case TopPTR:
  3165       // Compute new klass on demand, do not use tap->_klass
  3165       // Compute new klass on demand, do not use tap->_klass
  3166       xk = (tap->_klass_is_exact | this->_klass_is_exact);
  3166       xk = (tap->_klass_is_exact | this->_klass_is_exact);
  3167       return make( ptr, const_oop(), tary, lazy_klass, xk, off );
  3167       return make( ptr, const_oop(), tary, lazy_klass, xk, off, iid );
  3168     case Constant: {
  3168     case Constant: {
  3169       ciObject* o = const_oop();
  3169       ciObject* o = const_oop();
  3170       if( _ptr == Constant ) {
  3170       if( _ptr == Constant ) {
  3171         if( tap->const_oop() != NULL && !o->equals(tap->const_oop()) ) {
  3171         if( tap->const_oop() != NULL && !o->equals(tap->const_oop()) ) {
  3172           ptr = NotNull;
  3172           ptr = NotNull;
  3174         }
  3174         }
  3175       } else if( above_centerline(_ptr) ) {
  3175       } else if( above_centerline(_ptr) ) {
  3176         o = tap->const_oop();
  3176         o = tap->const_oop();
  3177       }
  3177       }
  3178       xk = true;
  3178       xk = true;
  3179       return TypeAryPtr::make( ptr, o, tary, tap->_klass, xk, off );
  3179       return TypeAryPtr::make( ptr, o, tary, tap->_klass, xk, off, iid );
  3180     }
  3180     }
  3181     case NotNull:
  3181     case NotNull:
  3182     case BotPTR:
  3182     case BotPTR:
  3183       // Compute new klass on demand, do not use tap->_klass
  3183       // Compute new klass on demand, do not use tap->_klass
  3184       if (above_centerline(this->_ptr))
  3184       if (above_centerline(this->_ptr))
  3261     st->print(":%s", ptr_msg[_ptr]);
  3261     st->print(":%s", ptr_msg[_ptr]);
  3262     if( _klass_is_exact ) st->print(":exact");
  3262     if( _klass_is_exact ) st->print(":exact");
  3263     break;
  3263     break;
  3264   }
  3264   }
  3265 
  3265 
  3266   st->print("*");
  3266   if( _offset != 0 ) {
       
  3267     int header_size = objArrayOopDesc::header_size() * wordSize;
       
  3268     if( _offset == OffsetTop )       st->print("+undefined");
       
  3269     else if( _offset == OffsetBot )  st->print("+any");
       
  3270     else if( _offset < header_size ) st->print("+%d", _offset);
       
  3271     else {
       
  3272       BasicType basic_elem_type = elem()->basic_type();
       
  3273       int array_base = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
       
  3274       int elem_size = type2aelembytes(basic_elem_type);
       
  3275       st->print("[%d]", (_offset - array_base)/elem_size);
       
  3276     }
       
  3277   }
       
  3278   st->print(" *");
  3267   if (_instance_id != UNKNOWN_INSTANCE)
  3279   if (_instance_id != UNKNOWN_INSTANCE)
  3268     st->print(",iid=%d",_instance_id);
  3280     st->print(",iid=%d",_instance_id);
  3269   if( !_offset ) return;
       
  3270   if( _offset == OffsetTop )      st->print("+undefined");
       
  3271   else if( _offset == OffsetBot ) st->print("+any");
       
  3272   else if( _offset < 12 )         st->print("+%d",_offset);
       
  3273   else                            st->print("[%d]", (_offset-12)/4 );
       
  3274 }
  3281 }
  3275 #endif
  3282 #endif
  3276 
  3283 
  3277 bool TypeAryPtr::empty(void) const {
  3284 bool TypeAryPtr::empty(void) const {
  3278   if (_ary->empty())       return true;
  3285   if (_ary->empty())       return true;