java.lang.invoke.VarHandleBytes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qbicc-rt-java.base Show documentation
Show all versions of qbicc-rt-java.base Show documentation
The Qbicc builder for the java.base JDK module
/*
* 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 VarHandleBytes {
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, byte.class);
}
@Override
public Optional describeConstable() {
var receiverTypeRef = receiverType.describeConstable();
var fieldTypeRef = byte.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, byte.class).getName();
return Optional.of(VarHandleDesc.ofField(receiverTypeRef.get(), name, fieldTypeRef.get()));
}
@ForceInline
static byte get(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public byte get(Object holder) {
return UNSAFE.getByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static byte getVolatile(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getByteVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public byte getVolatile(Object holder) {
return UNSAFE.getByteVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static byte getOpaque(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getByteOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public byte getOpaque(Object holder) {
return UNSAFE.getByteOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static byte getAcquire(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public byte getAcquire(Object holder) {
return UNSAFE.getByteAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
static final VarForm FORM = new VarForm(FieldInstanceReadOnly.class, Object.class, byte.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, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void set(Object holder, byte value) {
UNSAFE.putByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setVolatile(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putByteVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setVolatile(Object holder, byte value) {
UNSAFE.putByteVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setOpaque(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putByteOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setOpaque(Object holder, byte value) {
UNSAFE.putByteOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setRelease(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setRelease(Object holder, byte value) {
UNSAFE.putByteRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndSetByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean compareAndSet(Object holder, byte expected, byte value) {
return UNSAFE.compareAndSetByte(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static byte compareAndExchange(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public byte compareAndExchange(Object holder, byte expected, byte value) {
return UNSAFE.compareAndExchangeByte(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static byte compareAndExchangeAcquire(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public byte compareAndExchangeAcquire(Object holder, byte expected, byte value) {
return UNSAFE.compareAndExchangeByteAcquire(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static byte compareAndExchangeRelease(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public byte compareAndExchangeRelease(Object holder, byte expected, byte value) {
return UNSAFE.compareAndExchangeByteRelease(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetBytePlain(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(Object holder, byte expected, byte value) {
return UNSAFE.weakCompareAndSetBytePlain(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(Object holder, byte expected, byte value) {
return UNSAFE.weakCompareAndSetByte(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(Object holder, byte expected, byte value) {
return UNSAFE.weakCompareAndSetByteAcquire(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, Object holder, byte expected, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(Object holder, byte expected, byte value) {
return UNSAFE.weakCompareAndSetByteRelease(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static byte getAndSet(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndSet(Object holder, byte value) {
return UNSAFE.getAndSetByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static byte getAndSetAcquire(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndSetAcquire(Object holder, byte value) {
return UNSAFE.getAndSetByteAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static byte getAndSetRelease(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndSetRelease(Object holder, byte value) {
return UNSAFE.getAndSetByteRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static byte getAndAdd(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndAdd(Object holder, byte value) {
return UNSAFE.getAndAddByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndAddAcquire(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndAddAcquire(Object holder, byte value) {
return UNSAFE.getAndAddByteAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndAddRelease(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndAddRelease(Object holder, byte value) {
return UNSAFE.getAndAddByteRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseOr(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseOr(Object holder, byte value) {
return UNSAFE.getAndBitwiseOrByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseOrRelease(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseOrRelease(Object holder, byte value) {
return UNSAFE.getAndBitwiseOrByteRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseOrAcquire(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseOrAcquire(Object holder, byte value) {
return UNSAFE.getAndBitwiseOrByteAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseAnd(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseAnd(Object holder, byte value) {
return UNSAFE.getAndBitwiseAndByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseAndRelease(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseAndRelease(Object holder, byte value) {
return UNSAFE.getAndBitwiseAndByteRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseAndAcquire(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseAndAcquire(Object holder, byte value) {
return UNSAFE.getAndBitwiseAndByteAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseXor(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorByte(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseXor(Object holder, byte value) {
return UNSAFE.getAndBitwiseXorByte(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseXorRelease(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorByteRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseXorRelease(Object holder, byte value) {
return UNSAFE.getAndBitwiseXorByteRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseXorAcquire(VarHandle ob, Object holder, byte value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorByteAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseXorAcquire(Object holder, byte value) {
return UNSAFE.getAndBitwiseXorByteAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, byte.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 = byte.class.describeConstable();
if (!fieldTypeRef.isPresent())
return Optional.empty();
// Reflect on this VarHandle to extract the field name
var staticField = VarHandles.getStaticFieldFromBaseAndOffset(
base, fieldOffset, byte.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, byte.class);
}
@ForceInline
static byte get(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getByte(handle.base,
handle.fieldOffset);
}
// @Override
public byte get() {
return UNSAFE.getByte(base, fieldOffset);
}
@ForceInline
static byte getVolatile(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getByteVolatile(handle.base,
handle.fieldOffset);
}
// @Override
public byte getVolatile() {
return UNSAFE.getByteVolatile(base, fieldOffset);
}
@ForceInline
static byte getOpaque(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getByteOpaque(handle.base,
handle.fieldOffset);
}
// @Override
public byte getOpaque() {
return UNSAFE.getByteOpaque(base, fieldOffset);
}
@ForceInline
static byte getAcquire(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getByteAcquire(handle.base,
handle.fieldOffset);
}
// @Override
public byte getAcquire() {
return UNSAFE.getByteAcquire(base, fieldOffset);
}
static final VarForm FORM = new VarForm(FieldStaticReadOnly.class, null, byte.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, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putByte(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void set(byte value) {
UNSAFE.putByte(base, fieldOffset, value);
}
@ForceInline
static void setVolatile(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putByteVolatile(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setVolatile(byte value) {
UNSAFE.putByteVolatile(base, fieldOffset, value);
}
@ForceInline
static void setOpaque(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putByteOpaque(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setOpaque(byte value) {
UNSAFE.putByteOpaque(base, fieldOffset, value);
}
@ForceInline
static void setRelease(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putByteRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setRelease(byte value) {
UNSAFE.putByteRelease(base, fieldOffset, value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndSetByte(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean compareAndSet(byte expected, byte value) {
return UNSAFE.compareAndSetByte(base, fieldOffset,
expected,
value);
}
@ForceInline
static byte compareAndExchange(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeByte(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public byte compareAndExchange(byte expected, byte value) {
return UNSAFE.compareAndExchangeByte(base, fieldOffset,
expected,
value);
}
@ForceInline
static byte compareAndExchangeAcquire(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeByteAcquire(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public byte compareAndExchangeAcquire(byte expected, byte value) {
return UNSAFE.compareAndExchangeByteAcquire(base, fieldOffset,
expected,
value);
}
@ForceInline
static byte compareAndExchangeRelease(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeByteRelease(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public byte compareAndExchangeRelease(byte expected, byte value) {
return UNSAFE.compareAndExchangeByteRelease(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetBytePlain(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(byte expected, byte value) {
return UNSAFE.weakCompareAndSetBytePlain(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetByte(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(byte expected, byte value) {
return UNSAFE.weakCompareAndSetByte(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetByteAcquire(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(byte expected, byte value) {
return UNSAFE.weakCompareAndSetByteAcquire(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, byte expected, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetByteRelease(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(byte expected, byte value) {
return UNSAFE.weakCompareAndSetByteRelease(base, fieldOffset,
expected,
value);
}
@ForceInline
static byte getAndSet(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetByte(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndSet(byte value) {
return UNSAFE.getAndSetByte(base, fieldOffset, value);
}
@ForceInline
static byte getAndSetAcquire(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetByteAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndSetAcquire(byte value) {
return UNSAFE.getAndSetByteAcquire(base, fieldOffset, value);
}
@ForceInline
static byte getAndSetRelease(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetByteRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndSetRelease(byte value) {
return UNSAFE.getAndSetByteRelease(base, fieldOffset, value);
}
@ForceInline
static byte getAndAdd(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddByte(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndAdd(byte value) {
return UNSAFE.getAndAddByte(base, fieldOffset, value);
}
@ForceInline
static byte getAndAddAcquire(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddByteAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndAddAcquire(byte value) {
return UNSAFE.getAndAddByteAcquire(base, fieldOffset, value);
}
@ForceInline
static byte getAndAddRelease(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddByteRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndAddRelease(byte value) {
return UNSAFE.getAndAddByteRelease(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseOr(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrByte(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseOr(byte value) {
return UNSAFE.getAndBitwiseOrByte(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseOrRelease(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrByteRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseOrRelease(byte value) {
return UNSAFE.getAndBitwiseOrByteRelease(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseOrAcquire(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrByteAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseOrAcquire(byte value) {
return UNSAFE.getAndBitwiseOrByteAcquire(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseAnd(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndByte(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseAnd(byte value) {
return UNSAFE.getAndBitwiseAndByte(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseAndRelease(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndByteRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseAndRelease(byte value) {
return UNSAFE.getAndBitwiseAndByteRelease(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseAndAcquire(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndByteAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseAndAcquire(byte value) {
return UNSAFE.getAndBitwiseAndByteAcquire(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseXor(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorByte(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseXor(byte value) {
return UNSAFE.getAndBitwiseXorByte(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseXorRelease(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorByteRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseXorRelease(byte value) {
return UNSAFE.getAndBitwiseXorByteRelease(base, fieldOffset, value);
}
@ForceInline
static byte getAndBitwiseXorAcquire(VarHandle ob, byte value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorByteAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public byte getAndBitwiseXorAcquire(byte value) {
return UNSAFE.getAndBitwiseXorByteAcquire(base, fieldOffset, value);
}
static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, byte.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 = byte[].class.describeConstable();
if (!arrayTypeRef.isPresent())
return Optional.empty();
return Optional.of(VarHandleDesc.ofArray(arrayTypeRef.get()));
}
@Override
final MethodType accessModeTypeUncached(AccessType at) {
return at.accessModeType(byte[].class, byte.class, int.class);
}
@ForceInline
static byte get(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return array[index];
}
// @Override
public byte get(Object oarray, int index) {
byte[] array = (byte[]) oarray;
return array[index];
}
@ForceInline
static void set(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
array[index] = value;
}
// @Override
public void set(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
array[index] = value;
}
@ForceInline
static byte getVolatile(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getByteVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public byte getVolatile(Object oarray, int index) {
byte[] array = (byte[]) oarray;
return UNSAFE.getByteVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setVolatile(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
UNSAFE.putByteVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setVolatile(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
UNSAFE.putByteVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getOpaque(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getByteOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public byte getOpaque(Object oarray, int index) {
byte[] array = (byte[]) oarray;
return UNSAFE.getByteOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setOpaque(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
UNSAFE.putByteOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setOpaque(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
UNSAFE.putByteOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAcquire(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public byte getAcquire(Object oarray, int index) {
byte[] array = (byte[]) oarray;
return UNSAFE.getByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setRelease(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
UNSAFE.putByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setRelease(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
UNSAFE.putByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndSetByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean compareAndSet(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndSetByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static byte compareAndExchange(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndExchangeByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public byte compareAndExchange(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndExchangeByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static byte compareAndExchangeAcquire(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndExchangeByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public byte compareAndExchangeAcquire(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndExchangeByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static byte compareAndExchangeRelease(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndExchangeByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public byte compareAndExchangeRelease(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.compareAndExchangeByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetBytePlain(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetBytePlain(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, Object oarray, int index, byte expected, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(Object oarray, int index, byte expected, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.weakCompareAndSetByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static byte getAndSet(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndSetByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndSet(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndSetByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndSetAcquire(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndSetByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndSetAcquire(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndSetByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndSetRelease(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndSetByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndSetRelease(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndSetByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndAdd(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndAddByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndAdd(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndAddByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndAddAcquire(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndAddByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndAddAcquire(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndAddByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndAddRelease(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndAddByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndAddRelease(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndAddByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseOr(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseOrByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseOr(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseOrByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseOrRelease(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseOrByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseOrRelease(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseOrByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseOrAcquire(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseOrByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseOrAcquire(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseOrByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseAnd(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseAndByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseAnd(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseAndByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseAndRelease(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseAndByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseAndRelease(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseAndByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseAndAcquire(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseAndByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseAndAcquire(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseAndByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseXor(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseXorByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseXor(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseXorByte(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseXorRelease(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseXorByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseXorRelease(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseXorByteRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static byte getAndBitwiseXorAcquire(VarHandle ob, Object oarray, int index, byte value) {
Array handle = (Array)ob;
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseXorByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public byte getAndBitwiseXorAcquire(Object oarray, int index, byte value) {
byte[] array = (byte[]) oarray;
return UNSAFE.getAndBitwiseXorByteAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
static final VarForm FORM = new VarForm(Array.class, byte[].class, byte.class, int.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy