< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

Print this page

*** 1541,1553 **** #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. CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info), Deoptimization::Reason_unloaded, Deoptimization::Action_make_not_entrant); __ branch(lir_cond_always, T_ILLEGAL, stub); } else { --- 1541,1556 ---- #endif if (x->needs_null_check() && (needs_patching || MacroAssembler::needs_explicit_null_check(x->offset()))) { ! 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,1876 **** } return _barrier_set->resolve(this, decorators, obj); } ! Value LIRGenerator::non_nullable_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 --- 1869,1879 ---- } return _barrier_set->resolve(this, decorators, obj); } ! 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,1980 **** 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); } bool stress_deopt = StressLoopInvariantCodeMotion && info && info->deoptimize_on_exception(); if (x->needs_null_check() && (needs_patching || --- 1972,1983 ---- x->is_static() ? "static" : "field", x->printable_bci()); } #endif Value default_value = NULL; ! 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 >