# HG changeset patch # User Gilles Duboscq # Date 1376657225 -7200 # Node ID 602a25aade245468eb60c4f52996bf552e530f1b # Parent 345bce66c04a8a81e422d2dcf94a364ed81bcd0b GraphBuilderPhase: Insert explicit null checks for invokes if an exception has been seen diff -r 345bce66c04a -r 602a25aade24 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 Aug 16 14:44:56 2013 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Fri Aug 16 14:47:05 2013 +0200 @@ -1137,9 +1137,12 @@ if (graphBuilderConfig.eagerResolving()) { returnType = returnType.resolve(targetMethod.getDeclaringClass()); } - if (invokeKind != InvokeKind.Static && invokeKind != InvokeKind.Special) { - JavaTypeProfile profile = profilingInfo.getTypeProfile(bci()); - args[0] = TypeProfileProxyNode.create(args[0], profile); + if (invokeKind != InvokeKind.Static) { + emitExplicitExceptions(args[0], null); + if (invokeKind != InvokeKind.Special) { + JavaTypeProfile profile = profilingInfo.getTypeProfile(bci()); + args[0] = TypeProfileProxyNode.create(args[0], profile); + } } MethodCallTargetNode callTarget = currentGraph.add(new MethodCallTargetNode(invokeKind, targetMethod, args, returnType)); createInvokeNode(callTarget, resultType);