< prev index next >

src/hotspot/share/opto/type.cpp

Print this page

  78   { Bad,             T_ILLEGAL,    "vectory:",      false, 0,                    relocInfo::none          },  // VectorY
  79   { Bad,             T_ILLEGAL,    "vectorz:",      false, 0,                    relocInfo::none          },  // VectorZ
  80 #elif defined(S390)
  81   { Bad,             T_ILLEGAL,    "vectormask:",   false, Op_RegVectMask,       relocInfo::none          },  // VectorMask.
  82   { Bad,             T_ILLEGAL,    "vectora:",      false, Op_VecA,              relocInfo::none          },  // VectorA.
  83   { Bad,             T_ILLEGAL,    "vectors:",      false, 0,                    relocInfo::none          },  // VectorS
  84   { Bad,             T_ILLEGAL,    "vectord:",      false, Op_RegL,              relocInfo::none          },  // VectorD
  85   { Bad,             T_ILLEGAL,    "vectorx:",      false, Op_VecX,              relocInfo::none          },  // VectorX
  86   { Bad,             T_ILLEGAL,    "vectory:",      false, 0,                    relocInfo::none          },  // VectorY
  87   { Bad,             T_ILLEGAL,    "vectorz:",      false, 0,                    relocInfo::none          },  // VectorZ
  88 #else // all other
  89   { Bad,             T_ILLEGAL,    "vectormask:",   false, Op_RegVectMask,       relocInfo::none          },  // VectorMask.
  90   { Bad,             T_ILLEGAL,    "vectora:",      false, Op_VecA,              relocInfo::none          },  // VectorA.
  91   { Bad,             T_ILLEGAL,    "vectors:",      false, Op_VecS,              relocInfo::none          },  // VectorS
  92   { Bad,             T_ILLEGAL,    "vectord:",      false, Op_VecD,              relocInfo::none          },  // VectorD
  93   { Bad,             T_ILLEGAL,    "vectorx:",      false, Op_VecX,              relocInfo::none          },  // VectorX
  94   { Bad,             T_ILLEGAL,    "vectory:",      false, Op_VecY,              relocInfo::none          },  // VectorY
  95   { Bad,             T_ILLEGAL,    "vectorz:",      false, Op_VecZ,              relocInfo::none          },  // VectorZ
  96 #endif
  97   { Bad,             T_ADDRESS,    "anyptr:",       false, Op_RegP,              relocInfo::none          },  // AnyPtr
  98   { Bad,             T_ADDRESS,    "rawptr:",       false, Op_RegP,              relocInfo::none          },  // RawPtr
  99   { Bad,             T_OBJECT,     "oop:",          true,  Op_RegP,              relocInfo::oop_type      },  // OopPtr
 100   { Bad,             T_OBJECT,     "inst:",         true,  Op_RegP,              relocInfo::oop_type      },  // InstPtr
 101   { Bad,             T_OBJECT,     "ary:",          true,  Op_RegP,              relocInfo::oop_type      },  // AryPtr
 102   { Bad,             T_METADATA,   "metadata:",     false, Op_RegP,              relocInfo::metadata_type },  // MetadataPtr
 103   { Bad,             T_METADATA,   "klass:",        false, Op_RegP,              relocInfo::metadata_type },  // KlassPtr
 104   { Bad,             T_METADATA,   "instklass:",    false, Op_RegP,              relocInfo::metadata_type },  // InstKlassPtr
 105   { Bad,             T_METADATA,   "aryklass:",     false, Op_RegP,              relocInfo::metadata_type },  // AryKlassPtr
 106   { Bad,             T_OBJECT,     "func",          false, 0,                    relocInfo::none          },  // Function
 107   { Abio,            T_ILLEGAL,    "abIO",          false, 0,                    relocInfo::none          },  // Abio
 108   { Return_Address,  T_ADDRESS,    "return_address",false, Op_RegP,              relocInfo::none          },  // Return_Address
 109   { Memory,          T_ILLEGAL,    "memory",        false, 0,                    relocInfo::none          },  // Memory
 110   { HalfFloatBot,    T_SHORT,      "halffloat_top", false, Op_RegF,              relocInfo::none          },  // HalfFloatTop
 111   { HalfFloatCon,    T_SHORT,      "hfcon:",        false, Op_RegF,              relocInfo::none          },  // HalfFloatCon
 112   { HalfFloatTop,    T_SHORT,      "short",         false, Op_RegF,              relocInfo::none          },  // HalfFloatBot
 113   { FloatBot,        T_FLOAT,      "float_top",     false, Op_RegF,              relocInfo::none          },  // FloatTop
 114   { FloatCon,        T_FLOAT,      "ftcon:",        false, Op_RegF,              relocInfo::none          },  // FloatCon
 115   { FloatTop,        T_FLOAT,      "float",         false, Op_RegF,              relocInfo::none          },  // FloatBot
 116   { DoubleBot,       T_DOUBLE,     "double_top",    false, Op_RegD,              relocInfo::none          },  // DoubleTop
 117   { DoubleCon,       T_DOUBLE,     "dblcon:",       false, Op_RegD,              relocInfo::none          },  // DoubleCon
 118   { DoubleTop,       T_DOUBLE,     "double",        false, Op_RegD,              relocInfo::none          },  // DoubleBot

4447 
4448 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4449   return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4450 }
4451 
4452 
4453 //------------------------------dump2------------------------------------------
4454 // Dump oop Type
4455 #ifndef PRODUCT
4456 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4457   // Print the name of the klass.
4458   klass()->print_name_on(st);
4459   _interfaces->dump(st);
4460 
4461   switch( _ptr ) {
4462   case Constant:
4463     if (WizardMode || Verbose) {
4464       ResourceMark rm;
4465       stringStream ss;
4466 
4467       st->print(" ");
4468       const_oop()->print_oop(&ss);
4469       // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4470       // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4471       char* buf = ss.as_string(/* c_heap= */false);
4472       StringUtils::replace_no_expand(buf, "\n", "");
4473       st->print_raw(buf);
4474     }
4475   case BotPTR:
4476     if (!WizardMode && !Verbose) {
4477       if( _klass_is_exact ) st->print(":exact");
4478       break;
4479     }
4480   case TopPTR:
4481   case AnyNull:
4482   case NotNull:
4483     st->print(":%s", ptr_msg[_ptr]);
4484     if( _klass_is_exact ) st->print(":exact");
4485     break;
4486   default:
4487     break;

5079     }
5080   }
5081   return result;
5082 }
5083 
5084 
5085 //------------------------------xdual------------------------------------------
5086 // Dual: compute field-by-field dual
5087 const Type *TypeAryPtr::xdual() const {
5088   return new TypeAryPtr(dual_ptr(), _const_oop, _ary->dual()->is_ary(),_klass, _klass_is_exact, dual_offset(), dual_instance_id(), is_autobox_cache(), dual_speculative(), dual_inline_depth());
5089 }
5090 
5091 //------------------------------dump2------------------------------------------
5092 #ifndef PRODUCT
5093 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5094   _ary->dump2(d,depth,st);
5095   _interfaces->dump(st);
5096 
5097   switch( _ptr ) {
5098   case Constant:

5099     const_oop()->print(st);
5100     break;
5101   case BotPTR:
5102     if (!WizardMode && !Verbose) {
5103       if( _klass_is_exact ) st->print(":exact");
5104       break;
5105     }
5106   case TopPTR:
5107   case AnyNull:
5108   case NotNull:
5109     st->print(":%s", ptr_msg[_ptr]);
5110     if( _klass_is_exact ) st->print(":exact");
5111     break;
5112   default:
5113     break;
5114   }
5115 
5116   if( _offset != 0 ) {
5117     BasicType basic_elem_type = elem()->basic_type();
5118     int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);

  78   { Bad,             T_ILLEGAL,    "vectory:",      false, 0,                    relocInfo::none          },  // VectorY
  79   { Bad,             T_ILLEGAL,    "vectorz:",      false, 0,                    relocInfo::none          },  // VectorZ
  80 #elif defined(S390)
  81   { Bad,             T_ILLEGAL,    "vectormask:",   false, Op_RegVectMask,       relocInfo::none          },  // VectorMask.
  82   { Bad,             T_ILLEGAL,    "vectora:",      false, Op_VecA,              relocInfo::none          },  // VectorA.
  83   { Bad,             T_ILLEGAL,    "vectors:",      false, 0,                    relocInfo::none          },  // VectorS
  84   { Bad,             T_ILLEGAL,    "vectord:",      false, Op_RegL,              relocInfo::none          },  // VectorD
  85   { Bad,             T_ILLEGAL,    "vectorx:",      false, Op_VecX,              relocInfo::none          },  // VectorX
  86   { Bad,             T_ILLEGAL,    "vectory:",      false, 0,                    relocInfo::none          },  // VectorY
  87   { Bad,             T_ILLEGAL,    "vectorz:",      false, 0,                    relocInfo::none          },  // VectorZ
  88 #else // all other
  89   { Bad,             T_ILLEGAL,    "vectormask:",   false, Op_RegVectMask,       relocInfo::none          },  // VectorMask.
  90   { Bad,             T_ILLEGAL,    "vectora:",      false, Op_VecA,              relocInfo::none          },  // VectorA.
  91   { Bad,             T_ILLEGAL,    "vectors:",      false, Op_VecS,              relocInfo::none          },  // VectorS
  92   { Bad,             T_ILLEGAL,    "vectord:",      false, Op_VecD,              relocInfo::none          },  // VectorD
  93   { Bad,             T_ILLEGAL,    "vectorx:",      false, Op_VecX,              relocInfo::none          },  // VectorX
  94   { Bad,             T_ILLEGAL,    "vectory:",      false, Op_VecY,              relocInfo::none          },  // VectorY
  95   { Bad,             T_ILLEGAL,    "vectorz:",      false, Op_VecZ,              relocInfo::none          },  // VectorZ
  96 #endif
  97   { Bad,             T_ADDRESS,    "anyptr:",       false, Op_RegP,              relocInfo::none          },  // AnyPtr
  98   { Bad,             T_ADDRESS,    "rawptr:",       false, Op_RegP,              relocInfo::external_word_type },  // RawPtr
  99   { Bad,             T_OBJECT,     "oop:",          true,  Op_RegP,              relocInfo::oop_type      },  // OopPtr
 100   { Bad,             T_OBJECT,     "inst:",         true,  Op_RegP,              relocInfo::oop_type      },  // InstPtr
 101   { Bad,             T_OBJECT,     "ary:",          true,  Op_RegP,              relocInfo::oop_type      },  // AryPtr
 102   { Bad,             T_METADATA,   "metadata:",     false, Op_RegP,              relocInfo::metadata_type },  // MetadataPtr
 103   { Bad,             T_METADATA,   "klass:",        false, Op_RegP,              relocInfo::metadata_type },  // KlassPtr
 104   { Bad,             T_METADATA,   "instklass:",    false, Op_RegP,              relocInfo::metadata_type },  // InstKlassPtr
 105   { Bad,             T_METADATA,   "aryklass:",     false, Op_RegP,              relocInfo::metadata_type },  // AryKlassPtr
 106   { Bad,             T_OBJECT,     "func",          false, 0,                    relocInfo::none          },  // Function
 107   { Abio,            T_ILLEGAL,    "abIO",          false, 0,                    relocInfo::none          },  // Abio
 108   { Return_Address,  T_ADDRESS,    "return_address",false, Op_RegP,              relocInfo::none          },  // Return_Address
 109   { Memory,          T_ILLEGAL,    "memory",        false, 0,                    relocInfo::none          },  // Memory
 110   { HalfFloatBot,    T_SHORT,      "halffloat_top", false, Op_RegF,              relocInfo::none          },  // HalfFloatTop
 111   { HalfFloatCon,    T_SHORT,      "hfcon:",        false, Op_RegF,              relocInfo::none          },  // HalfFloatCon
 112   { HalfFloatTop,    T_SHORT,      "short",         false, Op_RegF,              relocInfo::none          },  // HalfFloatBot
 113   { FloatBot,        T_FLOAT,      "float_top",     false, Op_RegF,              relocInfo::none          },  // FloatTop
 114   { FloatCon,        T_FLOAT,      "ftcon:",        false, Op_RegF,              relocInfo::none          },  // FloatCon
 115   { FloatTop,        T_FLOAT,      "float",         false, Op_RegF,              relocInfo::none          },  // FloatBot
 116   { DoubleBot,       T_DOUBLE,     "double_top",    false, Op_RegD,              relocInfo::none          },  // DoubleTop
 117   { DoubleCon,       T_DOUBLE,     "dblcon:",       false, Op_RegD,              relocInfo::none          },  // DoubleCon
 118   { DoubleTop,       T_DOUBLE,     "double",        false, Op_RegD,              relocInfo::none          },  // DoubleBot

4447 
4448 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4449   return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4450 }
4451 
4452 
4453 //------------------------------dump2------------------------------------------
4454 // Dump oop Type
4455 #ifndef PRODUCT
4456 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4457   // Print the name of the klass.
4458   klass()->print_name_on(st);
4459   _interfaces->dump(st);
4460 
4461   switch( _ptr ) {
4462   case Constant:
4463     if (WizardMode || Verbose) {
4464       ResourceMark rm;
4465       stringStream ss;
4466 
4467       st->print(" " INTPTR_FORMAT, p2i(const_oop()));
4468       const_oop()->print_oop(&ss);
4469       // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4470       // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4471       char* buf = ss.as_string(/* c_heap= */false);
4472       StringUtils::replace_no_expand(buf, "\n", "");
4473       st->print_raw(buf);
4474     }
4475   case BotPTR:
4476     if (!WizardMode && !Verbose) {
4477       if( _klass_is_exact ) st->print(":exact");
4478       break;
4479     }
4480   case TopPTR:
4481   case AnyNull:
4482   case NotNull:
4483     st->print(":%s", ptr_msg[_ptr]);
4484     if( _klass_is_exact ) st->print(":exact");
4485     break;
4486   default:
4487     break;

5079     }
5080   }
5081   return result;
5082 }
5083 
5084 
5085 //------------------------------xdual------------------------------------------
5086 // Dual: compute field-by-field dual
5087 const Type *TypeAryPtr::xdual() const {
5088   return new TypeAryPtr(dual_ptr(), _const_oop, _ary->dual()->is_ary(),_klass, _klass_is_exact, dual_offset(), dual_instance_id(), is_autobox_cache(), dual_speculative(), dual_inline_depth());
5089 }
5090 
5091 //------------------------------dump2------------------------------------------
5092 #ifndef PRODUCT
5093 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5094   _ary->dump2(d,depth,st);
5095   _interfaces->dump(st);
5096 
5097   switch( _ptr ) {
5098   case Constant:
5099     st->print(" " INTPTR_FORMAT " ", p2i(const_oop()));
5100     const_oop()->print(st);
5101     break;
5102   case BotPTR:
5103     if (!WizardMode && !Verbose) {
5104       if( _klass_is_exact ) st->print(":exact");
5105       break;
5106     }
5107   case TopPTR:
5108   case AnyNull:
5109   case NotNull:
5110     st->print(":%s", ptr_msg[_ptr]);
5111     if( _klass_is_exact ) st->print(":exact");
5112     break;
5113   default:
5114     break;
5115   }
5116 
5117   if( _offset != 0 ) {
5118     BasicType basic_elem_type = elem()->basic_type();
5119     int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
< prev index next >