public class J2clEqualitySameRewriterPass
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
protected boolean |
areDeclaredGlobalExternsOnWindow() |
protected boolean |
areNodesEqualForInlining(Node n1,
Node n2)
Are the nodes equal for the purpose of inlining?
If type aware optimizations are on, type equality is checked.
|
protected void |
deleteNode(Node property)
|
protected CodingConvention |
getCodingConvention()
Returns the current coding convention.
|
protected boolean |
isASTNormalized()
Is the current AST normalized? (e.g.
|
protected boolean |
isEcmaScript5OrGreater()
Returns whether the output language is ECMAScript 5 or later.
|
protected void |
markFunctionsDeleted(Node function)
|
protected void |
markNewScopesChanged(Node n)
|
protected boolean |
mayEffectMutableState(Node n)
Returns whether the node may create new mutable state, or change existing state.
|
protected boolean |
mayHaveSideEffects(Node n)
Returns whether the node may have side effects when executed.
|
protected boolean |
nodeTypeMayHaveSideEffects(Node n)
Returns true if the current node's type implies side effects.
|
protected void |
report(DiagnosticType diagnostic,
Node n)
Helper method for reporting an error to the compiler when applying a
peephole optimization.
|
protected void |
reportChangeToEnclosingScope(Node n) |
protected void report(DiagnosticType diagnostic, Node n)
diagnostic
- The error typen
- The node for which the error should be reportedprotected boolean areNodesEqualForInlining(Node n1, Node n2)
protected boolean isASTNormalized()
protected boolean mayEffectMutableState(Node n)
protected boolean mayHaveSideEffects(Node n)
protected boolean nodeTypeMayHaveSideEffects(Node n)
This is a non-recursive version of the may have side effects check; used to check wherever the current node's type is one of the reason's why a subtree has side effects.
protected boolean isEcmaScript5OrGreater()
protected CodingConvention getCodingConvention()
protected final boolean areDeclaredGlobalExternsOnWindow()
protected final void reportChangeToEnclosingScope(Node n)
protected final void deleteNode(Node property)
protected final void markFunctionsDeleted(Node function)
protected final void markNewScopesChanged(Node n)
Copyright © 2009-2019 Google. All Rights Reserved.