< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java

Print this page

        

*** 27,36 **** --- 27,37 ---- import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor; import org.graalvm.compiler.core.common.spi.ForeignCallsProvider; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.extended.ForeignCallNode; + import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.ResolvedJavaMethod; /** * {@link InvocationPlugin} for converting a method call directly to a foreign call. */
*** 45,53 **** @Override public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) { ForeignCallNode foreignCall = new ForeignCallNode(foreignCalls, descriptor, args); foreignCall.setBci(b.bci()); ! b.addPush(targetMethod.getSignature().getReturnKind(), foreignCall); return true; } } --- 46,58 ---- @Override public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) { ForeignCallNode foreignCall = new ForeignCallNode(foreignCalls, descriptor, args); foreignCall.setBci(b.bci()); ! if (targetMethod.getSignature().getReturnKind() == JavaKind.Void) { ! b.add(foreignCall); ! } else { ! b.addPush(targetMethod.getSignature().getReturnKind(), foreignCall); ! } return true; } }
< prev index next >