equal
deleted
inserted
replaced
82 // %%% Cannot happen? |
82 // %%% Cannot happen? |
83 C->log()->elem("assert_null reason='checkcast source' klass='%d'", |
83 C->log()->elem("assert_null reason='checkcast source' klass='%d'", |
84 C->log()->identify(tp->klass())); |
84 C->log()->identify(tp->klass())); |
85 } |
85 } |
86 } |
86 } |
87 do_null_assert(obj, T_OBJECT); |
87 null_assert(obj); |
88 assert( stopped() || _gvn.type(peek())->higher_equal(TypePtr::NULL_PTR), "what's left behind is null" ); |
88 assert( stopped() || _gvn.type(peek())->higher_equal(TypePtr::NULL_PTR), "what's left behind is null" ); |
89 if (!stopped()) { |
89 if (!stopped()) { |
90 profile_null_checkcast(); |
90 profile_null_checkcast(); |
91 } |
91 } |
92 return; |
92 return; |
114 if (!will_link) { |
114 if (!will_link) { |
115 if (C->log() != NULL) { |
115 if (C->log() != NULL) { |
116 C->log()->elem("assert_null reason='instanceof' klass='%d'", |
116 C->log()->elem("assert_null reason='instanceof' klass='%d'", |
117 C->log()->identify(klass)); |
117 C->log()->identify(klass)); |
118 } |
118 } |
119 do_null_assert(peek(), T_OBJECT); |
119 null_assert(peek()); |
120 assert( stopped() || _gvn.type(peek())->higher_equal(TypePtr::NULL_PTR), "what's left behind is null" ); |
120 assert( stopped() || _gvn.type(peek())->higher_equal(TypePtr::NULL_PTR), "what's left behind is null" ); |
121 if (!stopped()) { |
121 if (!stopped()) { |
122 // The object is now known to be null. |
122 // The object is now known to be null. |
123 // Shortcut the effect of gen_instanceof and return "false" directly. |
123 // Shortcut the effect of gen_instanceof and return "false" directly. |
124 pop(); // pop the null |
124 pop(); // pop the null |
137 |
137 |
138 //------------------------------array_store_check------------------------------ |
138 //------------------------------array_store_check------------------------------ |
139 // pull array from stack and check that the store is valid |
139 // pull array from stack and check that the store is valid |
140 void Parse::array_store_check() { |
140 void Parse::array_store_check() { |
141 |
141 |
142 // Shorthand access to array store elements |
142 // Shorthand access to array store elements without popping them. |
143 Node *obj = stack(_sp-1); |
143 Node *obj = peek(0); |
144 Node *idx = stack(_sp-2); |
144 Node *idx = peek(1); |
145 Node *ary = stack(_sp-3); |
145 Node *ary = peek(2); |
146 |
146 |
147 if (_gvn.type(obj) == TypePtr::NULL_PTR) { |
147 if (_gvn.type(obj) == TypePtr::NULL_PTR) { |
148 // There's never a type check on null values. |
148 // There's never a type check on null values. |
149 // This cutout lets us avoid the uncommon_trap(Reason_array_check) |
149 // This cutout lets us avoid the uncommon_trap(Reason_array_check) |
150 // below, which turns into a performance liability if the |
150 // below, which turns into a performance liability if the |