private static class SideEffectsAnalysis.VariableUseDeclarationMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private AbstractCompiler |
compiler |
private java.util.Map<Node,Node> |
referencesByNameNode |
Constructor and Description |
---|
VariableUseDeclarationMap(AbstractCompiler compiler) |
Modifier and Type | Method and Description |
---|---|
Node |
findDeclaringNameNodeForUse(Node usingNameNode)
Returns the NAME node for the declaration of the variable
that
usingNameNode refers to, if it is in the map,
or null otherwise. |
void |
mapUses(Node root)
Adds a map from each use NAME in
root to its corresponding
declaring name, *provided the declaration is also under root*. |
private AbstractCompiler compiler
public VariableUseDeclarationMap(AbstractCompiler compiler)
public void mapUses(Node root)
root
to its corresponding
declaring name, *provided the declaration is also under root*.
If the declaration is not under root, then the reference will
not be added to the map.