Mercurial > hg > graal-compiler
changeset 4689:15849962252d
Make sure rethrowException flag is cleared also when return/unwind blocks are entered, they could use the framestate for the synchronization epilogue.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 24 Feb 2012 19:52:27 +0100 |
parents | f761948a7cd5 |
children | b22f3f406b97 |
files | graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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(); } }