Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/ir/Throw.java @ 2707:7ed72769d51a
exception handling related changes:
* changed blockPredecessors to list of Instructions, instead of Blocks
* removed explicit predecessor management in BlockBegin, now using predecessors from Graph structure
* replaced generated LIR exception entries with exception dispatch chains in IR
* added Unwind and ExceptionDispatch instructions
* removed ExceptionEntry flag in BlockBegin and all code depending on it
* removed exceptionHandler list from Instruction, replaced by exception Edge on Invoke and Throw
* replaced list of ExceptionHandlers with single exception edge in debug info
misc:
* changed GraphvizPrinter layout (smaller ports on large nodes)
* removed defunct run config
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 18 May 2011 18:09:20 +0200 |
parents | 440ceca8e3d7 |
children | a0dd2b907806 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Throw.java Fri May 13 17:09:20 2011 -0700 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Throw.java Wed May 18 18:09:20 2011 +0200 @@ -36,7 +36,8 @@ private static final int INPUT_EXCEPTION = 0; private static final int INPUT_STATE_BEFORE = 1; - private static final int SUCCESSOR_COUNT = 0; + private static final int SUCCESSOR_COUNT = 1; + private static final int SUCCESSOR_EXCEPTION_EDGE = 0; @Override protected int inputCount() { @@ -71,6 +72,19 @@ } /** + * The entry to the exception dispatch chain for this throw. + * TODO ls: this needs more cleanup - throw should either unwind or jump to the exception dispatch chain + */ + @Override + public BlockBegin exceptionEdge() { + return (BlockBegin) successors().get(super.successorCount() + SUCCESSOR_EXCEPTION_EDGE); + } + + public BlockBegin setExceptionEdge(BlockBegin n) { + return (BlockBegin) successors().set(super.successorCount() + SUCCESSOR_EXCEPTION_EDGE, n); + } + + /** * Creates a new Throw instruction. * @param exception the instruction that generates the exception to throw * @param stateAfter the state before the exception is thrown but after the exception object has been popped