Skip to content

Commit

Permalink
Make sure bookkeeping passes are still run when skipNonTranspilationP…
Browse files Browse the repository at this point in the history
…asses is true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129923091
  • Loading branch information
Dominator008 authored and blickly committed Aug 10, 2016
1 parent 8f49da2 commit 99a1c89
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/com/google/javascript/jscomp/Compiler.java
Expand Up @@ -736,18 +736,17 @@ private void compileInternal() {
// i.e. whitespace-only mode, which will not work with goog.module without: // i.e. whitespace-only mode, which will not work with goog.module without:
whitespaceOnlyPasses(); whitespaceOnlyPasses();
if (options.lowerFromEs6()) { if (options.lowerFromEs6()) {
transpile(); transpileAndDontCheck();
}
} else {
check(); // check() also includes transpilation
if (hasErrors()) {
return;
} }
return;
}

check();
if (hasErrors()) {
return;
}


if (!options.checksOnly && !options.shouldGenerateTypedExterns()) { if (!options.checksOnly && !options.shouldGenerateTypedExterns()) {
optimize(); optimize();
}
} }


if (options.recordFunctionInformation) { if (options.recordFunctionInformation) {
Expand Down Expand Up @@ -820,7 +819,7 @@ public void whitespaceOnlyPasses() {
} }
} }


public void transpile() { public void transpileAndDontCheck() {
Tracer t = newTracer("runTranspileOnlyPasses"); Tracer t = newTracer("runTranspileOnlyPasses");
try { try {
for (PassFactory pf : getPassConfig().getTranspileOnlyPasses()) { for (PassFactory pf : getPassConfig().getTranspileOnlyPasses()) {
Expand Down

0 comments on commit 99a1c89

Please sign in to comment.