# HG changeset patch # User Andreas Woess # Date 1390946150 -3600 # Node ID 2a43fba3d0398bd62d9158083042326ec4593843 # Parent 9f730a04ba38d1ae9627f84c3342fd8e49845be1 fix handling of skipped exceptions (must not cut off other exception types or unwind) diff -r 9f730a04ba38 -r 2a43fba3d039 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Tue Jan 28 21:48:50 2014 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Tue Jan 28 22:55:50 2014 +0100 @@ -1711,7 +1711,11 @@ ResolvedJavaType resolvedCatchType = (ResolvedJavaType) catchType; for (ResolvedJavaType skippedType : graphBuilderConfig.getSkippedExceptionTypes()) { if (skippedType.isAssignableFrom(resolvedCatchType)) { - append(new DeoptimizeNode(InvalidateReprofile, UnreachedCode)); + Block nextBlock = block.successors.size() == 1 ? unwindBlock(block.deoptBci) : block.successors.get(1); + ValueNode exception = frameState.stackAt(0); + FixedNode trueSuccessor = currentGraph.add(new DeoptimizeNode(InvalidateReprofile, UnreachedCode)); + FixedNode nextDispatch = createTarget(nextBlock, frameState); + append(new IfNode(currentGraph.unique(new InstanceOfNode((ResolvedJavaType) catchType, exception, null)), trueSuccessor, nextDispatch, 0)); return; } }