org.aspectj.compiler.base.ast
Class BlockStmt

java.lang.Object
  extended byorg.aspectj.compiler.base.CompilerObject
      extended byorg.aspectj.compiler.base.ast.ASTObject
          extended byorg.aspectj.compiler.base.ast.Stmt
              extended byorg.aspectj.compiler.base.ast.BlockStmt
All Implemented Interfaces:
AspectMember
Direct Known Subclasses:
CodeBody

public class BlockStmt
extends Stmt
implements AspectMember


Field Summary
protected  Stmts stmts
           
protected  Stmts tmpStmts
           
 
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject
dummySource, parent, sourceLocation
 
Constructor Summary
protected BlockStmt(SourceLocation source)
           
  BlockStmt(SourceLocation location, ASTObject node1)
           
  BlockStmt(SourceLocation location, ASTObject node1, ASTObject node2)
           
  BlockStmt(SourceLocation location, ASTObject node1, ASTObject node2, ASTObject node3)
           
  BlockStmt(SourceLocation location, ASTObject node1, ASTObject node2, ASTObject node3, ASTObject node4)
           
  BlockStmt(SourceLocation location, Stmts _stmts)
           
  BlockStmt(SourceLocation location, Stmts _tmpStmts, Stmts _stmts)
           
  BlockStmt(Stmt[] _stmts)
           
  BlockStmt(Stmts _stmts)
           
 
Method Summary
 void addTemporary(VarDec tmp)
           
protected  void cgStmt(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          This procedure does the work of generating bytecode.
 void checkReturnType(Type expectedReturnType)
           
 void cleanup()
           
 ASTObject copyWalk(CopyWalker walker)
           
 ASTObject getChildAt(int childIndex)
           
 int getChildCount()
           
 java.lang.String getChildNameAt(int childIndex)
           
 java.lang.String getDefaultDisplayName()
           
 Stmts getStmts()
           
 Stmts getTmpStmts()
           
 boolean isEmpty()
           
 VarDec makeTemporary(Type type)
           
protected  void makeTempsExplicit()
           
 boolean mustBeLive()
          when the -lenient option is used, we declare that empty block don't have to be live.
 ASTObject postCleanup(org.aspectj.compiler.base.ByteCodeCleanupPass w)
           
 ASTObject postScope(ScopeWalker walker)
           
 void preScope(ScopeWalker walker)
           
 void requireBlockStmt()
           
 void setChildAt(int childIndex, ASTObject child)
           
 void setStmts(Stmts _stmts)
           
 void setTmpStmts(Stmts _tmpStmts)
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 void walkCleanup(org.aspectj.compiler.base.ByteCodeCleanupPass w)
           
 void walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
           
 void walkFrameLoc(org.aspectj.compiler.base.FrameLocPass walker)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.Stmt
cgTop, completesNormally, isBreakable, isContinuable, registerLocation, requireStmt, setCompletesNormally
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, buildAccessMethod, checkNoSharing, checkSpec, clearComment, clearParent, contains, containsTypes, copy, display, fixAccessPost, fixAST, fromSource, getAST, getBeginColumn, getBeginLine, getBytecodeType, getBytecodeTypeDec, 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, postCopy, postFixAST, postImplementMixin, postInnerAccess, postInnerInfo, postLift, postMove, postThreading, preAssignmentCheck, preCopy, preIntroduction, preLift, preMove, preThreading, remove, remove, removeChildAt, replaceWith, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toShortString, toString, unparse, walk, walkAnalysis, walkAssignmentCheck, 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
 
Methods inherited from interface org.aspectj.compiler.crosscuts.ast.AspectMember
cgTop, setParent, unparse
 

Field Detail

tmpStmts

protected Stmts tmpStmts

stmts

protected Stmts stmts
Constructor Detail

BlockStmt

public BlockStmt(SourceLocation location,
                 ASTObject node1)

BlockStmt

public BlockStmt(SourceLocation location,
                 ASTObject node1,
                 ASTObject node2)

BlockStmt

public BlockStmt(SourceLocation location,
                 ASTObject node1,
                 ASTObject node2,
                 ASTObject node3)

BlockStmt

public BlockStmt(SourceLocation location,
                 ASTObject node1,
                 ASTObject node2,
                 ASTObject node3,
                 ASTObject node4)

BlockStmt

public BlockStmt(SourceLocation location,
                 Stmts _stmts)

BlockStmt

public BlockStmt(Stmts _stmts)

BlockStmt

public BlockStmt(Stmt[] _stmts)

BlockStmt

public BlockStmt(SourceLocation location,
                 Stmts _tmpStmts,
                 Stmts _stmts)

BlockStmt

protected BlockStmt(SourceLocation source)
Method Detail

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class Stmt

requireBlockStmt

public void requireBlockStmt()
Overrides:
requireBlockStmt in class Stmt

mustBeLive

public boolean mustBeLive()
when the -lenient option is used, we declare that empty block don't have to be live. This makes code like: return 2; {} legal.

Overrides:
mustBeLive in class Stmt

walkFlow

public void walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
Overrides:
walkFlow in class ASTObject

walkCleanup

public void walkCleanup(org.aspectj.compiler.base.ByteCodeCleanupPass w)
Overrides:
walkCleanup in class ASTObject

postCleanup

public ASTObject postCleanup(org.aspectj.compiler.base.ByteCodeCleanupPass w)
Overrides:
postCleanup in class ASTObject

makeTempsExplicit

protected void makeTempsExplicit()

walkFrameLoc

public void walkFrameLoc(org.aspectj.compiler.base.FrameLocPass walker)
Overrides:
walkFrameLoc in class ASTObject

preScope

public void preScope(ScopeWalker walker)
Overrides:
preScope in class ASTObject

postScope

public ASTObject postScope(ScopeWalker walker)
Overrides:
postScope in class ASTObject

makeTemporary

public VarDec makeTemporary(Type type)

addTemporary

public void addTemporary(VarDec tmp)

checkReturnType

public void checkReturnType(Type expectedReturnType)

unparse

public void unparse(org.aspectj.compiler.base.CodeWriter writer)
Specified by:
unparse in interface AspectMember
Overrides:
unparse in class ASTObject

cleanup

public void cleanup()
Specified by:
cleanup in interface AspectMember
Overrides:
cleanup in class ASTObject

cgStmt

protected void cgStmt(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: Stmt
This procedure does the work of generating bytecode. Its main requirement is to leave the stack empty. This method should only be called from Stmt.cgTop(org.aspectj.compiler.base.bcg.CodeBuilder).

Overrides:
cgStmt in class Stmt

getTmpStmts

public Stmts getTmpStmts()

setTmpStmts

public void setTmpStmts(Stmts _tmpStmts)

getStmts

public Stmts getStmts()

setStmts

public void setStmts(Stmts _stmts)

copyWalk

public ASTObject copyWalk(CopyWalker walker)
Overrides:
copyWalk in class ASTObject

getChildAt

public ASTObject getChildAt(int childIndex)
Overrides:
getChildAt in class ASTObject

getChildNameAt

public java.lang.String getChildNameAt(int childIndex)
Overrides:
getChildNameAt in class ASTObject

setChildAt

public void setChildAt(int childIndex,
                       ASTObject child)
Overrides:
setChildAt in class ASTObject

getChildCount

public int getChildCount()
Overrides:
getChildCount in class ASTObject

getDefaultDisplayName

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