public class JsStaticEval extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JsStaticEval.FindBreakContinueStatementsVisitor
Examines code to find out whether it contains any break or continue
statements.
|
Constructor and Description |
---|
JsStaticEval(JsProgram program) |
Modifier and Type | Method and Description |
---|---|
static OptimizerStats |
exec(JsProgram program) |
OptimizerStats |
execImpl() |
protected static JsExpression |
shortCircuitAnd(JsBinaryOperation expr)
Simplify short circuit AND expressions.
|
protected static JsExpression |
shortCircuitOr(JsBinaryOperation expr)
Simplify short circuit OR expressions.
|
protected static JsExpression |
trySimplifyComma(JsBinaryOperation expr) |
public JsStaticEval(JsProgram program)
public static OptimizerStats exec(JsProgram program)
protected static JsExpression shortCircuitAnd(JsBinaryOperation expr)
if (true && isWhatever()) -> if (isWhatever()), unless side effects if (false() && isWhatever()) -> if (false())
protected static JsExpression shortCircuitOr(JsBinaryOperation expr)
if (true() || isWhatever()) -> if (true()) if (false || isWhatever()) -> if (isWhatever()), unless side effects
protected static JsExpression trySimplifyComma(JsBinaryOperation expr)
public OptimizerStats execImpl()
Copyright © 2018. All rights reserved.