| java.lang.Object com.google.gwt.dev.jjs.ast.JVisitor com.google.gwt.dev.jjs.impl.ExpressionAnalyzer
ExpressionAnalyzer | public class ExpressionAnalyzer extends JVisitor (Code) | | Analyzes an expression and make a number of static analysis flags available
based on the information available solely through the expression.
TODO: make this even smarter when we have real null analysis.
|
Method Summary | |
public boolean | accessesField() | public boolean | accessesLocal() | public boolean | accessesParameter() | public boolean | canThrowException() | public boolean | createsObject() | public void | endVisit(JArrayRef x, Context ctx) | public void | endVisit(JBinaryOperation x, Context ctx) | public void | endVisit(JCastOperation x, Context ctx) | public void | endVisit(JFieldRef x, Context ctx) | public void | endVisit(JLocalRef x, Context ctx) | public void | endVisit(JMethodCall x, Context ctx) | public void | endVisit(JNewArray x, Context ctx) | public void | endVisit(JNewInstance x, Context ctx) | public void | endVisit(JParameterRef x, Context ctx) | public void | endVisit(JPostfixOperation x, Context ctx) | public void | endVisit(JPrefixOperation x, Context ctx) | public boolean | hasAssignment() | public boolean | hasAssignmentToField() | public boolean | hasAssignmentToLocal() | public boolean | hasAssignmentToParameter() | protected boolean | isInConditional() Determined if the current expression conditionally executes, based on its
parent expressions. | public boolean | visit(JBinaryOperation x, Context ctx) | public boolean | visit(JConditional x, Context ctx) |
accessesField | public boolean accessesField()(Code) | | Does this expression read or write fields within the scope of the
expression?
|
accessesLocal | public boolean accessesLocal()(Code) | | Does this expression read or write locals within the scope of the
expression?
|
accessesParameter | public boolean accessesParameter()(Code) | | Does this expression read or write parameters within the scope of the
expression?
|
canThrowException | public boolean canThrowException()(Code) | | |
createsObject | public boolean createsObject()(Code) | | |
hasAssignment | public boolean hasAssignment()(Code) | | Does this expression make assignments to variables within the scope of the
expression?
|
hasAssignmentToField | public boolean hasAssignmentToField()(Code) | | Does this expression make assignments to fields within the scope of the
expression?
|
hasAssignmentToLocal | public boolean hasAssignmentToLocal()(Code) | | Does this expression make assignments to locals within the scope of the
expression?
|
hasAssignmentToParameter | public boolean hasAssignmentToParameter()(Code) | | Does this expression make assignments to parameters within the scope of the
expression?
|
isInConditional | protected boolean isInConditional()(Code) | | Determined if the current expression conditionally executes, based on its
parent expressions.
|
Fields inherited from com.google.gwt.dev.jjs.ast.JVisitor | final protected static Context UNMODIFIABLE_CONTEXT(Code)(Java Doc)
|
Methods inherited from com.google.gwt.dev.jjs.ast.JVisitor | final public JExpression accept(JExpression node)(Code)(Java Doc) final public JNode accept(JNode node)(Code)(Java Doc) final public JStatement accept(JStatement node)(Code)(Java Doc) final public void accept(List list)(Code)(Java Doc) final public void acceptWithInsertRemove(List list)(Code)(Java Doc) public boolean didChange()(Code)(Java Doc) protected JNode doAccept(JNode node)(Code)(Java Doc) protected void doAccept(List list)(Code)(Java Doc) protected void doAcceptWithInsertRemove(List list)(Code)(Java Doc) final protected void doTraverse(JNode node, Context ctx)(Code)(Java Doc) public void endVisit(JAbsentArrayDimension x, Context ctx)(Code)(Java Doc) public void endVisit(JArrayRef x, Context ctx)(Code)(Java Doc) public void endVisit(JArrayType x, Context ctx)(Code)(Java Doc) public void endVisit(JAssertStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JBinaryOperation x, Context ctx)(Code)(Java Doc) public void endVisit(JBlock x, Context ctx)(Code)(Java Doc) public void endVisit(JBooleanLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JBreakStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JCaseStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JCastOperation x, Context ctx)(Code)(Java Doc) public void endVisit(JCharLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JClassLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JClassSeed x, Context ctx)(Code)(Java Doc) public void endVisit(JClassType x, Context ctx)(Code)(Java Doc) public void endVisit(JConditional x, Context ctx)(Code)(Java Doc) public void endVisit(JContinueStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JDoStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JDoubleLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JExpressionStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JField x, Context ctx)(Code)(Java Doc) public void endVisit(JFieldRef x, Context ctx)(Code)(Java Doc) public void endVisit(JFloatLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JForStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JIfStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JInstanceOf x, Context ctx)(Code)(Java Doc) public void endVisit(JInterfaceType x, Context ctx)(Code)(Java Doc) public void endVisit(JIntLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JLabel x, Context ctx)(Code)(Java Doc) public void endVisit(JLabeledStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JLocal x, Context ctx)(Code)(Java Doc) public void endVisit(JLocalDeclarationStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JLocalRef x, Context ctx)(Code)(Java Doc) public void endVisit(JLongLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JMethod x, Context ctx)(Code)(Java Doc) public void endVisit(JMethodBody x, Context ctx)(Code)(Java Doc) public void endVisit(JMethodCall x, Context ctx)(Code)(Java Doc) public void endVisit(JMultiExpression x, Context ctx)(Code)(Java Doc) public void endVisit(JNewArray x, Context ctx)(Code)(Java Doc) public void endVisit(JNewInstance x, Context ctx)(Code)(Java Doc) public void endVisit(JNullLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JNullType x, Context ctx)(Code)(Java Doc) public void endVisit(JParameter x, Context ctx)(Code)(Java Doc) public void endVisit(JParameterRef x, Context ctx)(Code)(Java Doc) public void endVisit(JPostfixOperation x, Context ctx)(Code)(Java Doc) public void endVisit(JPrefixOperation x, Context ctx)(Code)(Java Doc) public void endVisit(JPrimitiveType x, Context ctx)(Code)(Java Doc) public void endVisit(JProgram x, Context ctx)(Code)(Java Doc) public void endVisit(JReturnStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JsniFieldRef x, Context ctx)(Code)(Java Doc) public void endVisit(JsniMethodBody x, Context ctx)(Code)(Java Doc) public void endVisit(JsniMethodRef x, Context ctx)(Code)(Java Doc) public void endVisit(JsonArray x, Context ctx)(Code)(Java Doc) public void endVisit(JsonObject x, Context ctx)(Code)(Java Doc) public void endVisit(JsonPropInit x, Context ctx)(Code)(Java Doc) public void endVisit(JStringLiteral x, Context ctx)(Code)(Java Doc) public void endVisit(JSwitchStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JThisRef x, Context ctx)(Code)(Java Doc) public void endVisit(JThrowStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JTryStatement x, Context ctx)(Code)(Java Doc) public void endVisit(JWhileStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JAbsentArrayDimension x, Context ctx)(Code)(Java Doc) public boolean visit(JArrayRef x, Context ctx)(Code)(Java Doc) public boolean visit(JArrayType x, Context ctx)(Code)(Java Doc) public boolean visit(JAssertStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JBinaryOperation x, Context ctx)(Code)(Java Doc) public boolean visit(JBlock x, Context ctx)(Code)(Java Doc) public boolean visit(JBooleanLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JBreakStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JCaseStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JCastOperation x, Context ctx)(Code)(Java Doc) public boolean visit(JCharLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JClassLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JClassSeed x, Context ctx)(Code)(Java Doc) public boolean visit(JClassType x, Context ctx)(Code)(Java Doc) public boolean visit(JConditional x, Context ctx)(Code)(Java Doc) public boolean visit(JContinueStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JDoStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JDoubleLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JExpressionStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JField x, Context ctx)(Code)(Java Doc) public boolean visit(JFieldRef x, Context ctx)(Code)(Java Doc) public boolean visit(JFloatLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JForStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JIfStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JInstanceOf x, Context ctx)(Code)(Java Doc) public boolean visit(JInterfaceType x, Context ctx)(Code)(Java Doc) public boolean visit(JIntLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JLabel x, Context ctx)(Code)(Java Doc) public boolean visit(JLabeledStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JLocal x, Context ctx)(Code)(Java Doc) public boolean visit(JLocalDeclarationStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JLocalRef x, Context ctx)(Code)(Java Doc) public boolean visit(JLongLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JMethod x, Context ctx)(Code)(Java Doc) public boolean visit(JMethodBody x, Context ctx)(Code)(Java Doc) public boolean visit(JMethodCall x, Context ctx)(Code)(Java Doc) public boolean visit(JMultiExpression x, Context ctx)(Code)(Java Doc) public boolean visit(JNewArray x, Context ctx)(Code)(Java Doc) public boolean visit(JNewInstance x, Context ctx)(Code)(Java Doc) public boolean visit(JNullLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JNullType x, Context ctx)(Code)(Java Doc) public boolean visit(JParameter x, Context ctx)(Code)(Java Doc) public boolean visit(JParameterRef x, Context ctx)(Code)(Java Doc) public boolean visit(JPostfixOperation x, Context ctx)(Code)(Java Doc) public boolean visit(JPrefixOperation x, Context ctx)(Code)(Java Doc) public boolean visit(JPrimitiveType x, Context ctx)(Code)(Java Doc) public boolean visit(JProgram x, Context ctx)(Code)(Java Doc) public boolean visit(JReturnStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JsniFieldRef x, Context ctx)(Code)(Java Doc) public boolean visit(JsniMethodBody x, Context ctx)(Code)(Java Doc) public boolean visit(JsniMethodRef x, Context ctx)(Code)(Java Doc) public boolean visit(JsonArray x, Context ctx)(Code)(Java Doc) public boolean visit(JsonObject x, Context ctx)(Code)(Java Doc) public boolean visit(JsonPropInit x, Context ctx)(Code)(Java Doc) public boolean visit(JStringLiteral x, Context ctx)(Code)(Java Doc) public boolean visit(JSwitchStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JThisRef x, Context ctx)(Code)(Java Doc) public boolean visit(JThrowStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JTryStatement x, Context ctx)(Code)(Java Doc) public boolean visit(JWhileStatement x, Context ctx)(Code)(Java Doc)
|
|
|