55 not_null_block = _succs[1]; |
55 not_null_block = _succs[1]; |
56 } else { |
56 } else { |
57 assert(_nodes[_nodes.size()-2] == proj, "proj is one or the other"); |
57 assert(_nodes[_nodes.size()-2] == proj, "proj is one or the other"); |
58 not_null_block = _succs[0]; |
58 not_null_block = _succs[0]; |
59 null_block = _succs[1]; |
59 null_block = _succs[1]; |
|
60 } |
|
61 while (null_block->is_Empty() == Block::empty_with_goto) { |
|
62 null_block = null_block->_succs[0]; |
60 } |
63 } |
61 |
64 |
62 // Search the exception block for an uncommon trap. |
65 // Search the exception block for an uncommon trap. |
63 // (See Parse::do_if and Parse::do_ifnull for the reason |
66 // (See Parse::do_if and Parse::do_ifnull for the reason |
64 // we need an uncommon trap. Briefly, we need a way to |
67 // we need an uncommon trap. Briefly, we need a way to |
147 { |
150 { |
148 intptr_t offset = 0; |
151 intptr_t offset = 0; |
149 const TypePtr *adr_type = NULL; // Do not need this return value here |
152 const TypePtr *adr_type = NULL; // Do not need this return value here |
150 const Node* base = mach->get_base_and_disp(offset, adr_type); |
153 const Node* base = mach->get_base_and_disp(offset, adr_type); |
151 if (base == NULL || base == NodeSentinel) { |
154 if (base == NULL || base == NodeSentinel) { |
|
155 // Narrow oop address doesn't have base, only index |
|
156 if( val->bottom_type()->isa_narrowoop() && |
|
157 MacroAssembler::needs_explicit_null_check(offset) ) |
|
158 continue; // Give up if offset is beyond page size |
152 // cannot reason about it; is probably not implicit null exception |
159 // cannot reason about it; is probably not implicit null exception |
153 } else { |
160 } else { |
154 const TypePtr* tptr = base->bottom_type()->is_ptr(); |
161 const TypePtr* tptr = base->bottom_type()->is_ptr(); |
155 // Give up if offset is not a compile-time constant |
162 // Give up if offset is not a compile-time constant |
156 if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot ) |
163 if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot ) |