|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.jscomp.PeepholeFoldConstants
public class PeepholeFoldConstants
Peephole optimization to fold constants (e.g. x + 1 + 7 --> x + 8).
Constructor Summary | |
---|---|
PeepholeFoldConstants()
|
Method Summary | |
---|---|
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 |
error(DiagnosticType diagnostic,
Node n)
Helper method for reporting an error to the compiler when applying a peephole optimization. |
protected boolean |
isASTNormalized()
Is the current AST normalized? (e.g. |
protected void |
reportCodeChange()
Helper method for telling the compiler that something has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeepholeFoldConstants()
Method Detail |
---|
protected void error(DiagnosticType diagnostic, Node n)
diagnostic
- The error typen
- The node for which the error should be reportedprotected void reportCodeChange()
protected boolean areNodesEqualForInlining(Node n1, Node n2)
protected boolean isASTNormalized()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |