All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.lang.invoke.VarHandleShorts Maven / Gradle / Ivy

There is a newer version: 17.alpha.0.57
Show newest version
/*
 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */
package java.lang.invoke;

import jdk.internal.util.Preconditions;
import jdk.internal.vm.annotation.ForceInline;

import java.lang.invoke.VarHandle.VarHandleDesc;
import java.util.Objects;
import java.util.Optional;

import org.qbicc.rt.annotation.Tracking;

import static java.lang.invoke.MethodHandleStatics.UNSAFE;

// -- This file was mechanically generated: Do not edit! -- //

@Tracking("src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template")
final class VarHandleShorts {

    static class FieldInstanceReadOnly extends VarHandle {
        final long fieldOffset;
        final Class receiverType;

        FieldInstanceReadOnly(Class receiverType, long fieldOffset) {
            this(receiverType, fieldOffset, FieldInstanceReadOnly.FORM, false);
        }

        protected FieldInstanceReadOnly(Class receiverType, long fieldOffset,
                                        VarForm form, boolean exact) {
            super(form, exact);
            this.fieldOffset = fieldOffset;
            this.receiverType = receiverType;
        }

        @Override
        public FieldInstanceReadOnly withInvokeExactBehavior() {
            return hasInvokeExactBehavior()
                ? this
                : new FieldInstanceReadOnly(receiverType, fieldOffset, vform, true);
        }

        @Override
        public FieldInstanceReadOnly withInvokeBehavior() {
            return !hasInvokeExactBehavior()
                ? this
                : new FieldInstanceReadOnly(receiverType, fieldOffset, vform, false);
        }

        @Override
        final MethodType accessModeTypeUncached(AccessType at) {
            return at.accessModeType(receiverType, short.class);
        }

        @Override
        public Optional describeConstable() {
            var receiverTypeRef = receiverType.describeConstable();
            var fieldTypeRef = short.class.describeConstable();
            if (!receiverTypeRef.isPresent() || !fieldTypeRef.isPresent())
                return Optional.empty();

            // Reflect on this VarHandle to extract the field name
            String name = VarHandles.getFieldFromReceiverAndOffset(
                receiverType, fieldOffset, short.class).getName();
            return Optional.of(VarHandleDesc.ofField(receiverTypeRef.get(), name, fieldTypeRef.get()));
        }

        @ForceInline
        static short get(VarHandle ob, Object holder) {
            FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
            return UNSAFE.getShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                 handle.fieldOffset);
        }

        // @Override
        public short get(Object holder) {
            return UNSAFE.getShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
        }

        @ForceInline
        static short getVolatile(VarHandle ob, Object holder) {
            FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
            return UNSAFE.getShortVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                 handle.fieldOffset);
        }

        // @Override
        public short getVolatile(Object holder) {
            return UNSAFE.getShortVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
        }

        @ForceInline
        static short getOpaque(VarHandle ob, Object holder) {
            FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
            return UNSAFE.getShortOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                 handle.fieldOffset);
        }

        // @Override
        public short getOpaque(Object holder) {
            return UNSAFE.getShortOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
        }

        @ForceInline
        static short getAcquire(VarHandle ob, Object holder) {
            FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
            return UNSAFE.getShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                 handle.fieldOffset);
        }

        // @Override
        public short getAcquire(Object holder) {
            return UNSAFE.getShortAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
        }

        static final VarForm FORM = new VarForm(FieldInstanceReadOnly.class, Object.class, short.class);
    }

    static final class FieldInstanceReadWrite extends FieldInstanceReadOnly {

        FieldInstanceReadWrite(Class receiverType, long fieldOffset) {
            this(receiverType, fieldOffset, false);
        }

        private FieldInstanceReadWrite(Class receiverType, long fieldOffset,
                                       boolean exact) {
            super(receiverType, fieldOffset, FieldInstanceReadWrite.FORM, exact);
        }

        @Override
        public FieldInstanceReadWrite withInvokeExactBehavior() {
            return hasInvokeExactBehavior()
                ? this
                : new FieldInstanceReadWrite(receiverType, fieldOffset, true);
        }

        @Override
        public FieldInstanceReadWrite withInvokeBehavior() {
            return !hasInvokeExactBehavior()
                ? this
                : new FieldInstanceReadWrite(receiverType, fieldOffset, false);
        }

        @ForceInline
        static void set(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            UNSAFE.putShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                             handle.fieldOffset,
                             value);
        }

        // @Override
        public void set(Object holder, short value) {
            UNSAFE.putShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                             value);
        }

        @ForceInline
        static void setVolatile(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            UNSAFE.putShortVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                     handle.fieldOffset,
                                     value);
        }

        // @Override
        public void setVolatile(Object holder, short value) {
            UNSAFE.putShortVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                                     value);
        }

        @ForceInline
        static void setOpaque(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            UNSAFE.putShortOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                   handle.fieldOffset,
                                   value);
        }

        // @Override
        public void setOpaque(Object holder, short value) {
            UNSAFE.putShortOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                                   value);
        }

        @ForceInline
        static void setRelease(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            UNSAFE.putShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                    handle.fieldOffset,
                                    value);
        }

        // @Override
        public void setRelease(Object holder, short value) {
            UNSAFE.putShortRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                                   value);
        }

        @ForceInline
        static boolean compareAndSet(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.compareAndSetShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean compareAndSet(Object holder, short expected, short value) {
            return UNSAFE.compareAndSetShort(Objects.requireNonNull(receiverType.cast(holder)),
                                              fieldOffset,
                                              expected,
                                              value);
        }

        @ForceInline
        static short compareAndExchange(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.compareAndExchangeShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public short compareAndExchange(Object holder, short expected, short value) {
            return UNSAFE.compareAndExchangeShort(Objects.requireNonNull(receiverType.cast(holder)),
                                               fieldOffset,
                                               expected,
                                               value);
        }

        @ForceInline
        static short compareAndExchangeAcquire(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.compareAndExchangeShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public short compareAndExchangeAcquire(Object holder, short expected, short value) {
            return UNSAFE.compareAndExchangeShortAcquire(Objects.requireNonNull(receiverType.cast(holder)),
                                               fieldOffset,
                                               expected,
                                               value);
        }

        @ForceInline
        static short compareAndExchangeRelease(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.compareAndExchangeShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public short compareAndExchangeRelease(Object holder, short expected, short value) {
            return UNSAFE.compareAndExchangeShortRelease(Objects.requireNonNull(receiverType.cast(holder)),
                                                          fieldOffset,
                                                          expected,
                                                          value);
        }

        @ForceInline
        static boolean weakCompareAndSetPlain(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.weakCompareAndSetShortPlain(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSetPlain(Object holder, short expected, short value) {
            return UNSAFE.weakCompareAndSetShortPlain(Objects.requireNonNull(receiverType.cast(holder)),
                                                       fieldOffset,
                                                       expected,
                                                       value);
        }

        @ForceInline
        static boolean weakCompareAndSet(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.weakCompareAndSetShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSet(Object holder, short expected, short value) {
            return UNSAFE.weakCompareAndSetShort(Objects.requireNonNull(receiverType.cast(holder)),
                                                  fieldOffset,
                                                  expected,
                                                  value);
        }

        @ForceInline
        static boolean weakCompareAndSetAcquire(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.weakCompareAndSetShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSetAcquire(Object holder, short expected, short value) {
            return UNSAFE.weakCompareAndSetShortAcquire(Objects.requireNonNull(receiverType.cast(holder)),
                                                         fieldOffset,
                                                         expected,
                                                         value);
        }

        @ForceInline
        static boolean weakCompareAndSetRelease(VarHandle ob, Object holder, short expected, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.weakCompareAndSetShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSetRelease(Object holder, short expected, short value) {
            return UNSAFE.weakCompareAndSetShortRelease(Objects.requireNonNull(receiverType.cast(holder)),
                                                         fieldOffset,
                                                         expected,
                                                         value);
        }

        @ForceInline
        static short getAndSet(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndSetShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                          handle.fieldOffset,
                                          value);
        }

        // @Override
        public short getAndSet(Object holder, short value) {
            return UNSAFE.getAndSetShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                                          value);
        }

        @ForceInline
        static short getAndSetAcquire(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndSetShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                          handle.fieldOffset,
                                          value);
        }

        // @Override
        public short getAndSetAcquire(Object holder, short value) {
            return UNSAFE.getAndSetShortAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                                                 value);
        }

        @ForceInline
        static short getAndSetRelease(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndSetShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                          handle.fieldOffset,
                                          value);
        }

        // @Override
        public short getAndSetRelease(Object holder, short value) {
            return UNSAFE.getAndSetShortRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
                                          value);
        }

        @ForceInline
        static short getAndAdd(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndAddShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndAdd(Object holder, short value) {
            return UNSAFE.getAndAddShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndAddAcquire(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndAddShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndAddAcquire(Object holder, short value) {
            return UNSAFE.getAndAddShortAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndAddRelease(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndAddShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndAddRelease(Object holder, short value) {
            return UNSAFE.getAndAddShortRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseOr(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseOrShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseOr(Object holder, short value) {
            return UNSAFE.getAndBitwiseOrShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseOrRelease(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseOrShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseOrRelease(Object holder, short value) {
            return UNSAFE.getAndBitwiseOrShortRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseOrAcquire(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseOrShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseOrAcquire(Object holder, short value) {
            return UNSAFE.getAndBitwiseOrShortAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseAnd(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseAndShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseAnd(Object holder, short value) {
            return UNSAFE.getAndBitwiseAndShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseAndRelease(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseAndShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseAndRelease(Object holder, short value) {
            return UNSAFE.getAndBitwiseAndShortRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseAndAcquire(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseAndShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseAndAcquire(Object holder, short value) {
            return UNSAFE.getAndBitwiseAndShortAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseXor(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseXorShort(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseXor(Object holder, short value) {
            return UNSAFE.getAndBitwiseXorShort(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseXorRelease(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseXorShortRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseXorRelease(Object holder, short value) {
            return UNSAFE.getAndBitwiseXorShortRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseXorAcquire(VarHandle ob, Object holder, short value) {
            FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
            return UNSAFE.getAndBitwiseXorShortAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseXorAcquire(Object holder, short value) {
            return UNSAFE.getAndBitwiseXorShortAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
        }

        static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, short.class);
    }


    static class FieldStaticReadOnly extends VarHandle {
        final Object base;
        final long fieldOffset;

        FieldStaticReadOnly(Object base, long fieldOffset) {
            this(base, fieldOffset, FieldStaticReadOnly.FORM, false);
        }

        protected FieldStaticReadOnly(Object base, long fieldOffset,
                                      VarForm form, boolean exact) {
            super(form, exact);
            this.base = base;
            this.fieldOffset = fieldOffset;
        }

        @Override
        public FieldStaticReadOnly withInvokeExactBehavior() {
            return hasInvokeExactBehavior()
                ? this
                : new FieldStaticReadOnly(base, fieldOffset, vform, true);
        }

        @Override
        public FieldStaticReadOnly withInvokeBehavior() {
            return !hasInvokeExactBehavior()
                ? this
                : new FieldStaticReadOnly(base, fieldOffset, vform, false);
        }

        @Override
        public Optional describeConstable() {
            var fieldTypeRef = short.class.describeConstable();
            if (!fieldTypeRef.isPresent())
                return Optional.empty();

            // Reflect on this VarHandle to extract the field name
            var staticField = VarHandles.getStaticFieldFromBaseAndOffset(
                base, fieldOffset, short.class);
            var receiverTypeRef = staticField.getDeclaringClass().describeConstable();
            if (!receiverTypeRef.isPresent())
                return Optional.empty();
            return Optional.of(VarHandleDesc.ofStaticField(receiverTypeRef.get(), staticField.getName(), fieldTypeRef.get()));
        }

        @Override
        final MethodType accessModeTypeUncached(AccessType at) {
            return at.accessModeType(null, short.class);
        }

        @ForceInline
        static short get(VarHandle ob) {
            FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
            return UNSAFE.getShort(handle.base,
                                 handle.fieldOffset);
        }

        // @Override
        public short get() {
            return UNSAFE.getShort(base, fieldOffset);
        }

        @ForceInline
        static short getVolatile(VarHandle ob) {
            FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
            return UNSAFE.getShortVolatile(handle.base,
                                 handle.fieldOffset);
        }

        // @Override
        public short getVolatile() {
            return UNSAFE.getShortVolatile(base, fieldOffset);
        }

        @ForceInline
        static short getOpaque(VarHandle ob) {
            FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
            return UNSAFE.getShortOpaque(handle.base,
                                 handle.fieldOffset);
        }

        // @Override
        public short getOpaque() {
            return UNSAFE.getShortOpaque(base, fieldOffset);
        }

        @ForceInline
        static short getAcquire(VarHandle ob) {
            FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
            return UNSAFE.getShortAcquire(handle.base,
                                 handle.fieldOffset);
        }

        // @Override
        public short getAcquire() {
            return UNSAFE.getShortAcquire(base, fieldOffset);
        }

        static final VarForm FORM = new VarForm(FieldStaticReadOnly.class, null, short.class);
    }

    static final class FieldStaticReadWrite extends FieldStaticReadOnly {

        FieldStaticReadWrite(Object base, long fieldOffset) {
            this(base, fieldOffset, false);
        }

        private FieldStaticReadWrite(Object base, long fieldOffset,
                                     boolean exact) {
            super(base, fieldOffset, FieldStaticReadWrite.FORM, exact);
        }

        @Override
        public FieldStaticReadWrite withInvokeExactBehavior() {
            return hasInvokeExactBehavior()
                ? this
                : new FieldStaticReadWrite(base, fieldOffset, true);
        }

        @Override
        public FieldStaticReadWrite withInvokeBehavior() {
            return !hasInvokeExactBehavior()
                ? this
                : new FieldStaticReadWrite(base, fieldOffset, false);
        }

        @ForceInline
        static void set(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            UNSAFE.putShort(handle.base,
                             handle.fieldOffset,
                             value);
        }

        // @Override
        public void set(short value) {
            UNSAFE.putShort(base, fieldOffset, value);
        }

        @ForceInline
        static void setVolatile(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            UNSAFE.putShortVolatile(handle.base,
                                     handle.fieldOffset,
                                     value);
        }

        // @Override
        public void setVolatile(short value) {
            UNSAFE.putShortVolatile(base, fieldOffset, value);
        }

        @ForceInline
        static void setOpaque(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            UNSAFE.putShortOpaque(handle.base,
                                   handle.fieldOffset,
                                   value);
        }

        // @Override
        public void setOpaque(short value) {
            UNSAFE.putShortOpaque(base, fieldOffset, value);
        }

        @ForceInline
        static void setRelease(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            UNSAFE.putShortRelease(handle.base,
                                    handle.fieldOffset,
                                    value);
        }

        // @Override
        public void setRelease(short value) {
            UNSAFE.putShortRelease(base, fieldOffset, value);
        }

        @ForceInline
        static boolean compareAndSet(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.compareAndSetShort(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean compareAndSet(short expected, short value) {
            return UNSAFE.compareAndSetShort(base, fieldOffset,
                                              expected,
                                              value);
        }

        @ForceInline
        static short compareAndExchange(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.compareAndExchangeShort(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public short compareAndExchange(short expected, short value) {
            return UNSAFE.compareAndExchangeShort(base, fieldOffset,
                                               expected,
                                               value);
        }

        @ForceInline
        static short compareAndExchangeAcquire(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.compareAndExchangeShortAcquire(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public short compareAndExchangeAcquire(short expected, short value) {
            return UNSAFE.compareAndExchangeShortAcquire(base, fieldOffset,
                                               expected,
                                               value);
        }

        @ForceInline
        static short compareAndExchangeRelease(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.compareAndExchangeShortRelease(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public short compareAndExchangeRelease(short expected, short value) {
            return UNSAFE.compareAndExchangeShortRelease(base, fieldOffset,
                                               expected,
                                               value);
        }

        @ForceInline
        static boolean weakCompareAndSetPlain(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.weakCompareAndSetShortPlain(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSetPlain(short expected, short value) {
            return UNSAFE.weakCompareAndSetShortPlain(base, fieldOffset,
                                                       expected,
                                                       value);
        }

        @ForceInline
        static boolean weakCompareAndSet(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.weakCompareAndSetShort(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSet(short expected, short value) {
            return UNSAFE.weakCompareAndSetShort(base, fieldOffset,
                                                  expected,
                                                  value);
        }

        @ForceInline
        static boolean weakCompareAndSetAcquire(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.weakCompareAndSetShortAcquire(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSetAcquire(short expected, short value) {
            return UNSAFE.weakCompareAndSetShortAcquire(base, fieldOffset,
                                                         expected,
                                                         value);
        }

        @ForceInline
        static boolean weakCompareAndSetRelease(VarHandle ob, short expected, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.weakCompareAndSetShortRelease(handle.base,
                                               handle.fieldOffset,
                                               expected,
                                               value);
        }

        // @Override
        public boolean weakCompareAndSetRelease(short expected, short value) {
            return UNSAFE.weakCompareAndSetShortRelease(base, fieldOffset,
                                                         expected,
                                                         value);
        }

        @ForceInline
        static short getAndSet(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndSetShort(handle.base,
                                          handle.fieldOffset,
                                          value);
        }

        // @Override
        public short getAndSet(short value) {
            return UNSAFE.getAndSetShort(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndSetAcquire(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndSetShortAcquire(handle.base,
                                          handle.fieldOffset,
                                          value);
        }

        // @Override
        public short getAndSetAcquire(short value) {
            return UNSAFE.getAndSetShortAcquire(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndSetRelease(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndSetShortRelease(handle.base,
                                          handle.fieldOffset,
                                          value);
        }

        // @Override
        public short getAndSetRelease(short value) {
            return UNSAFE.getAndSetShortRelease(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndAdd(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndAddShort(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndAdd(short value) {
            return UNSAFE.getAndAddShort(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndAddAcquire(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndAddShortAcquire(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndAddAcquire(short value) {
            return UNSAFE.getAndAddShortAcquire(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndAddRelease(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndAddShortRelease(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndAddRelease(short value) {
            return UNSAFE.getAndAddShortRelease(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseOr(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseOrShort(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseOr(short value) {
            return UNSAFE.getAndBitwiseOrShort(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseOrRelease(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseOrShortRelease(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseOrRelease(short value) {
            return UNSAFE.getAndBitwiseOrShortRelease(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseOrAcquire(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseOrShortAcquire(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseOrAcquire(short value) {
            return UNSAFE.getAndBitwiseOrShortAcquire(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseAnd(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseAndShort(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseAnd(short value) {
            return UNSAFE.getAndBitwiseAndShort(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseAndRelease(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseAndShortRelease(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseAndRelease(short value) {
            return UNSAFE.getAndBitwiseAndShortRelease(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseAndAcquire(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseAndShortAcquire(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseAndAcquire(short value) {
            return UNSAFE.getAndBitwiseAndShortAcquire(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseXor(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseXorShort(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseXor(short value) {
            return UNSAFE.getAndBitwiseXorShort(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseXorRelease(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseXorShortRelease(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseXorRelease(short value) {
            return UNSAFE.getAndBitwiseXorShortRelease(base, fieldOffset, value);
        }

        @ForceInline
        static short getAndBitwiseXorAcquire(VarHandle ob, short value) {
            FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
            return UNSAFE.getAndBitwiseXorShortAcquire(handle.base,
                                       handle.fieldOffset,
                                       value);
        }

        // @Override
        public short getAndBitwiseXorAcquire(short value) {
            return UNSAFE.getAndBitwiseXorShortAcquire(base, fieldOffset, value);
        }

        static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, short.class);
    }


    static final class Array extends VarHandle {
        final int abase;
        final int ashift;

        Array(int abase, int ashift) {
            this(abase, ashift, false);
        }

        private Array(int abase, int ashift, boolean exact) {
            super(Array.FORM, exact);
            this.abase = abase;
            this.ashift = ashift;
        }

        @Override
        public Array withInvokeExactBehavior() {
            return hasInvokeExactBehavior()
                ? this
                : new Array(abase, ashift, true);
        }

        @Override
        public Array withInvokeBehavior() {
            return !hasInvokeExactBehavior()
                ? this
                : new Array(abase, ashift, false);
        }

        @Override
        public Optional describeConstable() {
            var arrayTypeRef = short[].class.describeConstable();
            if (!arrayTypeRef.isPresent())
                return Optional.empty();

            return Optional.of(VarHandleDesc.ofArray(arrayTypeRef.get()));
        }

        @Override
        final MethodType accessModeTypeUncached(AccessType at) {
            return at.accessModeType(short[].class, short.class, int.class);
        }


        @ForceInline
        static short get(VarHandle ob, Object oarray, int index) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return array[index];
        }

        // @Override
        public short get(Object oarray, int index) {
            short[] array = (short[]) oarray;
            return array[index];
        }

        @ForceInline
        static void set(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            array[index] = value;
        }

        // @Override
        public void set(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            array[index] = value;
        }

        @ForceInline
        static short getVolatile(VarHandle ob, Object oarray, int index) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getShortVolatile(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
        }

        // @Override
        public short getVolatile(Object oarray, int index) {
            short[] array = (short[]) oarray;
            return UNSAFE.getShortVolatile(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
        }

        @ForceInline
        static void setVolatile(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            UNSAFE.putShortVolatile(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public void setVolatile(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            UNSAFE.putShortVolatile(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getOpaque(VarHandle ob, Object oarray, int index) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getShortOpaque(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
        }

        // @Override
        public short getOpaque(Object oarray, int index) {
            short[] array = (short[]) oarray;
            return UNSAFE.getShortOpaque(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
        }

        @ForceInline
        static void setOpaque(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            UNSAFE.putShortOpaque(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public void setOpaque(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            UNSAFE.putShortOpaque(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAcquire(VarHandle ob, Object oarray, int index) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
        }

        // @Override
        public short getAcquire(Object oarray, int index) {
            short[] array = (short[]) oarray;
            return UNSAFE.getShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
        }

        @ForceInline
        static void setRelease(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            UNSAFE.putShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public void setRelease(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            UNSAFE.putShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static boolean compareAndSet(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndSetShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public boolean compareAndSet(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndSetShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static short compareAndExchange(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndExchangeShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public short compareAndExchange(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndExchangeShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static short compareAndExchangeAcquire(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndExchangeShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public short compareAndExchangeAcquire(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndExchangeShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static short compareAndExchangeRelease(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndExchangeShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public short compareAndExchangeRelease(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.compareAndExchangeShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static boolean weakCompareAndSetPlain(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShortPlain(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public boolean weakCompareAndSetPlain(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShortPlain(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static boolean weakCompareAndSet(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public boolean weakCompareAndSet(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static boolean weakCompareAndSetAcquire(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public boolean weakCompareAndSetAcquire(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static boolean weakCompareAndSetRelease(VarHandle ob, Object oarray, int index, short expected, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    expected,
                    value);
        }

        // @Override
        public boolean weakCompareAndSetRelease(Object oarray, int index, short expected, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.weakCompareAndSetShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    expected,
                    value);
        }

        @ForceInline
        static short getAndSet(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndSetShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public short getAndSet(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndSetShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAndSetAcquire(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndSetShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public short getAndSetAcquire(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndSetShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAndSetRelease(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndSetShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public short getAndSetRelease(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndSetShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAndAdd(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndAddShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public short getAndAdd(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndAddShort(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAndAddAcquire(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndAddShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public short getAndAddAcquire(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndAddShortAcquire(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAndAddRelease(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndAddShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                    value);
        }

        // @Override
        public short getAndAddRelease(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndAddShortRelease(array,
                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                    value);
        }

        @ForceInline
        static short getAndBitwiseOr(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseOrShort(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseOr(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseOrShort(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseOrRelease(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseOrShortRelease(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseOrRelease(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseOrShortRelease(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseOrAcquire(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseOrShortAcquire(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseOrAcquire(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseOrShortAcquire(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseAnd(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseAndShort(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseAnd(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseAndShort(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseAndRelease(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseAndShortRelease(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseAndRelease(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseAndShortRelease(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseAndAcquire(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseAndShortAcquire(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseAndAcquire(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseAndShortAcquire(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseXor(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseXorShort(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseXor(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseXorShort(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseXorRelease(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseXorShortRelease(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseXorRelease(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseXorShortRelease(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        @ForceInline
        static short getAndBitwiseXorAcquire(VarHandle ob, Object oarray, int index, short value) {
            Array handle = (Array)ob;
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseXorShortAcquire(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                       value);
        }

        // @Override
        public short getAndBitwiseXorAcquire(Object oarray, int index, short value) {
            short[] array = (short[]) oarray;
            return UNSAFE.getAndBitwiseXorShortAcquire(array,
                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
                                       value);
        }

        static final VarForm FORM = new VarForm(Array.class, short[].class, short.class, int.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy