< prev index next >
src/hotspot/share/c1/c1_LIRGenerator.cpp
Print this page
@@ -1541,13 +1541,16 @@
#endif
if (x->needs_null_check() &&
(needs_patching ||
MacroAssembler::needs_explicit_null_check(x->offset()))) {
- if (needs_patching && x->field()->is_never_null()) {
- // We are storing a field of type "QT;", but T is not yet loaded, so we don't
- // know whether this field is flattened or not. Let's deoptimize and recompile.
+ if (needs_patching && x->field()->is_q_type()) {
+ // We are storing a field of type "QT;" into holder class H, but H is not yet
+ // loaded. (If H had been loaded, then T must also have already been loaded
+ // due to the "Q" signature, and needs_patching would be false).
+ assert(!x->field()->holder()->is_loaded(), "must be");
+ // We don't know the offset of this field. Let's deopt and recompile.
CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info),
Deoptimization::Reason_unloaded,
Deoptimization::Action_make_not_entrant);
__ branch(lir_cond_always, T_ILLEGAL, stub);
} else {
@@ -1866,11 +1869,11 @@
}
return _barrier_set->resolve(this, decorators, obj);
}
-Value LIRGenerator::non_nullable_load_field_prolog(LoadField* x, CodeEmitInfo* info) {
+Value LIRGenerator::q_type_load_field_prolog(LoadField* x, CodeEmitInfo* info) {
ciField* field = x->field();
ciInstanceKlass* holder = field->holder();
Value default_value = NULL;
// Unloaded "QV;" klasses are represented by a ciInstanceKlass
@@ -1969,12 +1972,12 @@
x->is_static() ? "static" : "field", x->printable_bci());
}
#endif
Value default_value = NULL;
- if (x->field()->is_never_null()) {
- default_value = non_nullable_load_field_prolog(x, info);
+ if (x->field()->is_q_type()) {
+ default_value = q_type_load_field_prolog(x, info);
}
bool stress_deopt = StressLoopInvariantCodeMotion && info && info->deoptimize_on_exception();
if (x->needs_null_check() &&
(needs_patching ||
< prev index next >