120 case Op_LoadRange:
121 case Op_LoadD_unaligned:
122 case Op_LoadL_unaligned:
123 break;
124 case Op_StoreB:
125 case Op_StoreC:
126 case Op_StoreCM:
127 case Op_StoreD:
128 case Op_StoreF:
129 case Op_StoreI:
130 case Op_StoreL:
131 case Op_StoreP:
132 case Op_StoreN:
133 was_store = true; // Memory op is a store op
134 // Stores will have their address in slot 2 (memory in slot 1).
135 // If the value being nul-checked is in another slot, it means we
136 // are storing the checked value, which does NOT check the value!
137 if( mach->in(2) != val ) continue;
138 break; // Found a memory op?
139 case Op_StrComp:
140 case Op_AryEq:
141 // Not a legit memory op for implicit null check regardless of
142 // embedded loads
143 continue;
144 default: // Also check for embedded loads
145 if( !mach->needs_anti_dependence_check() )
146 continue; // Not an memory op; skip it
147 break;
148 }
149 // check if the offset is not too high for implicit exception
150 {
151 intptr_t offset = 0;
152 const TypePtr *adr_type = NULL; // Do not need this return value here
153 const Node* base = mach->get_base_and_disp(offset, adr_type);
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
159 // cannot reason about it; is probably not implicit null exception
|
120 case Op_LoadRange:
121 case Op_LoadD_unaligned:
122 case Op_LoadL_unaligned:
123 break;
124 case Op_StoreB:
125 case Op_StoreC:
126 case Op_StoreCM:
127 case Op_StoreD:
128 case Op_StoreF:
129 case Op_StoreI:
130 case Op_StoreL:
131 case Op_StoreP:
132 case Op_StoreN:
133 was_store = true; // Memory op is a store op
134 // Stores will have their address in slot 2 (memory in slot 1).
135 // If the value being nul-checked is in another slot, it means we
136 // are storing the checked value, which does NOT check the value!
137 if( mach->in(2) != val ) continue;
138 break; // Found a memory op?
139 case Op_StrComp:
140 case Op_StrEquals:
141 case Op_StrIndexOf:
142 case Op_AryEq:
143 // Not a legit memory op for implicit null check regardless of
144 // embedded loads
145 continue;
146 default: // Also check for embedded loads
147 if( !mach->needs_anti_dependence_check() )
148 continue; // Not an memory op; skip it
149 break;
150 }
151 // check if the offset is not too high for implicit exception
152 {
153 intptr_t offset = 0;
154 const TypePtr *adr_type = NULL; // Do not need this return value here
155 const Node* base = mach->get_base_and_disp(offset, adr_type);
156 if (base == NULL || base == NodeSentinel) {
157 // Narrow oop address doesn't have base, only index
158 if( val->bottom_type()->isa_narrowoop() &&
159 MacroAssembler::needs_explicit_null_check(offset) )
160 continue; // Give up if offset is beyond page size
161 // cannot reason about it; is probably not implicit null exception
|