< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

Print this page

@@ -2161,10 +2161,33 @@
       __ branch_destination(slow_path->continuation());
     }
   }
 }
 
+void LIRGenerator::do_WithField(WithField* x) {
+  // This happens only when a class X uses the withfield bytecode to refer to
+  // an inline class V, where V has not yet been loaded. This is not a common
+  // case. Let's just deoptimize.
+  CodeEmitInfo* info = state_for(x, x->state_before());
+  CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info),
+                                      Deoptimization::Reason_unloaded,
+                                      Deoptimization::Action_make_not_entrant);
+  __ branch(lir_cond_always, T_ILLEGAL, stub);
+  LIR_Opr reg = rlock_result(x, T_OBJECT);
+  __ move(LIR_OprFact::oopConst(NULL), reg);
+}
+
+void LIRGenerator::do_DefaultValue(DefaultValue* x) {
+  // Same as withfield above. Let's deoptimize.
+  CodeEmitInfo* info = state_for(x, x->state_before());
+  CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info),
+                                      Deoptimization::Reason_unloaded,
+                                      Deoptimization::Action_make_not_entrant);
+  __ branch(lir_cond_always, T_ILLEGAL, stub);
+  LIR_Opr reg = rlock_result(x, T_OBJECT);
+  __ move(LIR_OprFact::oopConst(NULL), reg);
+}
 
 void LIRGenerator::do_NullCheck(NullCheck* x) {
   if (x->can_trap()) {
     LIRItem value(x->obj(), this);
     value.load_item();
< prev index next >