# HG changeset patch # User Thomas Wuerthinger # Date 1330109547 -3600 # Node ID 15849962252df3e8a67d3d5facb749b4bb971e23 # Parent f761948a7cd5ee166601ff6ec663b5c54d4d91f1 Make sure rethrowException flag is cleared also when return/unwind blocks are entered, they could use the framestate for the synchronization epilogue. diff -r f761948a7cd5 -r 15849962252d graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Fri Feb 24 19:51:18 2012 +0100 +++ b/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Fri Feb 24 19:52:27 2012 +0100 @@ -1337,8 +1337,10 @@ assert lastInstr.next() == null : "instructions already appended at block " + block.blockID; if (block == returnBlock) { + frameState.setRethrowException(false); createReturn(); } else if (block == unwindBlock) { + frameState.setRethrowException(false); createUnwind(); } else if (block instanceof ExceptionBlock) { createExceptionDispatch((ExceptionBlock) block); @@ -1398,6 +1400,7 @@ // TODO (gd) remove this when FloatingRead is fixed if (Modifier.isSynchronized(method.accessFlags())) { append(currentGraph.add(new ValueAnchorNode(x))); + assert !frameState.rethrowException(); } synchronizedEpilogue(FrameState.AFTER_BCI); @@ -1409,6 +1412,7 @@ if (Modifier.isSynchronized(method.accessFlags())) { MonitorExitNode monitorExit = genMonitorExit(methodSynchronizedObject); monitorExit.setStateAfter(frameState.create(bci)); + assert !frameState.rethrowException(); } }