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
4710
4711 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4712 return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4713 }
4714
4715
4716 //------------------------------dump2------------------------------------------
4717 // Dump oop Type
4718 #ifndef PRODUCT
4719 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4720 // Print the name of the klass.
4721 klass()->print_name_on(st);
4722 _interfaces->dump(st);
4723
4724 switch( _ptr ) {
4725 case Constant:
4726 if (WizardMode || Verbose) {
4727 ResourceMark rm;
4728 stringStream ss;
4729
4730 st->print(" ");
4731 const_oop()->print_oop(&ss);
4732 // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4733 // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4734 char* buf = ss.as_string(/* c_heap= */false);
4735 StringUtils::replace_no_expand(buf, "\n", "");
4736 st->print_raw(buf);
4737 }
4738 case BotPTR:
4739 if (!WizardMode && !Verbose) {
4740 if( _klass_is_exact ) st->print(":exact");
4741 break;
4742 }
4743 case TopPTR:
4744 case AnyNull:
4745 case NotNull:
4746 st->print(":%s", ptr_msg[_ptr]);
4747 if( _klass_is_exact ) st->print(":exact");
4748 break;
4749 default:
4750 break;
5335 }
5336 }
5337 return result;
5338 }
5339
5340
5341 //------------------------------xdual------------------------------------------
5342 // Dual: compute field-by-field dual
5343 const Type *TypeAryPtr::xdual() const {
5344 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());
5345 }
5346
5347 //------------------------------dump2------------------------------------------
5348 #ifndef PRODUCT
5349 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5350 _ary->dump2(d,depth,st);
5351 _interfaces->dump(st);
5352
5353 switch( _ptr ) {
5354 case Constant:
5355 const_oop()->print(st);
5356 break;
5357 case BotPTR:
5358 if (!WizardMode && !Verbose) {
5359 if( _klass_is_exact ) st->print(":exact");
5360 break;
5361 }
5362 case TopPTR:
5363 case AnyNull:
5364 case NotNull:
5365 st->print(":%s", ptr_msg[_ptr]);
5366 if( _klass_is_exact ) st->print(":exact");
5367 break;
5368 default:
5369 break;
5370 }
5371
5372 if( _offset != 0 ) {
5373 BasicType basic_elem_type = elem()->basic_type();
5374 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
4710
4711 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4712 return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4713 }
4714
4715
4716 //------------------------------dump2------------------------------------------
4717 // Dump oop Type
4718 #ifndef PRODUCT
4719 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4720 // Print the name of the klass.
4721 klass()->print_name_on(st);
4722 _interfaces->dump(st);
4723
4724 switch( _ptr ) {
4725 case Constant:
4726 if (WizardMode || Verbose) {
4727 ResourceMark rm;
4728 stringStream ss;
4729
4730 st->print(" " INTPTR_FORMAT, p2i(const_oop()));
4731 const_oop()->print_oop(&ss);
4732 // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4733 // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4734 char* buf = ss.as_string(/* c_heap= */false);
4735 StringUtils::replace_no_expand(buf, "\n", "");
4736 st->print_raw(buf);
4737 }
4738 case BotPTR:
4739 if (!WizardMode && !Verbose) {
4740 if( _klass_is_exact ) st->print(":exact");
4741 break;
4742 }
4743 case TopPTR:
4744 case AnyNull:
4745 case NotNull:
4746 st->print(":%s", ptr_msg[_ptr]);
4747 if( _klass_is_exact ) st->print(":exact");
4748 break;
4749 default:
4750 break;
5335 }
5336 }
5337 return result;
5338 }
5339
5340
5341 //------------------------------xdual------------------------------------------
5342 // Dual: compute field-by-field dual
5343 const Type *TypeAryPtr::xdual() const {
5344 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());
5345 }
5346
5347 //------------------------------dump2------------------------------------------
5348 #ifndef PRODUCT
5349 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5350 _ary->dump2(d,depth,st);
5351 _interfaces->dump(st);
5352
5353 switch( _ptr ) {
5354 case Constant:
5355 st->print(" " INTPTR_FORMAT " ", p2i(const_oop()));
5356 const_oop()->print(st);
5357 break;
5358 case BotPTR:
5359 if (!WizardMode && !Verbose) {
5360 if( _klass_is_exact ) st->print(":exact");
5361 break;
5362 }
5363 case TopPTR:
5364 case AnyNull:
5365 case NotNull:
5366 st->print(":%s", ptr_msg[_ptr]);
5367 if( _klass_is_exact ) st->print(":exact");
5368 break;
5369 default:
5370 break;
5371 }
5372
5373 if( _offset != 0 ) {
5374 BasicType basic_elem_type = elem()->basic_type();
5375 int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
|