/** * 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; }
/** * 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; }