< prev index next >

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

Print this page




2101 
2102     /**
2103      * Ensures that loads before the fence will not be reordered with
2104      * loads after the fence.
2105      */
2106     @ForceInline
2107     public static void loadLoadFence() {
2108         UNSAFE.loadLoadFence();
2109     }
2110 
2111     /**
2112      * Ensures that stores before the fence will not be reordered with
2113      * stores after the fence.
2114      */
2115     @ForceInline
2116     public static void storeStoreFence() {
2117         UNSAFE.storeStoreFence();
2118     }
2119 
2120     /**
2121      * A <a href="{@docRoot}/java.base/java/lang/constant/package-summary.html#nominal">nominal descriptor</a> for a
2122      * {@link VarHandle} constant.
2123      *
2124      * @since 12
2125      */
2126     public static final class VarHandleDesc extends DynamicConstantDesc<VarHandle> {
2127 
2128         /**
2129          * Kinds of variable handle descs
2130          */
2131         private enum Kind {
2132             FIELD(ConstantDescs.BSM_VARHANDLE_FIELD),
2133             STATIC_FIELD(ConstantDescs.BSM_VARHANDLE_STATIC_FIELD),
2134             ARRAY(ConstantDescs.BSM_VARHANDLE_ARRAY);
2135 
2136             final DirectMethodHandleDesc bootstrapMethod;
2137 
2138             Kind(DirectMethodHandleDesc bootstrapMethod) {
2139                 this.bootstrapMethod = bootstrapMethod;
2140             }
2141 




2101 
2102     /**
2103      * Ensures that loads before the fence will not be reordered with
2104      * loads after the fence.
2105      */
2106     @ForceInline
2107     public static void loadLoadFence() {
2108         UNSAFE.loadLoadFence();
2109     }
2110 
2111     /**
2112      * Ensures that stores before the fence will not be reordered with
2113      * stores after the fence.
2114      */
2115     @ForceInline
2116     public static void storeStoreFence() {
2117         UNSAFE.storeStoreFence();
2118     }
2119 
2120     /**
2121      * A <a href="package-summary.html#nominal">nominal descriptor</a> for a
2122      * {@link VarHandle} constant.
2123      *
2124      * @since 12
2125      */
2126     public static final class VarHandleDesc extends DynamicConstantDesc<VarHandle> {
2127 
2128         /**
2129          * Kinds of variable handle descs
2130          */
2131         private enum Kind {
2132             FIELD(ConstantDescs.BSM_VARHANDLE_FIELD),
2133             STATIC_FIELD(ConstantDescs.BSM_VARHANDLE_STATIC_FIELD),
2134             ARRAY(ConstantDescs.BSM_VARHANDLE_ARRAY);
2135 
2136             final DirectMethodHandleDesc bootstrapMethod;
2137 
2138             Kind(DirectMethodHandleDesc bootstrapMethod) {
2139                 this.bootstrapMethod = bootstrapMethod;
2140             }
2141 


< prev index next >