Print this page


Split Close
Expand all
Collapse all
          --- old/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
          +++ new/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
↓ open down ↓ 53 lines elided ↑ open up ↑
  54   54      /** Initialize the method handle to adapt the call. */
  55   55      static native void init(AdapterMethodHandle self, MethodHandle target, int argnum);
  56   56      /** Initialize the method handle to call the correct method, directly. */
  57   57      static native void init(BoundMethodHandle self, Object target, int argnum);
  58   58      /** Initialize the method handle to call as if by an invoke* instruction. */
  59   59      static native void init(DirectMethodHandle self, Object ref, boolean doDispatch, Class<?> caller);
  60   60  
  61   61      /** Initialize a method type, once per form. */
  62   62      static native void init(MethodType self);
  63   63  
  64      -    /** Tell the JVM about a class's bootstrap method. */
  65      -    static native void registerBootstrap(Class<?> caller, MethodHandle bootstrapMethod);
  66      -
  67      -    /** Ask the JVM about a class's bootstrap method. */
  68      -    static native MethodHandle getBootstrap(Class<?> caller);
  69      -
  70      -    /** Tell the JVM that we need to change the target of an invokedynamic. */
  71      -    static native void setCallSiteTarget(CallSite site, MethodHandle target);
  72      -
  73   64      /** Fetch the vmtarget field.
  74   65       *  It will be sanitized as necessary to avoid exposing non-Java references.
  75   66       *  This routine is for debugging and reflection.
  76   67       */
  77   68      static native Object getTarget(MethodHandle self, int format);
  78   69  
  79   70      /** Fetch the name of the handled method, if available.
  80   71       *  This routine is for debugging and reflection.
  81   72       */
  82   73      static MemberName getMethodName(MethodHandle self) {
↓ open down ↓ 32 lines elided ↑ open up ↑
 115  106  
 116  107      /** Which conv-ops are implemented by the JVM? */
 117  108      static final int CONV_OP_IMPLEMENTED_MASK;
 118  109      /** Derived mode flag.  Only false on some old JVM implementations. */
 119  110      static final boolean HAVE_RICOCHET_FRAMES;
 120  111  
 121  112      static final int OP_ROT_ARGS_DOWN_LIMIT_BIAS;
 122  113  
 123  114      static final boolean COUNT_GWT;
 124  115  
      116 +    /// CallSite support
      117 +
      118 +    /** Tell the JVM that we need to change the target of a CallSite. */
      119 +    static native void setCallSiteTargetNormal(CallSite site, MethodHandle target);
      120 +    static native void setCallSiteTargetVolatile(CallSite site, MethodHandle target);
      121 +
 125  122      private static native void registerNatives();
 126  123      static {
 127  124          registerNatives();
 128  125          int k;
 129  126          JVM_PUSH_LIMIT              = getConstant(Constants.GC_JVM_PUSH_LIMIT);
 130  127          JVM_STACK_MOVE_UNIT         = getConstant(Constants.GC_JVM_STACK_MOVE_UNIT);
 131  128          k                           = getConstant(Constants.GC_CONV_OP_IMPLEMENTED_MASK);
 132  129          CONV_OP_IMPLEMENTED_MASK    = (k != 0) ? k : DEFAULT_CONV_OP_IMPLEMENTED_MASK;
 133  130          k                           = getConstant(Constants.GC_OP_ROT_ARGS_DOWN_LIMIT_BIAS);
 134  131          OP_ROT_ARGS_DOWN_LIMIT_BIAS = (k != 0) ? (byte)k : -1;
↓ open down ↓ 264 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX