77 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
78 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
79 #elif defined(S390)
80 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
81 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
82 { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS
83 { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD
84 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
85 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
86 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
87 #else // all other
88 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
89 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
90 { Bad, T_ILLEGAL, "vectors:", false, Op_VecS, relocInfo::none }, // VectorS
91 { Bad, T_ILLEGAL, "vectord:", false, Op_VecD, relocInfo::none }, // VectorD
92 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
93 { Bad, T_ILLEGAL, "vectory:", false, Op_VecY, relocInfo::none }, // VectorY
94 { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ
95 #endif
96 { Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr
97 { Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::none }, // RawPtr
98 { Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr
99 { Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr
100 { Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr
101 { Bad, T_METADATA, "metadata:", false, Op_RegP, relocInfo::metadata_type }, // MetadataPtr
102 { Bad, T_METADATA, "klass:", false, Op_RegP, relocInfo::metadata_type }, // KlassPtr
103 { Bad, T_METADATA, "instklass:", false, Op_RegP, relocInfo::metadata_type }, // InstKlassPtr
104 { Bad, T_METADATA, "aryklass:", false, Op_RegP, relocInfo::metadata_type }, // AryKlassPtr
105 { Bad, T_OBJECT, "func", false, 0, relocInfo::none }, // Function
106 { Abio, T_ILLEGAL, "abIO", false, 0, relocInfo::none }, // Abio
107 { Return_Address, T_ADDRESS, "return_address",false, Op_RegP, relocInfo::none }, // Return_Address
108 { Memory, T_ILLEGAL, "memory", false, 0, relocInfo::none }, // Memory
109 { HalfFloatBot, T_SHORT, "halffloat_top", false, Op_RegF, relocInfo::none }, // HalfFloatTop
110 { HalfFloatCon, T_SHORT, "hfcon:", false, Op_RegF, relocInfo::none }, // HalfFloatCon
111 { HalfFloatTop, T_SHORT, "short", false, Op_RegF, relocInfo::none }, // HalfFloatBot
112 { FloatBot, T_FLOAT, "float_top", false, Op_RegF, relocInfo::none }, // FloatTop
113 { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF, relocInfo::none }, // FloatCon
114 { FloatTop, T_FLOAT, "float", false, Op_RegF, relocInfo::none }, // FloatBot
115 { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD, relocInfo::none }, // DoubleTop
116 { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD, relocInfo::none }, // DoubleCon
117 { DoubleTop, T_DOUBLE, "double", false, Op_RegD, relocInfo::none }, // DoubleBot
4700
4701 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4702 return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4703 }
4704
4705
4706 //------------------------------dump2------------------------------------------
4707 // Dump oop Type
4708 #ifndef PRODUCT
4709 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4710 // Print the name of the klass.
4711 klass()->print_name_on(st);
4712 _interfaces->dump(st);
4713
4714 switch( _ptr ) {
4715 case Constant:
4716 if (WizardMode || Verbose) {
4717 ResourceMark rm;
4718 stringStream ss;
4719
4720 st->print(" ");
4721 const_oop()->print_oop(&ss);
4722 // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4723 // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4724 char* buf = ss.as_string(/* c_heap= */false);
4725 StringUtils::replace_no_expand(buf, "\n", "");
4726 st->print_raw(buf);
4727 }
4728 case BotPTR:
4729 if (!WizardMode && !Verbose) {
4730 if( _klass_is_exact ) st->print(":exact");
4731 break;
4732 }
4733 case TopPTR:
4734 case AnyNull:
4735 case NotNull:
4736 st->print(":%s", ptr_msg[_ptr]);
4737 if( _klass_is_exact ) st->print(":exact");
4738 break;
4739 default:
4740 break;
5325 }
5326 }
5327 return result;
5328 }
5329
5330
5331 //------------------------------xdual------------------------------------------
5332 // Dual: compute field-by-field dual
5333 const Type *TypeAryPtr::xdual() const {
5334 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());
5335 }
5336
5337 //------------------------------dump2------------------------------------------
5338 #ifndef PRODUCT
5339 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5340 _ary->dump2(d,depth,st);
5341 _interfaces->dump(st);
5342
5343 switch( _ptr ) {
5344 case Constant:
5345 const_oop()->print(st);
5346 break;
5347 case BotPTR:
5348 if (!WizardMode && !Verbose) {
5349 if( _klass_is_exact ) st->print(":exact");
5350 break;
5351 }
5352 case TopPTR:
5353 case AnyNull:
5354 case NotNull:
5355 st->print(":%s", ptr_msg[_ptr]);
5356 if( _klass_is_exact ) st->print(":exact");
5357 break;
5358 default:
5359 break;
5360 }
5361
5362 if( _offset != 0 ) {
5363 BasicType basic_elem_type = elem()->basic_type();
5364 int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
|
77 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
78 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
79 #elif defined(S390)
80 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
81 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
82 { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS
83 { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD
84 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
85 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
86 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
87 #else // all other
88 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
89 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
90 { Bad, T_ILLEGAL, "vectors:", false, Op_VecS, relocInfo::none }, // VectorS
91 { Bad, T_ILLEGAL, "vectord:", false, Op_VecD, relocInfo::none }, // VectorD
92 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
93 { Bad, T_ILLEGAL, "vectory:", false, Op_VecY, relocInfo::none }, // VectorY
94 { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ
95 #endif
96 { Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr
97 { Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::external_word_type }, // RawPtr
98 { Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr
99 { Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr
100 { Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr
101 { Bad, T_METADATA, "metadata:", false, Op_RegP, relocInfo::metadata_type }, // MetadataPtr
102 { Bad, T_METADATA, "klass:", false, Op_RegP, relocInfo::metadata_type }, // KlassPtr
103 { Bad, T_METADATA, "instklass:", false, Op_RegP, relocInfo::metadata_type }, // InstKlassPtr
104 { Bad, T_METADATA, "aryklass:", false, Op_RegP, relocInfo::metadata_type }, // AryKlassPtr
105 { Bad, T_OBJECT, "func", false, 0, relocInfo::none }, // Function
106 { Abio, T_ILLEGAL, "abIO", false, 0, relocInfo::none }, // Abio
107 { Return_Address, T_ADDRESS, "return_address",false, Op_RegP, relocInfo::none }, // Return_Address
108 { Memory, T_ILLEGAL, "memory", false, 0, relocInfo::none }, // Memory
109 { HalfFloatBot, T_SHORT, "halffloat_top", false, Op_RegF, relocInfo::none }, // HalfFloatTop
110 { HalfFloatCon, T_SHORT, "hfcon:", false, Op_RegF, relocInfo::none }, // HalfFloatCon
111 { HalfFloatTop, T_SHORT, "short", false, Op_RegF, relocInfo::none }, // HalfFloatBot
112 { FloatBot, T_FLOAT, "float_top", false, Op_RegF, relocInfo::none }, // FloatTop
113 { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF, relocInfo::none }, // FloatCon
114 { FloatTop, T_FLOAT, "float", false, Op_RegF, relocInfo::none }, // FloatBot
115 { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD, relocInfo::none }, // DoubleTop
116 { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD, relocInfo::none }, // DoubleCon
117 { DoubleTop, T_DOUBLE, "double", false, Op_RegD, relocInfo::none }, // DoubleBot
4700
4701 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4702 return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4703 }
4704
4705
4706 //------------------------------dump2------------------------------------------
4707 // Dump oop Type
4708 #ifndef PRODUCT
4709 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4710 // Print the name of the klass.
4711 klass()->print_name_on(st);
4712 _interfaces->dump(st);
4713
4714 switch( _ptr ) {
4715 case Constant:
4716 if (WizardMode || Verbose) {
4717 ResourceMark rm;
4718 stringStream ss;
4719
4720 st->print(" " INTPTR_FORMAT, p2i(const_oop()));
4721 const_oop()->print_oop(&ss);
4722 // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4723 // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4724 char* buf = ss.as_string(/* c_heap= */false);
4725 StringUtils::replace_no_expand(buf, "\n", "");
4726 st->print_raw(buf);
4727 }
4728 case BotPTR:
4729 if (!WizardMode && !Verbose) {
4730 if( _klass_is_exact ) st->print(":exact");
4731 break;
4732 }
4733 case TopPTR:
4734 case AnyNull:
4735 case NotNull:
4736 st->print(":%s", ptr_msg[_ptr]);
4737 if( _klass_is_exact ) st->print(":exact");
4738 break;
4739 default:
4740 break;
5325 }
5326 }
5327 return result;
5328 }
5329
5330
5331 //------------------------------xdual------------------------------------------
5332 // Dual: compute field-by-field dual
5333 const Type *TypeAryPtr::xdual() const {
5334 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());
5335 }
5336
5337 //------------------------------dump2------------------------------------------
5338 #ifndef PRODUCT
5339 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5340 _ary->dump2(d,depth,st);
5341 _interfaces->dump(st);
5342
5343 switch( _ptr ) {
5344 case Constant:
5345 st->print(" " INTPTR_FORMAT " ", p2i(const_oop()));
5346 const_oop()->print(st);
5347 break;
5348 case BotPTR:
5349 if (!WizardMode && !Verbose) {
5350 if( _klass_is_exact ) st->print(":exact");
5351 break;
5352 }
5353 case TopPTR:
5354 case AnyNull:
5355 case NotNull:
5356 st->print(":%s", ptr_msg[_ptr]);
5357 if( _klass_is_exact ) st->print(":exact");
5358 break;
5359 default:
5360 break;
5361 }
5362
5363 if( _offset != 0 ) {
5364 BasicType basic_elem_type = elem()->basic_type();
5365 int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
|