} else if (receiver.isClassConstant()) { local = child.makeLocal(localNum++, VM_TypeReference.JavaLangClass); local.setPreciseType();  OPT_RegisterOperand guard = child.makeNullCheckGuard(local.register); OPT_BC2IR.setGuard(local, guard); child.prologue.appendInstruction(Move.create(GUARD_MOVE, guard.copyRO(), new OPT_TrueGuardOperand()));
  static OPT_GenerationContext createChildContext(OPT_GenerationContext parent,                                                  OPT_ExceptionHandlerBasicBlockBag ebag,                                                  VM_NormalMethod callee,                                                  OPT_Instruction callSite) {    OPT_GenerationContext child = new OPT_GenerationContext();    child.method = callee;    if (parent.options.frequencyCounters() || parent.options.inverseFrequencyCounters()) {      child.branchProfiles = VM_EdgeCounts.getBranchProfiles(callee);    }    child.original_method = parent.original_method;    child.original_cm = parent.original_cm;    // Some state gets directly copied to the child    child.options = parent.options;    child.temps = parent.temps;    child._ncGuards = parent._ncGuards;    child.exit = parent.exit;    child.inlinePlan = parent.inlinePlan;    // Now inherit state based on callSite    //-#if RVM_WITH_OSR    child.inlineSequence = new OPT_InlineSequence(child.method,                                                  callSite.position,                                                  callSite);    //-#else    child.inlineSequence = new OPT_InlineSequence(child.method,                                                   callSite.position,                                                   callSite.bcIndex);    //-#endif    child.enclosingHandlers = ebag;    child.arguments = new OPT_Operand[Call.getNumberOfParams(callSite)];    for (int i=0; i< child.arguments.length; i++) {      child.arguments[i] = Call.getParam(callSite, i).copy(); // copy instead       // of clearing in case inlining aborts.    }    if (Call.hasResult(callSite)) {      child.resultReg = Call.getResult(callSite).copyD2D().register;      child.resultReg.setSpansBasicBlock(); // it will...    }     // Initialize the child CFG, prologue, and epilogue blocks    child.cfg = new OPT_ControlFlowGraph(parent.cfg.numberOfNodes());    child.prologue = new OPT_BasicBlock(PROLOGUE_BCI,                                         child.inlineSequence, child.cfg);    child.prologue.exceptionHandlers = ebag;    child.epilogue = new OPT_BasicBlock(EPILOGUE_BCI,                                         child.inlineSequence, child.cfg);    child.epilogue.exceptionHandlers = ebag;    child.cfg.addLastInCodeOrder(child.prologue);    child.cfg.addLastInCodeOrder(child.epilogue);    // Set up the local pool    child.initLocalPool();    // Insert moves from child.arguments to child's locals in prologue    VM_TypeReference[] params = child.method.getParameterTypes();    int numParams = params.length;    int argIdx = 0;    int localNum = 0;    if (!child.method.isStatic()) {      OPT_Operand receiver = child.arguments[argIdx++];      OPT_RegisterOperand local = null;      if (receiver.isRegister()) {        OPT_RegisterOperand objPtr = receiver.asRegister();        if (OPT_ClassLoaderProxy.includesType(child.method.getDeclaringClass().getTypeRef(), objPtr.type) != YES) {          // narrow type of actual to match formal static type implied by method          objPtr.type = child.method.getDeclaringClass().getTypeRef();          objPtr.clearPreciseType(); // Can be precise but not assignable if enough classes aren't loaded          objPtr.setDeclaredType();        }        local = child.makeLocal(localNum++, objPtr);        child.arguments[0] = local; // Avoid confusion in BC2IR of callee         // when objPtr is a local in the caller.      } else if (receiver.isStringConstant()) {        local = child.makeLocal(localNum++, VM_TypeReference.JavaLangString);        local.setPreciseType();        // String constants trivially non-null        OPT_RegisterOperand guard = child.makeNullCheckGuard(local.register);        OPT_BC2IR.setGuard(local, guard);        child.prologue.appendInstruction(Move.create(GUARD_MOVE,                                                      guard.copyRO(),                                                      new OPT_TrueGuardOperand()));      } else {        OPT_OptimizingCompilerException.UNREACHABLE("Unexpected receiver operand");      }      OPT_Instruction s = Move.create(REF_MOVE, local, receiver);      s.bcIndex = PROLOGUE_BCI;      s.position = callSite.position;      child.prologue.appendInstruction(s);    }    for (int paramIdx = 0; paramIdx<numParams; paramIdx++, argIdx++) {      VM_TypeReference argType = params[paramIdx];      OPT_RegisterOperand formal;      OPT_Operand actual = child.arguments[argIdx];      if (actual.isRegister()) {        OPT_RegisterOperand rActual = actual.asRegister();        if (OPT_ClassLoaderProxy.includesType(argType, rActual.type) != YES) {          // narrow type of actual to match formal static type implied by method          rActual.type = argType;          rActual.clearPreciseType(); // Can be precise but not           // assignable if enough classes aren't loaded          rActual.setDeclaredType();        }        formal = child.makeLocal(localNum++, rActual);        child.arguments[argIdx] = formal;  // Avoid confusion in BC2IR of         // callee when arg is a local in the caller.      } else {        formal = child.makeLocal(localNum++, argType);      }      OPT_Instruction s =         Move.create(OPT_IRTools.getMoveOp(argType), formal, actual);      s.bcIndex = PROLOGUE_BCI;      s.position = callSite.position;      child.prologue.appendInstruction(s);      if (argType.isLongType() || argType.isDoubleType()) {        localNum++; // longs and doubles take two local words      }    }    child.completePrologue(false);    child.completeEpilogue(false);    child.completeExceptionHandlers(false);    return child;  }