| java.lang.Object oscript.compiler.LoopStackNode
LoopStackNode | class LoopStackNode (Code) | | A stack of LoopStackNode is used to track loop bodies, and
related things, such as cleanup instructions that need to be inserted prior
to a jump or return out of a loop.
|
Inner Class :public interface CleanupInstructionGenerator | |
addBreakBranchInstruction | void addBreakBranchInstruction(BranchInstruction bi)(Code) | | Add a branch instruction used to implement a "break". The branch target
of this instruction will be set appropriately before this loop stack node
is popped off the stack.
|
addCleanupInstructionGenerator | void addCleanupInstructionGenerator(CleanupInstructionGenerator g)(Code) | | Add a clean-up instruction generator that will be called in the case of
a jump/return out of this loop body. The instruction generator should
be removed after visiting the children of the syntax-tree node visit
that added the generator. The instruction generator should not itself
add/remove instruction generators, and it should not cause a net change
to the stack height. Note that the instruction generator may be called
multiple times if there are multiple points of jump/return out the loop
body.
|
addContinueBranchInstruction | void addContinueBranchInstruction(BranchInstruction bi)(Code) | | Add a branch instruction used to implement a "continue". The branch target
of this instruction will be set appropriately before this loop stack node
is popped off the stack.
|
insertCleanupInstructions | void insertCleanupInstructions(CompilerInstructionList il, boolean all)(Code) | | Called in the case of a jump/return out of this loop body.
Parameters: il - the instruction list to insert instructions into Parameters: all - true if "return" type exception that exits allloop frames, or false if "break" or "continue" type jumpout of just this loop frame. |
pop | LoopStackNode pop()(Code) | | Pop the current loop-stack node off the stack, returning the next in
the stack.
|
removeCleanupInstructionGenerator | void removeCleanupInstructionGenerator(CleanupInstructionGenerator g)(Code) | | Remove a clean-up instruction generator.
|
|
|