public interface InvocationPlugin extends GraphBuilderPlugin
Modifier and Type | Interface and Description |
---|---|
static interface |
InvocationPlugin.Receiver
The receiver in a non-static method.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
apply(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver) |
default boolean |
apply(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode arg) |
default boolean |
apply(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode arg1,
ValueNode arg2) |
default boolean |
apply(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode arg1,
ValueNode arg2,
ValueNode arg3) |
default boolean |
apply(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode arg1,
ValueNode arg2,
ValueNode arg3,
ValueNode arg4) |
default boolean |
apply(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode arg1,
ValueNode arg2,
ValueNode arg3,
ValueNode arg4,
ValueNode arg5) |
default boolean |
applyPolymorphic(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode... argsIncludingReceiver)
Handles invocation of a signature polymorphic method.
|
default boolean |
defaultHandler(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode... args)
Handles an invocation when a specific
apply method is not available. |
default boolean |
execute(GraphBuilderContext b,
ResolvedJavaMethod targetMethod,
InvocationPlugin.Receiver receiver,
ValueNode[] argsIncludingReceiver)
Executes this plugin against a set of invocation arguments.
|
default StackTraceElement |
getApplySourceLocation(MetaAccessProvider metaAccess) |
default boolean |
inlineOnly()
Determines if this plugin can only be used when inlining the method is it associated with.
|
default boolean |
isSignaturePolymorphic()
Determines if this plugin is for a method with a polymorphic signature (e.g.
|
default boolean isSignaturePolymorphic()
MethodHandle.invokeExact(Object...)
).default boolean inlineOnly()
default boolean applyPolymorphic(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode... argsIncludingReceiver)
receiver
- access to the receiver, null
if targetMethod
is staticargsIncludingReceiver
- all arguments to the invocation include the raw receiver in
position 0 if targetMethod
is not staticexecute(com.oracle.graal.graphbuilderconf.GraphBuilderContext, jdk.internal.jvmci.meta.ResolvedJavaMethod, com.oracle.graal.graphbuilderconf.InvocationPlugin.Receiver, com.oracle.graal.nodes.ValueNode[])
default boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver)
default boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode arg)
default boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode arg1, ValueNode arg2)
default boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode arg1, ValueNode arg2, ValueNode arg3)
default boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode arg1, ValueNode arg2, ValueNode arg3, ValueNode arg4)
default boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode arg1, ValueNode arg2, ValueNode arg3, ValueNode arg4, ValueNode arg5)
default boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] argsIncludingReceiver)
InvocationPlugin
dispatches to the apply(...)
method that matches the number of arguments or to 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.targetMethod
- the method for which this plugin is being appliedreceiver
- access to the receiver, null
if targetMethod
is staticargsIncludingReceiver
- 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.default boolean defaultHandler(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode... args)
apply
method is not available.default StackTraceElement getApplySourceLocation(MetaAccessProvider metaAccess)