# HG changeset patch # User Gilles Duboscq # Date 1364217061 -3600 # Node ID 6a8ad083746e397c84fde8ea320d217207abf942 # Parent a607682f7ba652967b9479c49eb84556136b0fd5 The exception edge for invokes should still be a DispatchBeginNode to allow lowering of ExceptionObjectNode after guard lowering diff -r a607682f7ba6 -r 6a8ad083746e 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 Mon Mar 25 11:27:40 2013 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Mon Mar 25 14:11:01 2013 +0100 @@ -1128,7 +1128,7 @@ frameState.pushReturn(resultType, result); return invoke; } else { - ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) handleException(null, bci()); + DispatchBeginNode exceptionEdge = handleException(null, bci()); InvokeWithExceptionNode invoke = currentGraph.add(new InvokeWithExceptionNode(callTarget, exceptionEdge, bci())); ValueNode result = append(invoke); frameState.pushReturn(resultType, result); diff -r a607682f7ba6 -r 6a8ad083746e graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Mon Mar 25 11:27:40 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Mon Mar 25 14:11:01 2013 +0100 @@ -35,7 +35,7 @@ public class InvokeWithExceptionNode extends ControlSplitNode implements Node.IterableNodeType, Invoke, MemoryCheckpoint, LIRLowerable { @Successor private BeginNode next; - @Successor private ExceptionObjectNode exceptionEdge; + @Successor private DispatchBeginNode exceptionEdge; @Input private final CallTargetNode callTarget; @Input private FrameState stateAfter; private final int bci; @@ -43,7 +43,7 @@ private boolean useForInlining; private double inliningRelevance; - public InvokeWithExceptionNode(CallTargetNode callTarget, ExceptionObjectNode exceptionEdge, int bci) { + public InvokeWithExceptionNode(CallTargetNode callTarget, DispatchBeginNode exceptionEdge, int bci) { super(callTarget.returnStamp()); this.exceptionEdge = exceptionEdge; this.bci = bci; @@ -53,11 +53,11 @@ this.inliningRelevance = Double.NaN; } - public ExceptionObjectNode exceptionEdge() { + public DispatchBeginNode exceptionEdge() { return exceptionEdge; } - public void setExceptionEdge(ExceptionObjectNode x) { + public void setExceptionEdge(DispatchBeginNode x) { updatePredecessor(exceptionEdge, x); exceptionEdge = x; } diff -r a607682f7ba6 -r 6a8ad083746e graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Mon Mar 25 11:27:40 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Mon Mar 25 14:11:01 2013 +0100 @@ -448,7 +448,7 @@ PhiNode exceptionObjectPhi = null; if (invoke instanceof InvokeWithExceptionNode) { InvokeWithExceptionNode invokeWithException = (InvokeWithExceptionNode) invoke; - ExceptionObjectNode exceptionEdge = invokeWithException.exceptionEdge(); + ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) invokeWithException.exceptionEdge(); exceptionMerge = graph.add(new MergeNode()); exceptionMerge.setProbability(exceptionEdge.probability()); @@ -484,7 +484,7 @@ // replace the invoke exception edge if (invoke instanceof InvokeWithExceptionNode) { InvokeWithExceptionNode invokeWithExceptionNode = (InvokeWithExceptionNode) invoke; - ExceptionObjectNode exceptionEdge = invokeWithExceptionNode.exceptionEdge(); + ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) invokeWithExceptionNode.exceptionEdge(); exceptionEdge.replaceAtUsages(exceptionObjectPhi); exceptionEdge.setNext(null); GraphUtil.killCFG(invokeWithExceptionNode.exceptionEdge()); @@ -656,7 +656,7 @@ assert exceptionMerge != null && exceptionObjectPhi != null; InvokeWithExceptionNode invokeWithException = (InvokeWithExceptionNode) invoke; - ExceptionObjectNode exceptionEdge = invokeWithException.exceptionEdge(); + ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) invokeWithException.exceptionEdge(); FrameState stateAfterException = exceptionEdge.stateAfter(); ExceptionObjectNode newExceptionEdge = (ExceptionObjectNode) exceptionEdge.copyWithInputs(); @@ -1063,7 +1063,7 @@ if (unwindNode != null) { assert unwindNode.predecessor() != null; assert invokeWithException.exceptionEdge().successors().count() == 1; - ExceptionObjectNode obj = invokeWithException.exceptionEdge(); + ExceptionObjectNode obj = (ExceptionObjectNode) invokeWithException.exceptionEdge(); stateAtExceptionEdge = obj.stateAfter(); UnwindNode unwindDuplicate = (UnwindNode) duplicates.get(unwindNode); obj.replaceAtUsages(unwindDuplicate.exception());