< prev index next >

src/hotspot/share/opto/type.cpp

Print this page

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

4512 
4513 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4514   return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4515 }
4516 
4517 
4518 //------------------------------dump2------------------------------------------
4519 // Dump oop Type
4520 #ifndef PRODUCT
4521 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4522   // Print the name of the klass.
4523   klass()->print_name_on(st);
4524   _interfaces->dump(st);
4525 
4526   switch( _ptr ) {
4527   case Constant:
4528     if (WizardMode || Verbose) {
4529       ResourceMark rm;
4530       stringStream ss;
4531 
4532       st->print(" ");
4533       const_oop()->print_oop(&ss);
4534       // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4535       // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4536       char* buf = ss.as_string(/* c_heap= */false);
4537       StringUtils::replace_no_expand(buf, "\n", "");
4538       st->print_raw(buf);
4539     }
4540   case BotPTR:
4541     if (!WizardMode && !Verbose) {
4542       if( _klass_is_exact ) st->print(":exact");
4543       break;
4544     }
4545   case TopPTR:
4546   case AnyNull:
4547   case NotNull:
4548     st->print(":%s", ptr_msg[_ptr]);
4549     if( _klass_is_exact ) st->print(":exact");
4550     break;
4551   default:
4552     break;

5134     }
5135   }
5136   return result;
5137 }
5138 
5139 
5140 //------------------------------xdual------------------------------------------
5141 // Dual: compute field-by-field dual
5142 const Type *TypeAryPtr::xdual() const {
5143   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());
5144 }
5145 
5146 //------------------------------dump2------------------------------------------
5147 #ifndef PRODUCT
5148 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5149   _ary->dump2(d,depth,st);
5150   _interfaces->dump(st);
5151 
5152   switch( _ptr ) {
5153   case Constant:

5154     const_oop()->print(st);
5155     break;
5156   case BotPTR:
5157     if (!WizardMode && !Verbose) {
5158       if( _klass_is_exact ) st->print(":exact");
5159       break;
5160     }
5161   case TopPTR:
5162   case AnyNull:
5163   case NotNull:
5164     st->print(":%s", ptr_msg[_ptr]);
5165     if( _klass_is_exact ) st->print(":exact");
5166     break;
5167   default:
5168     break;
5169   }
5170 
5171   if( _offset != 0 ) {
5172     BasicType basic_elem_type = elem()->basic_type();
5173     int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);

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

4512 
4513 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4514   return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4515 }
4516 
4517 
4518 //------------------------------dump2------------------------------------------
4519 // Dump oop Type
4520 #ifndef PRODUCT
4521 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4522   // Print the name of the klass.
4523   klass()->print_name_on(st);
4524   _interfaces->dump(st);
4525 
4526   switch( _ptr ) {
4527   case Constant:
4528     if (WizardMode || Verbose) {
4529       ResourceMark rm;
4530       stringStream ss;
4531 
4532       st->print(" " INTPTR_FORMAT, p2i(const_oop()));
4533       const_oop()->print_oop(&ss);
4534       // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4535       // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4536       char* buf = ss.as_string(/* c_heap= */false);
4537       StringUtils::replace_no_expand(buf, "\n", "");
4538       st->print_raw(buf);
4539     }
4540   case BotPTR:
4541     if (!WizardMode && !Verbose) {
4542       if( _klass_is_exact ) st->print(":exact");
4543       break;
4544     }
4545   case TopPTR:
4546   case AnyNull:
4547   case NotNull:
4548     st->print(":%s", ptr_msg[_ptr]);
4549     if( _klass_is_exact ) st->print(":exact");
4550     break;
4551   default:
4552     break;

5134     }
5135   }
5136   return result;
5137 }
5138 
5139 
5140 //------------------------------xdual------------------------------------------
5141 // Dual: compute field-by-field dual
5142 const Type *TypeAryPtr::xdual() const {
5143   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());
5144 }
5145 
5146 //------------------------------dump2------------------------------------------
5147 #ifndef PRODUCT
5148 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5149   _ary->dump2(d,depth,st);
5150   _interfaces->dump(st);
5151 
5152   switch( _ptr ) {
5153   case Constant:
5154     st->print(" " INTPTR_FORMAT " ", p2i(const_oop()));
5155     const_oop()->print(st);
5156     break;
5157   case BotPTR:
5158     if (!WizardMode && !Verbose) {
5159       if( _klass_is_exact ) st->print(":exact");
5160       break;
5161     }
5162   case TopPTR:
5163   case AnyNull:
5164   case NotNull:
5165     st->print(":%s", ptr_msg[_ptr]);
5166     if( _klass_is_exact ) st->print(":exact");
5167     break;
5168   default:
5169     break;
5170   }
5171 
5172   if( _offset != 0 ) {
5173     BasicType basic_elem_type = elem()->basic_type();
5174     int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
< prev index next >