|
||||||||||
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
Field Summary | |
protected Type |
type
|
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject |
dummySource, parent, sourceLocation |
Constructor Summary | |
Expr()
|
|
Expr(SourceLocation location)
|
Method Summary | |
void |
assertType(Type type)
|
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. |
void |
checkSpec()
|
void |
cleanup()
|
protected abstract Type |
discoverType()
|
java.lang.String |
getDefaultDisplayName()
|
Type |
getType()
|
boolean |
isAssignableTo(Type type)
Normally this is a type consideration, but this is overridden by IntLiteralExpr to handle JLS 5.2's requirement that
some int literals are assignable to byte, short, and char
variables. |
boolean |
isConstantFalse()
is this expression the boolean literal value false? |
boolean |
isConstantTrue()
is this expression the boolean literal value true? |
boolean |
isConstantZero()
is this expression zero or null? |
boolean |
isInConstructorCallExpr()
is this an expression in a super or this constructor call? |
boolean |
isInExprStmt()
|
boolean |
isLegalStmt()
|
boolean |
isMethodConvertableTo(Type type)
Method invocation conversion, JLS 5.3, is the same as assignment conversion without the numeric narrowing conversion. |
boolean |
isUltimatelyLiteral()
Is this expression ultimately a literal expression. |
protected Expr |
makeQualifiedThis(Type declaringType)
|
Expr |
makeReference()
When called for the first time will return an expression that may involve computation and state changes. |
ASTObject |
postCopy(CopyWalker walker,
ASTObject oldObject)
|
void |
setType(Type type)
|
void |
showOperatorTypeError(java.lang.String op,
Type a)
|
void |
showOperatorTypeError(java.lang.String op,
Type a,
Type b)
|
void |
walkCleanup(org.aspectj.compiler.base.ByteCodeCleanupPass w)
|
void |
walkFrameLoc(org.aspectj.compiler.base.FrameLocPass walker)
|
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 Type type
Constructor Detail |
public Expr(SourceLocation location)
public Expr()
Method Detail |
public boolean isInConstructorCallExpr()
public boolean isConstantZero()
public boolean isConstantTrue()
public boolean isConstantFalse()
public boolean isAssignableTo(Type type)
IntLiteralExpr
to handle JLS 5.2's requirement that
some int literals are assignable to byte, short, and char
variables.
public final boolean isMethodConvertableTo(Type type)
Type.isAssignableFrom(org.aspectj.compiler.base.ast.Type)
method.
public boolean isLegalStmt()
public ASTObject postCopy(CopyWalker walker, ASTObject oldObject)
postCopy
in class ASTObject
protected Expr makeQualifiedThis(Type declaringType)
public boolean isInExprStmt()
public void checkSpec()
checkSpec
in class ASTObject
public void assertType(Type type)
public Type getType()
public void setType(Type type)
public void showOperatorTypeError(java.lang.String op, Type a, Type b)
public void showOperatorTypeError(java.lang.String op, Type a)
public Expr makeReference()
public boolean canBeCopied()
public boolean isUltimatelyLiteral()
protected abstract Type discoverType()
public void cleanup()
cleanup
in class ASTObject
public void walkCleanup(org.aspectj.compiler.base.ByteCodeCleanupPass w)
walkCleanup
in class ASTObject
protected void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
cgTest(CodeBuilder, Label, Label)
.
protected void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb, Type castTo)
cgValue(CodeBuilder)
.
protected void cgEffect(org.aspectj.compiler.base.bcg.CodeBuilder cb)
ExprStmt
, or in a FieldAccessExpr
when the field is static but there is an
expression there nonetheless). May self-call cgValue(CodeBuilder)
.
protected void cgBuffer(org.aspectj.compiler.base.bcg.CodeBuilder cb)
StringBuffer
object. The value of
this expression is then appended into the StringBuffer. This
is used in evaluating the String + operator. May self-call
cgValue(CodeBuilder)
.
protected void cgTest(org.aspectj.compiler.base.bcg.CodeBuilder cb, org.aspectj.compiler.base.bcg.Label tdest, org.aspectj.compiler.base.bcg.Label fdest)
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 cgValue(CodeBuilder)
.
public void walkFrameLoc(org.aspectj.compiler.base.FrameLocPass walker)
walkFrameLoc
in class ASTObject
public java.lang.String getDefaultDisplayName()
getDefaultDisplayName
in class ASTObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |