< 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, 0,                    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 

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

5147     }
5148   }
5149   return result;
5150 }
5151 
5152 
5153 //------------------------------xdual------------------------------------------
5154 // Dual: compute field-by-field dual
5155 const Type *TypeAryPtr::xdual() const {
5156   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());
5157 }
5158 
5159 //------------------------------dump2------------------------------------------
5160 #ifndef PRODUCT
5161 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5162   _ary->dump2(d,depth,st);
5163   _interfaces->dump(st);
5164 
5165   switch( _ptr ) {
5166   case Constant:

5167     const_oop()->print(st);
5168     break;
5169   case BotPTR:
5170     if (!WizardMode && !Verbose) {
5171       if( _klass_is_exact ) st->print(":exact");
5172       break;
5173     }
5174   case TopPTR:
5175   case AnyNull:
5176   case NotNull:
5177     st->print(":%s", ptr_msg[_ptr]);
5178     if( _klass_is_exact ) st->print(":exact");
5179     break;
5180   default:
5181     break;
5182   }
5183 
5184   if( _offset != 0 ) {
5185     BasicType basic_elem_type = elem()->basic_type();
5186     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, 0,                    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 

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

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