changeset 8455:00d2e017073d

Merge.
author Christian Humer <christian.humer@gmail.com>
date Fri, 22 Mar 2013 18:01:47 +0100
parents fec5ebd058b7 (current diff) 3e85441907de (diff)
children d815f0ac9ed3
files
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Fri Mar 22 18:01:22 2013 +0100
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Fri Mar 22 18:01:47 2013 +0100
@@ -1116,12 +1116,17 @@
             returnType = returnType.resolve(targetMethod.getDeclaringClass());
         }
         MethodCallTargetNode callTarget = currentGraph.add(new MethodCallTargetNode(invokeKind, targetMethod, args, returnType));
+        createInvokeNode(callTarget, resultType);
+    }
+
+    protected Invoke createInvokeNode(MethodCallTargetNode callTarget, Kind resultType) {
         // be conservative if information was not recorded (could result in endless recompiles
         // otherwise)
         if (graphBuilderConfig.omitAllExceptionEdges() || (optimisticOpts.useExceptionProbability() && profilingInfo.getExceptionSeen(bci()) == ExceptionSeen.FALSE)) {
-            ValueNode result = appendWithBCI(currentGraph.add(new InvokeNode(callTarget, bci())));
+            InvokeNode invoke = new InvokeNode(callTarget, bci());
+            ValueNode result = appendWithBCI(currentGraph.add(invoke));
             frameState.pushReturn(resultType, result);
-
+            return invoke;
         } else {
             ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) handleException(null, bci());
             InvokeWithExceptionNode invoke = currentGraph.add(new InvokeWithExceptionNode(callTarget, exceptionEdge, bci()));
@@ -1134,6 +1139,7 @@
 
             invoke.setNext(createTarget(nextBlock, frameState));
             invoke.setStateAfter(frameState.create(nextBlock.startBci));
+            return invoke;
         }
     }