/** * This initializes a more complete(full) InterpreterContext which if used in mixed mode will be * used by the JIT and if used in pure-interpreted mode it will be used by an interpreter engine. */ public synchronized FullInterpreterContext prepareFullBuild() { if (optimizedInterpreterContext != null) return optimizedInterpreterContext; // Don't run if same method was queued up in the tiny race for scheduling JIT/Full Build OR // for any nested closures which got a a fullInterpreterContext but have not run any passes // or generated instructions. if (fullInterpreterContext != null && fullInterpreterContext.buildComplete()) return fullInterpreterContext; for (IRScope scope: getClosures()) { scope.prepareFullBuild(); } prepareFullBuildCommon(); runCompilerPasses(getManager().getCompilerPasses(this), dumpToIGV()); getManager().optimizeIfSimpleScope(this); // Always add call protocol instructions now since we are removing support for implicit stuff in interp. if (!isUnsafeScope()) new AddCallProtocolInstructions().run(this); fullInterpreterContext.generateInstructionsForInterpretation(); return fullInterpreterContext; }
if (!explicitCallProtocolSupported(scope)) return null; BasicBlock prologueBB = createPrologueBlock(cfg); if (requireBinding) fixReturn(scope, (ReturnInstr)i, instrs); popSavedState(scope, bb == geb, requireBinding, requireFrame, savedViz, savedFrame, instrs); if (bb == geb) gebProcessed = true; break; if (requireBinding) fixReturn(scope, (ReturnInstr)i, instrs); instrs.previous(); popSavedState(scope, bb == geb, requireBinding, requireFrame, savedViz, savedFrame, instrs); if (bb == geb) gebProcessed = true; } else if (!gebProcessed && bb == geb) { instrs.previous(); popSavedState(scope, true, requireBinding, requireFrame, savedViz, savedFrame, instrs);
for (IRClosure c: scope.getClosures()) execute(c);
if (!explicitCallProtocolSupported(scope)) return null; BasicBlock prologueBB = createPrologueBlock(cfg); if (requireBinding) fixReturn(scope, (ReturnInstr)i, instrs); popSavedState(scope, bb == geb, requireBinding, requireFrame, savedViz, savedFrame, instrs); if (bb == geb) gebProcessed = true; break; if (requireBinding) fixReturn(scope, (ReturnInstr)i, instrs); instrs.previous(); popSavedState(scope, bb == geb, requireBinding, requireFrame, savedViz, savedFrame, instrs); if (bb == geb) gebProcessed = true; } else if (!gebProcessed && bb == geb) { instrs.previous(); popSavedState(scope, true, requireBinding, requireFrame, savedViz, savedFrame, instrs);
for (IRClosure c: scope.getClosures()) execute(c);
/** * This initializes a more complete(full) InterpreterContext which if used in mixed mode will be * used by the JIT and if used in pure-interpreted mode it will be used by an interpreter engine. */ public synchronized FullInterpreterContext prepareFullBuild() { if (optimizedInterpreterContext != null) return optimizedInterpreterContext; // Don't run if same method was queued up in the tiny race for scheduling JIT/Full Build OR // for any nested closures which got a a fullInterpreterContext but have not run any passes // or generated instructions. if (fullInterpreterContext != null && fullInterpreterContext.buildComplete()) return fullInterpreterContext; for (IRScope scope: getClosures()) { scope.prepareFullBuild(); } prepareFullBuildCommon(); runCompilerPasses(getManager().getCompilerPasses(this), dumpToIGV()); getManager().optimizeIfSimpleScope(this); // Always add call protocol instructions now since we are removing support for implicit stuff in interp. if (!isUnsafeScope()) new AddCallProtocolInstructions().run(this); fullInterpreterContext.generateInstructionsForInterpretation(); return fullInterpreterContext; }