< prev index next >

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

Print this page




  23 package org.graalvm.compiler.nodes.graphbuilderconf;
  24 
  25 import java.lang.invoke.MethodHandle;
  26 import java.lang.reflect.Method;
  27 
  28 import org.graalvm.compiler.debug.GraalError;
  29 import org.graalvm.compiler.nodes.Invoke;
  30 import org.graalvm.compiler.nodes.ValueNode;
  31 import org.graalvm.compiler.nodes.type.StampTool;
  32 
  33 import jdk.vm.ci.meta.MetaAccessProvider;
  34 import jdk.vm.ci.meta.ResolvedJavaMethod;
  35 
  36 /**
  37  * Plugin for handling a specific method invocation.
  38  */
  39 public interface InvocationPlugin extends GraphBuilderPlugin {
  40 
  41     /**
  42      * The receiver in a non-static method. The class literal for this interface must be used with
  43      * {@link InvocationPlugins#put(InvocationPlugin, boolean, boolean, boolean, Class, String, Class...)}
  44      * to denote the receiver argument for such a non-static method.
  45      */
  46     public interface Receiver {
  47         /**
  48          * Gets the receiver value, null checking it first if necessary.
  49          *
  50          * @return the receiver value with a {@linkplain StampTool#isPointerNonNull(ValueNode)
  51          *         non-null} stamp
  52          */
  53         default ValueNode get() {
  54             return get(true);
  55         }
  56 
  57         /**
  58          * Gets the receiver value, optionally null checking it first if necessary.
  59          */
  60         ValueNode get(boolean performNullCheck);
  61 
  62         /**
  63          * Determines if the receiver is constant.
  64          */




  23 package org.graalvm.compiler.nodes.graphbuilderconf;
  24 
  25 import java.lang.invoke.MethodHandle;
  26 import java.lang.reflect.Method;
  27 
  28 import org.graalvm.compiler.debug.GraalError;
  29 import org.graalvm.compiler.nodes.Invoke;
  30 import org.graalvm.compiler.nodes.ValueNode;
  31 import org.graalvm.compiler.nodes.type.StampTool;
  32 
  33 import jdk.vm.ci.meta.MetaAccessProvider;
  34 import jdk.vm.ci.meta.ResolvedJavaMethod;
  35 
  36 /**
  37  * Plugin for handling a specific method invocation.
  38  */
  39 public interface InvocationPlugin extends GraphBuilderPlugin {
  40 
  41     /**
  42      * The receiver in a non-static method. The class literal for this interface must be used with
  43      * {@link InvocationPlugins#put} to denote the receiver argument for such a non-static method.

  44      */
  45     public interface Receiver {
  46         /**
  47          * Gets the receiver value, null checking it first if necessary.
  48          *
  49          * @return the receiver value with a {@linkplain StampTool#isPointerNonNull(ValueNode)
  50          *         non-null} stamp
  51          */
  52         default ValueNode get() {
  53             return get(true);
  54         }
  55 
  56         /**
  57          * Gets the receiver value, optionally null checking it first if necessary.
  58          */
  59         ValueNode get(boolean performNullCheck);
  60 
  61         /**
  62          * Determines if the receiver is constant.
  63          */


< prev index next >