private class FlowSensitiveInlineVariables.GatherCandiates extends NodeTraversal.AbstractShallowCallback
MustBeReachingVariableDef
. The list will be stored
in candidates
and the validity of each inlining Candidate should
be later verified with FlowSensitiveInlineVariables.Candidate.canInline(Scope)
when
MaybeReachingVariableUse
has been performed.Modifier | Constructor and Description |
---|---|
private |
GatherCandiates() |
Modifier and Type | Method and Description |
---|---|
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
shouldTraverse
public void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.Callback
Visits a node in postorder (after its children have been visited).
A node is visited only if all its parents should be traversed
(NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)
).
Implementations can have side effects (e.g. modifying the parse tree).