# HG changeset patch # User Christian Humer # Date 1363971707 -3600 # Node ID 00d2e017073daf0ecaac02a12c02b03c57b35dae # Parent fec5ebd058b7bfc0e5239a248f75a58031e30d7b# Parent 3e85441907dedad60548e7d2229bb9a59603d846 Merge. diff -r fec5ebd058b7 -r 00d2e017073d 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 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; } }