49
50 //=============================================================================
51 uint MemNode::size_of() const { return sizeof(*this); }
52
53 const TypePtr *MemNode::adr_type() const {
54 Node* adr = in(Address);
55 const TypePtr* cross_check = NULL;
56 DEBUG_ONLY(cross_check = _adr_type);
57 return calculate_adr_type(adr->bottom_type(), cross_check);
58 }
59
60 #ifndef PRODUCT
61 void MemNode::dump_spec(outputStream *st) const {
62 if (in(Address) == NULL) return; // node is dead
63 #ifndef ASSERT
64 // fake the missing field
65 const TypePtr* _adr_type = NULL;
66 if (in(Address) != NULL)
67 _adr_type = in(Address)->bottom_type()->isa_ptr();
68 #endif
69 dump_adr_type(this, _adr_type, st);
70
71 Compile* C = Compile::current();
72 if( C->alias_type(_adr_type)->is_volatile() )
73 st->print(" Volatile!");
74 }
75
76 void MemNode::dump_adr_type(const Node* mem, const TypePtr* adr_type, outputStream *st) {
77 st->print(" @");
78 if (adr_type == NULL) {
79 st->print("NULL");
80 } else {
81 adr_type->dump_on(st);
82 Compile* C = Compile::current();
83 Compile::AliasType* atp = NULL;
84 if (C->have_alias_type(adr_type)) atp = C->alias_type(adr_type);
85 if (atp == NULL)
86 st->print(", idx=?\?;");
87 else if (atp->index() == Compile::AliasIdxBot)
88 st->print(", idx=Bot;");
|
49
50 //=============================================================================
51 uint MemNode::size_of() const { return sizeof(*this); }
52
53 const TypePtr *MemNode::adr_type() const {
54 Node* adr = in(Address);
55 const TypePtr* cross_check = NULL;
56 DEBUG_ONLY(cross_check = _adr_type);
57 return calculate_adr_type(adr->bottom_type(), cross_check);
58 }
59
60 #ifndef PRODUCT
61 void MemNode::dump_spec(outputStream *st) const {
62 if (in(Address) == NULL) return; // node is dead
63 #ifndef ASSERT
64 // fake the missing field
65 const TypePtr* _adr_type = NULL;
66 if (in(Address) != NULL)
67 _adr_type = in(Address)->bottom_type()->isa_ptr();
68 #endif
69 st->print(" Memory:");
70 dump_adr_type(this, _adr_type, st);
71
72 Compile* C = Compile::current();
73 if( C->alias_type(_adr_type)->is_volatile() )
74 st->print(" Volatile!");
75 }
76
77 void MemNode::dump_adr_type(const Node* mem, const TypePtr* adr_type, outputStream *st) {
78 st->print(" @");
79 if (adr_type == NULL) {
80 st->print("NULL");
81 } else {
82 adr_type->dump_on(st);
83 Compile* C = Compile::current();
84 Compile::AliasType* atp = NULL;
85 if (C->have_alias_type(adr_type)) atp = C->alias_type(adr_type);
86 if (atp == NULL)
87 st->print(", idx=?\?;");
88 else if (atp->index() == Compile::AliasIdxBot)
89 st->print(", idx=Bot;");
|