80 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
81 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
82 #elif defined(S390)
83 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
84 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
85 { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS
86 { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD
87 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
88 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
89 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
90 #else // all other
91 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
92 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
93 { Bad, T_ILLEGAL, "vectors:", false, Op_VecS, relocInfo::none }, // VectorS
94 { Bad, T_ILLEGAL, "vectord:", false, Op_VecD, relocInfo::none }, // VectorD
95 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
96 { Bad, T_ILLEGAL, "vectory:", false, Op_VecY, relocInfo::none }, // VectorY
97 { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ
98 #endif
99 { Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr
100 { Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::none }, // RawPtr
101 { Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr
102 { Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr
103 { Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr
104 { Bad, T_METADATA, "metadata:", false, Op_RegP, relocInfo::metadata_type }, // MetadataPtr
105 { Bad, T_METADATA, "klass:", false, Op_RegP, relocInfo::metadata_type }, // KlassPtr
106 { Bad, T_METADATA, "instklass:", false, Op_RegP, relocInfo::metadata_type }, // InstKlassPtr
107 { Bad, T_METADATA, "aryklass:", false, Op_RegP, relocInfo::metadata_type }, // AryKlassPtr
108 { Bad, T_OBJECT, "func", false, 0, relocInfo::none }, // Function
109 { Abio, T_ILLEGAL, "abIO", false, 0, relocInfo::none }, // Abio
110 { Return_Address, T_ADDRESS, "return_address",false, Op_RegP, relocInfo::none }, // Return_Address
111 { Memory, T_ILLEGAL, "memory", false, 0, relocInfo::none }, // Memory
112 { HalfFloatBot, T_SHORT, "halffloat_top", false, Op_RegF, relocInfo::none }, // HalfFloatTop
113 { HalfFloatCon, T_SHORT, "hfcon:", false, Op_RegF, relocInfo::none }, // HalfFloatCon
114 { HalfFloatTop, T_SHORT, "short", false, Op_RegF, relocInfo::none }, // HalfFloatBot
115 { FloatBot, T_FLOAT, "float_top", false, Op_RegF, relocInfo::none }, // FloatTop
116 { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF, relocInfo::none }, // FloatCon
117 { FloatTop, T_FLOAT, "float", false, Op_RegF, relocInfo::none }, // FloatBot
118 { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD, relocInfo::none }, // DoubleTop
119 { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD, relocInfo::none }, // DoubleCon
120 { DoubleTop, T_DOUBLE, "double", false, Op_RegD, relocInfo::none }, // DoubleBot
4479 }
4480
4481 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4482 return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4483 }
4484
4485
4486 //------------------------------dump2------------------------------------------
4487 // Dump oop Type
4488 #ifndef PRODUCT
4489 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4490 // Print the name of the klass.
4491 st->print("instptr:");
4492 klass()->print_name_on(st);
4493 _interfaces->dump(st);
4494
4495 if (_ptr == Constant && (WizardMode || Verbose)) {
4496 ResourceMark rm;
4497 stringStream ss;
4498
4499 st->print(" ");
4500 const_oop()->print_oop(&ss);
4501 // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4502 // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4503 char* buf = ss.as_string(/* c_heap= */false);
4504 StringUtils::replace_no_expand(buf, "\n", "");
4505 st->print_raw(buf);
4506 }
4507
4508 st->print(":%s", ptr_msg[_ptr]);
4509 if (_klass_is_exact) {
4510 st->print(":exact");
4511 }
4512
4513 dump_offset(st);
4514 dump_instance_id(st);
4515 dump_inline_depth(st);
4516 dump_speculative(st);
4517 }
4518 #endif
4519
5092 }
5093 }
5094 return result;
5095 }
5096
5097
5098 //------------------------------xdual------------------------------------------
5099 // Dual: compute field-by-field dual
5100 const Type *TypeAryPtr::xdual() const {
5101 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());
5102 }
5103
5104 //------------------------------dump2------------------------------------------
5105 #ifndef PRODUCT
5106 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5107 st->print("aryptr:");
5108 _ary->dump2(d, depth, st);
5109 _interfaces->dump(st);
5110
5111 if (_ptr == Constant) {
5112 const_oop()->print(st);
5113 }
5114
5115 st->print(":%s", ptr_msg[_ptr]);
5116 if (_klass_is_exact) {
5117 st->print(":exact");
5118 }
5119
5120 if( _offset != 0 ) {
5121 BasicType basic_elem_type = elem()->basic_type();
5122 int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
5123 if( _offset == OffsetTop ) st->print("+undefined");
5124 else if( _offset == OffsetBot ) st->print("+any");
5125 else if( _offset < header_size ) st->print("+%d", _offset);
5126 else {
5127 if (basic_elem_type == T_ILLEGAL) {
5128 st->print("+any");
5129 } else {
5130 int elem_size = type2aelembytes(basic_elem_type);
5131 st->print("[%d]", (_offset - header_size)/elem_size);
|
80 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
81 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
82 #elif defined(S390)
83 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
84 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
85 { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS
86 { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD
87 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
88 { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY
89 { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ
90 #else // all other
91 { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask.
92 { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA.
93 { Bad, T_ILLEGAL, "vectors:", false, Op_VecS, relocInfo::none }, // VectorS
94 { Bad, T_ILLEGAL, "vectord:", false, Op_VecD, relocInfo::none }, // VectorD
95 { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX
96 { Bad, T_ILLEGAL, "vectory:", false, Op_VecY, relocInfo::none }, // VectorY
97 { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ
98 #endif
99 { Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr
100 { Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::external_word_type }, // RawPtr
101 { Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr
102 { Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr
103 { Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr
104 { Bad, T_METADATA, "metadata:", false, Op_RegP, relocInfo::metadata_type }, // MetadataPtr
105 { Bad, T_METADATA, "klass:", false, Op_RegP, relocInfo::metadata_type }, // KlassPtr
106 { Bad, T_METADATA, "instklass:", false, Op_RegP, relocInfo::metadata_type }, // InstKlassPtr
107 { Bad, T_METADATA, "aryklass:", false, Op_RegP, relocInfo::metadata_type }, // AryKlassPtr
108 { Bad, T_OBJECT, "func", false, 0, relocInfo::none }, // Function
109 { Abio, T_ILLEGAL, "abIO", false, 0, relocInfo::none }, // Abio
110 { Return_Address, T_ADDRESS, "return_address",false, Op_RegP, relocInfo::none }, // Return_Address
111 { Memory, T_ILLEGAL, "memory", false, 0, relocInfo::none }, // Memory
112 { HalfFloatBot, T_SHORT, "halffloat_top", false, Op_RegF, relocInfo::none }, // HalfFloatTop
113 { HalfFloatCon, T_SHORT, "hfcon:", false, Op_RegF, relocInfo::none }, // HalfFloatCon
114 { HalfFloatTop, T_SHORT, "short", false, Op_RegF, relocInfo::none }, // HalfFloatBot
115 { FloatBot, T_FLOAT, "float_top", false, Op_RegF, relocInfo::none }, // FloatTop
116 { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF, relocInfo::none }, // FloatCon
117 { FloatTop, T_FLOAT, "float", false, Op_RegF, relocInfo::none }, // FloatBot
118 { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD, relocInfo::none }, // DoubleTop
119 { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD, relocInfo::none }, // DoubleCon
120 { DoubleTop, T_DOUBLE, "double", false, Op_RegD, relocInfo::none }, // DoubleBot
4479 }
4480
4481 bool TypeInstPtr::maybe_java_subtype_of_helper(const TypeOopPtr* other, bool this_exact, bool other_exact) const {
4482 return TypePtr::maybe_java_subtype_of_helper_for_instance(this, other, this_exact, other_exact);
4483 }
4484
4485
4486 //------------------------------dump2------------------------------------------
4487 // Dump oop Type
4488 #ifndef PRODUCT
4489 void TypeInstPtr::dump2(Dict &d, uint depth, outputStream* st) const {
4490 // Print the name of the klass.
4491 st->print("instptr:");
4492 klass()->print_name_on(st);
4493 _interfaces->dump(st);
4494
4495 if (_ptr == Constant && (WizardMode || Verbose)) {
4496 ResourceMark rm;
4497 stringStream ss;
4498
4499 st->print(" " INTPTR_FORMAT, p2i(const_oop()));
4500 const_oop()->print_oop(&ss);
4501 // 'const_oop->print_oop()' may emit newlines('\n') into ss.
4502 // suppress newlines from it so -XX:+Verbose -XX:+PrintIdeal dumps one-liner for each node.
4503 char* buf = ss.as_string(/* c_heap= */false);
4504 StringUtils::replace_no_expand(buf, "\n", "");
4505 st->print_raw(buf);
4506 }
4507
4508 st->print(":%s", ptr_msg[_ptr]);
4509 if (_klass_is_exact) {
4510 st->print(":exact");
4511 }
4512
4513 dump_offset(st);
4514 dump_instance_id(st);
4515 dump_inline_depth(st);
4516 dump_speculative(st);
4517 }
4518 #endif
4519
5092 }
5093 }
5094 return result;
5095 }
5096
5097
5098 //------------------------------xdual------------------------------------------
5099 // Dual: compute field-by-field dual
5100 const Type *TypeAryPtr::xdual() const {
5101 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());
5102 }
5103
5104 //------------------------------dump2------------------------------------------
5105 #ifndef PRODUCT
5106 void TypeAryPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
5107 st->print("aryptr:");
5108 _ary->dump2(d, depth, st);
5109 _interfaces->dump(st);
5110
5111 if (_ptr == Constant) {
5112 st->print(" " INTPTR_FORMAT " ", p2i(const_oop()));
5113 const_oop()->print(st);
5114 }
5115
5116 st->print(":%s", ptr_msg[_ptr]);
5117 if (_klass_is_exact) {
5118 st->print(":exact");
5119 }
5120
5121 if( _offset != 0 ) {
5122 BasicType basic_elem_type = elem()->basic_type();
5123 int header_size = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
5124 if( _offset == OffsetTop ) st->print("+undefined");
5125 else if( _offset == OffsetBot ) st->print("+any");
5126 else if( _offset < header_size ) st->print("+%d", _offset);
5127 else {
5128 if (basic_elem_type == T_ILLEGAL) {
5129 st->print("+any");
5130 } else {
5131 int elem_size = type2aelembytes(basic_elem_type);
5132 st->print("[%d]", (_offset - header_size)/elem_size);
|