public final class ForeignCallPlugin extends Object implements InvocationPlugin
InvocationPlugin for converting a method call directly to a foreign call.InvocationPlugin.Receiver| Modifier and Type | Field and Description |
|---|---|
private ForeignCallDescriptor |
descriptor |
private ForeignCallsProvider |
foreignCalls |
| Constructor and Description |
|---|
ForeignCallPlugin(ForeignCallsProvider foreignCalls,
ForeignCallDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode[] args)
Executes this plugin against a set of invocation arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapply, apply, apply, apply, apply, apply, applyPolymorphic, defaultHandler, getApplySourceLocation, inlineOnly, isSignaturePolymorphicprivate final ForeignCallsProvider foreignCalls
private final ForeignCallDescriptor descriptor
public ForeignCallPlugin(ForeignCallsProvider foreignCalls, ForeignCallDescriptor descriptor)
public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args)
InvocationPluginInvocationPlugin dispatches to the apply(...)
method that matches the number of arguments or to InvocationPlugin.applyPolymorphic(com.oracle.graal.graphbuilderconf.GraphBuilderContext, jdk.internal.jvmci.meta.ResolvedJavaMethod, com.oracle.graal.graphbuilderconf.InvocationPlugin.Receiver, com.oracle.graal.nodes.ValueNode...) if plugin
is signature polymorphic.execute in interface InvocationPlugintargetMethod - the method for which this plugin is being appliedreceiver - access to the receiver, null if targetMethod is staticargs - all arguments to the invocation include the receiver in position
0 if targetMethod is not statictrue if this plugin handled the invocation of targetMethod
false if the graph builder should process the invoke further (e.g., by
inlining it or creating an Invoke node). A plugin that does not handle an
invocation must not modify the graph being constructed.