Search in sources :

Example 1 with HotSwapCompilerPass

use of com.google.javascript.jscomp.HotSwapCompilerPass in project ow by vtst.

the class CompilerRun method processCustomPassesOnNewScript.

private void processCustomPassesOnNewScript(JsAst ast) {
    if (!keepCompilationResultsInMemory)
        return;
    if (options.customPasses == null)
        return;
    Node scriptRoot = ast.getAstRoot(compiler);
    Node originalRoot = compiler.getRoot();
    for (CompilerPass pass : options.customPasses.get(CustomPassExecutionTime.BEFORE_CHECKS)) {
        if (pass instanceof HotSwapCompilerPass) {
            ((HotSwapCompilerPass) pass).hotSwapScript(scriptRoot, originalRoot);
        }
    }
}
Also used : Node(com.google.javascript.rhino.Node) HotSwapCompilerPass(com.google.javascript.jscomp.HotSwapCompilerPass) CompilerPass(com.google.javascript.jscomp.CompilerPass) HotSwapCompilerPass(com.google.javascript.jscomp.HotSwapCompilerPass)

Aggregations

CompilerPass (com.google.javascript.jscomp.CompilerPass)1 HotSwapCompilerPass (com.google.javascript.jscomp.HotSwapCompilerPass)1 Node (com.google.javascript.rhino.Node)1