|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object | +--coins.casttohir.SideEffectBuffer
SideEffectBuffer
Hold side effect statements and process them (move, insert, etc.).
Side effect statement: statement that leave side effect (assign statement,
call statement, etc.).
Sequence point: program point where side effect should be completed at the
latest.
Swept out statement: statement moved forward or backward to perform side
effect at proper point as defined by the grammar.
Sweep out backward: move a side effect statement in front of the current
statement.
Sweep out forward: move a side effect statement to some position succeeding
the current statement.
| コンストラクタの概要 | |
(パッケージプライベート) |
SideEffectBuffer(ToHir tohir)
SideEffectBuffer Constructor. |
| メソッドの概要 | |
(パッケージプライベート) void |
add(SideEffectBuffer child)
add Connect the statement lists of the child with the statement lists of this SideEffectBuffer, and clear the statement lists of the child. |
(パッケージプライベート) SideEffectBuffer |
addNext(HIR s)
addNext Add statement to the list of statements to be swept forward. |
(パッケージプライベート) void |
addNext(SideEffectBuffer child)
addNext Connect the statement lists of the child with the nextList of this SideEffectBuffer, and clear the statement lists of the child. |
(パッケージプライベート) SideEffectBuffer |
addPrev(HIR s)
addPrev Add statement to the list of statements to be swept backward. |
(パッケージプライベート) void |
addPrev(SideEffectBuffer child)
addPrev Connect the statement lists of the child with the prevList of this SideEffectBuffer, and clear the statement lists of the child. |
(パッケージプライベート) void |
addToBlockFirst(Stmt s,
boolean reserve)
addToBlockLast Add swept forward statements (in nextList) as the last statement of the block which is either parameter s or a block generated to surround s. |
(パッケージプライベート) void |
addToBlockLast(Stmt s,
boolean reserve)
addToBlockLast Add swept backward statements (in prevList) as the last statement of the block which is either parameter s or a block generated to surround s. |
(パッケージプライベート) void |
addToStmtNext(Stmt s,
boolean reserve)
addToStmtNext Insert the statements swept forward (nextList elements) at the position next to the statement s. |
(パッケージプライベート) void |
addToStmtPrev(Stmt s,
boolean reserve)
addToStmtPrev Insert the statements swept backward (prevList elements) in front of the statement s. |
(パッケージプライベート) BlockStmt |
getBlockStmt(Stmt s)
getBlockStmt From parameter s, make a block statement in which swept out statements can be inserted. |
(パッケージプライベート) boolean |
isEmpty()
isEmpty |
(パッケージプライベート) boolean |
isEmptyNext()
isEmptyNext |
(パッケージプライベート) boolean |
isEmptyPrev()
isEmptyPrev |
(パッケージプライベート) void |
moveNextToPrev()
moveNextToPrev Move the swept forward statements to the list of swept backward statements by moving statements in nextList to prevList. |
(パッケージプライベート) Exp |
toExp(Exp e)
toExp Change the list of swept backward expressions to an expression by successively changing expressions in prevList to comma expression and appending parameter e as value expression of the comma expression. |
(パッケージプライベート) Stmt |
toStmt()
toStmt Change the swept out statement list to a statement. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
SideEffectBuffer(ToHir tohir)
tohir - Offers cooperation with the object of other packages.| メソッドの詳細 |
boolean isEmpty()
boolean isEmptyPrev()
boolean isEmptyNext()
SideEffectBuffer addPrev(HIR s)
s - Added statement.
SideEffectBuffer addNext(HIR s)
s - Added statement.
void add(SideEffectBuffer child)
child - The child SideEffectBuffer.void addPrev(SideEffectBuffer child)
child - The child SideEffectBuffer.void addNext(SideEffectBuffer child)
child - The child SideEffectBuffer.void moveNextToPrev()
Stmt toStmt()
Exp toExp(Exp e)
e - The second operand of the most outside comma expression.
final void addToStmtPrev(Stmt s,
boolean reserve)
s - Statement showing the position of insertion.reserve - True if the inserted statements are to be left.
final void addToStmtNext(Stmt s,
boolean reserve)
s - Statement showing the position of insertion.reserve - True if the inserted statements are to be left.
final void addToBlockLast(Stmt s,
boolean reserve)
s - Statement showing the candidate of insertion.reserve - True if the inserted statements are to be left.
final void addToBlockFirst(Stmt s,
boolean reserve)
s - Statement showing the candidate of insertion.reserve - True if the inserted statements are to be left.BlockStmt getBlockStmt(Stmt s)
0) (BlockStmt ) => (BlockStmt ) --> return
1) (LabeledStmt (LabeledStmt
(BlockStmt => (BlockStmt --> return
2) (LabeledStmt (LabeledStmt
(xxxStmt )) => (BlockStmt --> return
(xxxStmt )))
3) (xxxStmt ) => (BlockStmt --> return
(xxxStmt ))
s - Statement showing the candidate of insertion point.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||