public class ExitableBlock
extends java.lang.Object
Typical usage::
CodeAttr code = ...; Type retType = ...; // a Type or null ExitableBlock block = code.startExitableBlock(retType, true); ... ... block.exit() ...; // conditionally ... code.endExitableBlock();
The block.exit()
compiles to a transfer to the end
of the block
, executing any finally
-blocks
within the block that surround the call to exit
.
If the ExitableBlock
should leave a result on
the stack, then specify the type of the result as the retType
.
The block itself must push a result before calling
endExitableBlock
(unless code.reachableHere()
is false), and must also push a result before block.exit().
.
Modifier and Type | Method and Description |
---|---|
void |
exit()
Exit this surrounding block, executing finally blocks as needed.
|
Label |
exitIsGoto()
If an exit is simple, return the label for block end.
|
public void exit()
public Label exitIsGoto()