rt/emul/compact/src/main/java/java/lang/invoke/MethodHandleNatives.java
branchjdk8
changeset 1661 6d5075e5ceac
parent 1651 5c990ed353e9
child 1669 139267156f32
     1.1 --- a/rt/emul/compact/src/main/java/java/lang/invoke/MethodHandleNatives.java	Sun Aug 10 06:13:36 2014 +0200
     1.2 +++ b/rt/emul/compact/src/main/java/java/lang/invoke/MethodHandleNatives.java	Mon Aug 11 17:52:23 2014 +0200
     1.3 @@ -45,7 +45,9 @@
     1.4  
     1.5      static native void init(MemberName self, Object ref);
     1.6      static native void expand(MemberName self);
     1.7 -    static native MemberName resolve(MemberName self, Class<?> caller) throws LinkageError;
     1.8 +    static MemberName resolve(MemberName self, Class<?> caller) throws LinkageError {
     1.9 +        return self;
    1.10 +    }
    1.11      static native int getMembers(Class<?> defc, String matchName, String matchSig,
    1.12              int matchFlags, Class<?> caller, int skip, MemberName[] results);
    1.13  
    1.14 @@ -57,25 +59,13 @@
    1.15  
    1.16      /// MethodHandle support
    1.17  
    1.18 -    /** Fetch MH-related JVM parameter.
    1.19 -     *  which=0 retrieves MethodHandlePushLimit
    1.20 -     *  which=1 retrieves stack slot push size (in address units)
    1.21 -     */
    1.22 -    static native int getConstant(int which);
    1.23 -
    1.24 -    static final boolean COUNT_GWT;
    1.25 -
    1.26      /// CallSite support
    1.27  
    1.28      /** Tell the JVM that we need to change the target of a CallSite. */
    1.29      static native void setCallSiteTargetNormal(CallSite site, MethodHandle target);
    1.30      static native void setCallSiteTargetVolatile(CallSite site, MethodHandle target);
    1.31  
    1.32 -    private static native void registerNatives();
    1.33      static {
    1.34 -        registerNatives();
    1.35 -        COUNT_GWT                   = getConstant(Constants.GC_COUNT_GWT) != 0;
    1.36 -
    1.37          // The JVM calls MethodHandleNatives.<clinit>.  Cascade the <clinit> calls as needed:
    1.38          MethodHandleImpl.initStatics();
    1.39  }