private class NameAnalyzer.FindReferences.NodeAccumulator extends java.lang.Object implements GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
Modifier | Constructor and Description |
---|---|
private |
NodeAccumulator() |
Modifier and Type | Method and Description |
---|---|
boolean |
classDefiningCallsHaveSideEffects()
Returns true if the "mixin" and "inherits" function calls
should be treated as if they had side effects.
|
void |
keepSimplifiedHookExpression(Node hook,
boolean thenHasSideEffects,
boolean elseHasSideEffects)
Simplifies a subtree whose root node is a HOOK expression
and adds the resulting subtree to the list of nodes that have
side effects.
|
void |
keepSimplifiedShortCircuitExpression(Node original)
Simplifies a subtree whose root node is an AND or OR expression
and adds the resulting subtree to the list of nodes that have
side effects.
|
void |
keepSubTree(Node original)
Adds subtree to the list of nodes that have side effects.
|
public boolean classDefiningCallsHaveSideEffects()
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
classDefiningCallsHaveSideEffects
in interface GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
public void keepSubTree(Node original)
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
keepSubTree
in interface GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
original
- - root of the tree.public void keepSimplifiedShortCircuitExpression(Node original)
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
keepSimplifiedShortCircuitExpression
in interface GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
original
- - root of the and/or expression.public void keepSimplifiedHookExpression(Node hook, boolean thenHasSideEffects, boolean elseHasSideEffects)
GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
keepSimplifiedHookExpression
in interface GatherSideEffectSubexpressionsCallback.SideEffectAccumulator
hook
- - root of the hook expression.thenHasSideEffects
- - then branch has side effectselseHasSideEffects
- - else branch has side effects