Skip to content

Commit

Permalink
Automated g4 rollback of changelist 124589083.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

It increases the running time of JSCompiler and causes timeout sometimes.

*** Original change description ***

Run a pure function identifier in the main optimization loop when j2clpass is enabled. This allows functions to become pure as clinits get pruned.

***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124892927
  • Loading branch information
nanj01 authored and blickly committed Jun 15, 2016
1 parent a593a49 commit 3f847c9
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/com/google/javascript/jscomp/DefaultPassConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,6 @@ private List<PassFactory> getCodeRemovingPasses() {
passes.add(j2clClinitPrunerPass);
passes.add(j2clConstantHoisterPass);
passes.add(j2clEqualitySameRewriterPass);
passes.add(j2clMarkPureFunctions);
}

assertAllLoopablePasses(passes);
Expand Down Expand Up @@ -2738,19 +2737,6 @@ protected CompilerPass create(AbstractCompiler compiler) {
}
};

/**
* A loopable pure function identifier pass. Run in the main
* loop so functions can become pure after removing clinits.
*/
private final PassFactory j2clMarkPureFunctions =
new PassFactory("markPureFunctions", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new PureFunctionIdentifier.Driver(
compiler, options.debugFunctionSideEffectsPath, false);
}
};

/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clPass =
new PassFactory("j2clPass", true) {
Expand Down

0 comments on commit 3f847c9

Please sign in to comment.