< prev index next >

src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java

Print this page

 93         }
 94     }
 95 
 96     /** Invalidate all recorded nmethods. */
 97     private static native void clearCallSiteContext(CallSiteContext context);
 98 
 99     private static native void registerNatives();
100     static {
101         registerNatives();
102     }
103 
104     /**
105      * Compile-time constants go here. This collection exists not only for
106      * reference from clients, but also for ensuring the VM and JDK agree on the
107      * values of these constants (see {@link #verifyConstants()}).
108      */
109     static class Constants {
110         Constants() { } // static only
111 
112         static final int
113             MN_IS_METHOD           = 0x00010000, // method (not constructor)
114             MN_IS_CONSTRUCTOR      = 0x00020000, // constructor
115             MN_IS_FIELD            = 0x00040000, // field
116             MN_IS_TYPE             = 0x00080000, // nested type
117             MN_CALLER_SENSITIVE    = 0x00100000, // @CallerSensitive annotation detected
118             MN_TRUSTED_FINAL       = 0x00200000, // trusted final field
119             MN_HIDDEN_MEMBER       = 0x00400000, // members defined in a hidden class or with @Hidden
120             MN_REFERENCE_KIND_SHIFT = 24, // refKind
121             MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT;


122 
123         /**
124          * Constant pool reference-kind codes, as used by CONSTANT_MethodHandle CP entries.
125          */
126         static final byte
127             REF_NONE                    = 0,  // null value
128             REF_getField                = 1,
129             REF_getStatic               = 2,
130             REF_putField                = 3,
131             REF_putStatic               = 4,
132             REF_invokeVirtual           = 5,
133             REF_invokeStatic            = 6,
134             REF_invokeSpecial           = 7,
135             REF_newInvokeSpecial        = 8,
136             REF_invokeInterface         = 9,
137             REF_LIMIT                  = 10;
138 
139         /**
140          * Flags for Lookup.ClassOptions
141          */

 93         }
 94     }
 95 
 96     /** Invalidate all recorded nmethods. */
 97     private static native void clearCallSiteContext(CallSiteContext context);
 98 
 99     private static native void registerNatives();
100     static {
101         registerNatives();
102     }
103 
104     /**
105      * Compile-time constants go here. This collection exists not only for
106      * reference from clients, but also for ensuring the VM and JDK agree on the
107      * values of these constants (see {@link #verifyConstants()}).
108      */
109     static class Constants {
110         Constants() { } // static only
111 
112         static final int
113             MN_IS_METHOD             = 0x00010000, // method (not object constructor)
114             MN_IS_CONSTRUCTOR        = 0x00020000, // object constructor
115             MN_IS_FIELD              = 0x00040000, // field
116             MN_IS_TYPE               = 0x00080000, // nested type
117             MN_CALLER_SENSITIVE      = 0x00100000, // @CallerSensitive annotation detected
118             MN_TRUSTED_FINAL         = 0x00200000, // trusted final field
119             MN_HIDDEN_MEMBER         = 0x00400000, // members defined in a hidden class or with @Hidden
120             MN_FLAT_FIELD            = 0x00800000, // flat field
121             MN_NULL_RESTRICTED       = 0x01000000, // null-restricted field
122             MN_REFERENCE_KIND_SHIFT  = 26, // refKind
123             MN_REFERENCE_KIND_MASK   = 0x3C000000 >> MN_REFERENCE_KIND_SHIFT;
124 
125         /**
126          * Constant pool reference-kind codes, as used by CONSTANT_MethodHandle CP entries.
127          */
128         static final byte
129             REF_NONE                    = 0,  // null value
130             REF_getField                = 1,
131             REF_getStatic               = 2,
132             REF_putField                = 3,
133             REF_putStatic               = 4,
134             REF_invokeVirtual           = 5,
135             REF_invokeStatic            = 6,
136             REF_invokeSpecial           = 7,
137             REF_newInvokeSpecial        = 8,
138             REF_invokeInterface         = 9,
139             REF_LIMIT                  = 10;
140 
141         /**
142          * Flags for Lookup.ClassOptions
143          */
< prev index next >