class InlineVariables extends java.lang.Object implements CompilerPass
CrossModuleCodeMotion
Modifier and Type | Class and Description |
---|---|
private static class |
InlineVariables.AliasCandidate |
private static class |
InlineVariables.IdentifyConstants
Filters variables declared as "constant", and declares them in the outer
declaredConstants map.
|
private static class |
InlineVariables.IdentifyLocals
Filters non-global variables.
|
private class |
InlineVariables.InliningBehavior
Builds up information about nodes in each scope.
|
(package private) static class |
InlineVariables.Mode |
Modifier and Type | Field and Description |
---|---|
private AbstractCompiler |
compiler |
private InlineVariables.IdentifyConstants |
identifyConstants |
private boolean |
inlineAllStrings |
private InlineVariables.Mode |
mode |
Constructor and Description |
---|
InlineVariables(AbstractCompiler compiler,
InlineVariables.Mode mode,
boolean inlineAllStrings) |
Modifier and Type | Method and Description |
---|---|
private com.google.common.base.Predicate<Var> |
getFilterForMode() |
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
private final AbstractCompiler compiler
private final InlineVariables.Mode mode
private final boolean inlineAllStrings
private final InlineVariables.IdentifyConstants identifyConstants
InlineVariables(AbstractCompiler compiler, InlineVariables.Mode mode, boolean inlineAllStrings)
public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treeprivate com.google.common.base.Predicate<Var> getFilterForMode()