org.aspectj.compiler.base.ast
Class AssignableExpr

java.lang.Object
  extended byorg.aspectj.compiler.base.CompilerObject
      extended byorg.aspectj.compiler.base.ast.ASTObject
          extended byorg.aspectj.compiler.base.ast.Expr
              extended byorg.aspectj.compiler.base.ast.JavaExpr
                  extended byorg.aspectj.compiler.base.ast.AssignableExpr
Direct Known Subclasses:
ArrayExpr, FieldAccessExpr, VarExpr

public abstract class AssignableExpr
extends JavaExpr


Field Summary
 
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
AssignableExpr(SourceLocation location)
           
 
Method Summary
protected abstract  void cgAssignment(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generate code to actually assign into this assignable.
protected abstract  void cgDupLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generates code to duplicate the top lvalue on the stack.
protected abstract  void cgDupRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generates code to duplicate the top rvalue on the stack and places it BELOW the lvalue that may be just below it.
protected abstract  void cgLtoRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generate code to remove the lvalue at the top of the stack (if any) and place the appropriate rvalue on the stack.
protected abstract  void cgLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generate code to place the lvalue of this expression on the top of the stack.
protected  void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Leaves the value of this expression on the stack.
 java.lang.String getDefaultDisplayName()
           
protected  boolean isIncable()
          Is this an expression that we can generate an IINC code for? That is, a VarExpr to a variable of type int with an index that will fit in one byte?
 boolean isLhs()
           
 
Methods inherited from class org.aspectj.compiler.base.ast.Expr
assertType, canBeCopied, cgBuffer, cgEffect, cgTest, cgValue, checkSpec, cleanup, discoverType, getType, isAssignableTo, isConstantFalse, isConstantTrue, isConstantZero, isInConstructorCallExpr, isInExprStmt, isLegalStmt, isMethodConvertableTo, isUltimatelyLiteral, makeQualifiedThis, makeReference, postCopy, setType, showOperatorTypeError, showOperatorTypeError, walkCleanup, walkFrameLoc
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, buildAccessMethod, checkNoSharing, clearComment, clearParent, contains, containsTypes, copy, copyWalk, display, fixAccessPost, fixAST, fromSource, getAST, getBeginColumn, getBeginLine, getBytecodeType, getBytecodeTypeDec, getChildAt, getChildCount, getChildNameAt, getComment, getCompilationUnit, getDeclaringType, getEnclosingCodeDec, getEnclosingDec, getEndColumn, getEndLine, getEndPosition, getFormalComment, getLexicalType, getOutermostBytecodeType, getOutermostLexicalType, getParent, getSourceDirectoryName, getSourceFile, getSourceFileName, getSourceLocation, getStartPosition, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, inStaticContext, isLanguageVisible, isLeaf, isSynthetic, makeChild, makeChild, postAssignmentCheck, postCleanup, postFixAST, postImplementMixin, postInnerAccess, postInnerInfo, postLift, postMove, postScope, postThreading, preAssignmentCheck, preCopy, preIntroduction, preLift, preMove, preScope, preThreading, remove, remove, removeChildAt, replaceWith, setChildAt, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toShortString, toString, unparse, unparse, walk, walkAnalysis, walkAssignmentCheck, walkFlow, walkForwardReference, walkInnerInfo, walkMemberMunger, walkScope
 
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
 

Constructor Detail

AssignableExpr

public AssignableExpr(SourceLocation location)
Method Detail

isLhs

public boolean isLhs()

cgValue

protected void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: Expr
Leaves the value of this expression on the stack. May self-call Expr.cgTest(CodeBuilder, Label, Label).

Overrides:
cgValue in class Expr

cgLvalue

protected abstract void cgLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Generate code to place the lvalue of this expression on the top of the stack. Only assignable expressions have lvalues. Some assignable expressions (such as static field access expressions) do not have lvalues, and for them this method is a noop.


cgLtoRvalue

protected abstract void cgLtoRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Generate code to remove the lvalue at the top of the stack (if any) and place the appropriate rvalue on the stack. Assumes that said lvalue was generated by this expression.


cgAssignment

protected abstract void cgAssignment(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Generate code to actually assign into this assignable. Assumes that the new rvalue is at the top of the stack, and that this expression's lvalue (if any) is just below it.


cgDupLvalue

protected abstract void cgDupLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Generates code to duplicate the top lvalue on the stack. Assumes that said lvalue on the stack was generated by this expression.


cgDupRvalue

protected abstract void cgDupRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Generates code to duplicate the top rvalue on the stack and places it BELOW the lvalue that may be just below it. Assumes that said lvalue and rvalue on the stack were generated by this expression.


isIncable

protected boolean isIncable()
Is this an expression that we can generate an IINC code for? That is, a VarExpr to a variable of type int with an index that will fit in one byte?


getDefaultDisplayName

public java.lang.String getDefaultDisplayName()
Overrides:
getDefaultDisplayName in class Expr