Method Summary |
|
public void | addPath(Block callerBlock, Block returnBlock) Adds a path from the block before a Subroutine is called to a block after
the subroutine is called. |
public Block | entry() Returns the first Block in the subroutine. |
public Block | exit() Returns the last Block in the subroutine. |
public FlowGraph | graph() Returns the CFG that contains this subroutine. |
public int | numPaths() Returns the number of places that this subroutine is called. |
public Block | pathSource(Block block) Returns the "caller block" for a given "return block". |
public Block | pathTarget(Block block) Returns the "return block" for a given "caller block". |
public Collection | paths() Returns the paths (a Collection of two-element arrays of Blocks) that
represent the Blocks that end in a call to this subroutine and the block
that begin with the return address from this subroutine. |
public void | print(PrintStream out) Prints a textual representation of this Subroutine. |
public void | removeAllPaths() Removes all caller-return paths. |
public void | removePath(Block callerBlock, Block returnBlock) Removes a path between a caller Block and a return Block. |
public void | removePathsContaining(Block block) Removes all paths involving block regardless of whether it is a calling
(source) block or a returning (target) block. |
public LocalVariable | returnAddress() Returns the local variable containing the return address of this
subroutine. |
public void | setEntry(Block entry) Sets the entry Block for this Subroutine. |
public void | setExit(Block exit) Sets the exit Block for this Subroutine. |
public void | setReturnAddress(LocalVariable returnAddress) Sets the address (stored in a LocalVariable) to which this subroutine
will return once it is finished. |
public String | toString() |