diff graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java @ 8461:6a8ad083746e

The exception edge for invokes should still be a DispatchBeginNode to allow lowering of ExceptionObjectNode after guard lowering
author Gilles Duboscq <duboscq@ssw.jku.at>
date Mon, 25 Mar 2013 14:11:01 +0100
parents 21bf57680185
children 718c0304ffeb
line wrap: on
line diff
--- 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());