|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aspectj.compiler.base.CompilerObject
org.aspectj.compiler.base.ast.ASTObject
org.aspectj.compiler.base.ast.Expr
org.aspectj.compiler.base.ast.ParenExpr
Field Summary | |
protected Expr |
expr
|
Fields inherited from class org.aspectj.compiler.base.ast.Expr |
type |
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject |
dummySource, parent, sourceLocation |
Constructor Summary | |
protected |
ParenExpr(SourceLocation source)
|
|
ParenExpr(SourceLocation location,
Expr _expr)
|
Method Summary | |
protected void |
bindNamesSelf()
|
boolean |
canBeCopied()
Can this expression be copied without changing the semantics of the program. |
protected void |
cgBuffer(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Evaluates the expression in a context where the top of the stack contains a StringBuffer object. |
protected void |
cgEffect(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Evaluates the expression in a context where its value is unnecessary (i.e., from ExprStmt , or in a FieldAccessExpr when the field is static but there is an
expression there nonetheless). |
protected void |
cgTest(org.aspectj.compiler.base.bcg.CodeBuilder cb,
org.aspectj.compiler.base.bcg.Label tdest,
org.aspectj.compiler.base.bcg.Label fdest)
Evaluates the expression in a context where its value will only be used to branch (from IfStmt , TriTestExpr , WhileStmt , DoStmt , and ForStmt ). |
protected void |
cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Leaves the value of this expression on the stack. |
protected void |
cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb,
Type castTo)
Leaves the value of this expression on the stack and casts the value to castTo. |
ASTObject |
copyWalk(CopyWalker walker)
|
protected Type |
discoverType()
|
ASTObject |
getChildAt(int childIndex)
|
int |
getChildCount()
|
java.lang.String |
getChildNameAt(int childIndex)
|
java.lang.String |
getDefaultDisplayName()
|
Expr |
getExpr()
|
boolean |
isUltimatelyLiteral()
Is this expression ultimately a literal expression. |
Expr |
makeReference()
When called for the first time will return an expression that may involve computation and state changes. |
ASTObject |
postAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
|
void |
setChildAt(int childIndex,
ASTObject child)
|
void |
setExpr(Expr _expr)
|
void |
unparse(org.aspectj.compiler.base.CodeWriter writer)
|
Methods inherited from class org.aspectj.compiler.base.ast.Expr |
assertType, checkSpec, cleanup, getType, isAssignableTo, isConstantFalse, isConstantTrue, isConstantZero, isInConstructorCallExpr, isInExprStmt, isLegalStmt, isMethodConvertableTo, makeQualifiedThis, postCopy, setType, showOperatorTypeError, showOperatorTypeError, walkCleanup, walkFrameLoc |
Methods inherited from class org.aspectj.compiler.base.CompilerObject |
getCompiler, getOptions, getTypeManager, getWorld |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Expr expr
Constructor Detail |
public ParenExpr(SourceLocation location, Expr _expr)
protected ParenExpr(SourceLocation source)
Method Detail |
protected void bindNamesSelf()
protected Type discoverType()
discoverType
in class Expr
public Expr makeReference()
Expr
makeReference
in class Expr
public boolean canBeCopied()
Expr
canBeCopied
in class Expr
public boolean isUltimatelyLiteral()
Expr
isUltimatelyLiteral
in class Expr
public void unparse(org.aspectj.compiler.base.CodeWriter writer)
unparse
in class ASTObject
public ASTObject postAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
postAssignmentCheck
in class ASTObject
protected void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Expr
Expr.cgTest(CodeBuilder, Label, Label)
.
cgValue
in class Expr
protected void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb, Type castTo)
Expr
Expr.cgValue(CodeBuilder)
.
cgValue
in class Expr
protected void cgEffect(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Expr
ExprStmt
, or in a FieldAccessExpr
when the field is static but there is an
expression there nonetheless). May self-call Expr.cgValue(CodeBuilder)
.
cgEffect
in class Expr
protected void cgBuffer(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Expr
StringBuffer
object. The value of
this expression is then appended into the StringBuffer. This
is used in evaluating the String + operator. May self-call
Expr.cgValue(CodeBuilder)
.
cgBuffer
in class Expr
protected void cgTest(org.aspectj.compiler.base.bcg.CodeBuilder cb, org.aspectj.compiler.base.bcg.Label tdest, org.aspectj.compiler.base.bcg.Label fdest)
Expr
IfStmt
, TriTestExpr
, WhileStmt
, DoStmt
, and ForStmt
). The expression, of course, will have boolean type.
By default, this evaluates the expression to the stack and
then emits an EQ/NE branch bytecode, but many expressions such
as tests in BinopExpr
will be able to do much better.
May self-call Expr.cgValue(CodeBuilder)
.
cgTest
in class Expr
public Expr getExpr()
public void setExpr(Expr _expr)
public ASTObject copyWalk(CopyWalker walker)
copyWalk
in class ASTObject
public ASTObject getChildAt(int childIndex)
getChildAt
in class ASTObject
public java.lang.String getChildNameAt(int childIndex)
getChildNameAt
in class ASTObject
public void setChildAt(int childIndex, ASTObject child)
setChildAt
in class ASTObject
public int getChildCount()
getChildCount
in class ASTObject
public java.lang.String getDefaultDisplayName()
getDefaultDisplayName
in class Expr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |