| java.lang.Object org.quilt.cl.TryStacks
TryStacks | public class TryStacks (Code) | | Manages try/catch blocks. Adds subgraphs to the method
graph for each exception handler, building the graph that
GraphTransformer hangs bytecode off.
This module must cope with the fact that the compiler allocates exception
handlers in no particular order.
Hacked from earlier 0.5-compatible code.
author: < a href="jdd@dixons.org">Jim Dixon |
Method Summary | |
public CatchData[] | getCatchData() Return an array of CatchData, with vertices for the beginning
and end of the try block, a vertex for the handler, and the
exception handled. | public Comparator | getComparator() Return the class TryStack uses to sort exception handlers.
The comparator used to sort handlers. | int | getEndTry(ControlFlowGraph graph) Get the bytecode offset of end of the try block for this graph.
Parameters: graph - A subgraph created by this package. | public String | toString() Newline-terminated string description of try blocks and handlers. |
TryStacks | public TryStacks(CodeExceptionGen[] handlers, SortedBlocks blocks, ControlFlowGraph g)(Code) | | Constructor setting up try/catch arrays. Sorts the exception
handlers and then builds a nested control flow graph, including
the first code vertex in each try block who first vertex is a
code vertex.
Parameters: handlers - Array of exception handlers for a method. Parameters: blocks - Vertices indexed by position in bytecode (?). Parameters: g - Graph for the method. |
getCatchData | public CatchData[] getCatchData()(Code) | | Return an array of CatchData, with vertices for the beginning
and end of the try block, a vertex for the handler, and the
exception handled.
Catch handler descriptions for the graph. |
getComparator | public Comparator getComparator()(Code) | | Return the class TryStack uses to sort exception handlers.
The comparator used to sort handlers. |
getEndTry | int getEndTry(ControlFlowGraph graph)(Code) | | Get the bytecode offset of end of the try block for this graph.
Parameters: graph - A subgraph created by this package. The bytecode offset of the end of the try block for thisor -1 if there is no such graph. |
toString | public String toString()(Code) | | Newline-terminated string description of try blocks and handlers. |
|
|