java.lang.invoke.VarHandleInts 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 VarHandleInts {
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, int.class);
}
@Override
public Optional describeConstable() {
var receiverTypeRef = receiverType.describeConstable();
var fieldTypeRef = int.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, int.class).getName();
return Optional.of(VarHandleDesc.ofField(receiverTypeRef.get(), name, fieldTypeRef.get()));
}
@ForceInline
static int get(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public int get(Object holder) {
return UNSAFE.getInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static int getVolatile(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getIntVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public int getVolatile(Object holder) {
return UNSAFE.getIntVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static int getOpaque(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getIntOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public int getOpaque(Object holder) {
return UNSAFE.getIntOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static int getAcquire(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public int getAcquire(Object holder) {
return UNSAFE.getIntAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
static final VarForm FORM = new VarForm(FieldInstanceReadOnly.class, Object.class, int.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, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void set(Object holder, int value) {
UNSAFE.putInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setVolatile(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putIntVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setVolatile(Object holder, int value) {
UNSAFE.putIntVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setOpaque(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putIntOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setOpaque(Object holder, int value) {
UNSAFE.putIntOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setRelease(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setRelease(Object holder, int value) {
UNSAFE.putIntRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndSetInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean compareAndSet(Object holder, int expected, int value) {
return UNSAFE.compareAndSetInt(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static int compareAndExchange(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public int compareAndExchange(Object holder, int expected, int value) {
return UNSAFE.compareAndExchangeInt(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static int compareAndExchangeAcquire(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public int compareAndExchangeAcquire(Object holder, int expected, int value) {
return UNSAFE.compareAndExchangeIntAcquire(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static int compareAndExchangeRelease(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public int compareAndExchangeRelease(Object holder, int expected, int value) {
return UNSAFE.compareAndExchangeIntRelease(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetIntPlain(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(Object holder, int expected, int value) {
return UNSAFE.weakCompareAndSetIntPlain(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(Object holder, int expected, int value) {
return UNSAFE.weakCompareAndSetInt(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(Object holder, int expected, int value) {
return UNSAFE.weakCompareAndSetIntAcquire(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, Object holder, int expected, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(Object holder, int expected, int value) {
return UNSAFE.weakCompareAndSetIntRelease(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static int getAndSet(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndSet(Object holder, int value) {
return UNSAFE.getAndSetInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static int getAndSetAcquire(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndSetAcquire(Object holder, int value) {
return UNSAFE.getAndSetIntAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static int getAndSetRelease(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndSetRelease(Object holder, int value) {
return UNSAFE.getAndSetIntRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static int getAndAdd(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndAdd(Object holder, int value) {
return UNSAFE.getAndAddInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndAddAcquire(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndAddAcquire(Object holder, int value) {
return UNSAFE.getAndAddIntAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndAddRelease(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndAddRelease(Object holder, int value) {
return UNSAFE.getAndAddIntRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseOr(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseOr(Object holder, int value) {
return UNSAFE.getAndBitwiseOrInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseOrRelease(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseOrRelease(Object holder, int value) {
return UNSAFE.getAndBitwiseOrIntRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseOrAcquire(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseOrAcquire(Object holder, int value) {
return UNSAFE.getAndBitwiseOrIntAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseAnd(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseAnd(Object holder, int value) {
return UNSAFE.getAndBitwiseAndInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseAndRelease(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseAndRelease(Object holder, int value) {
return UNSAFE.getAndBitwiseAndIntRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseAndAcquire(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseAndAcquire(Object holder, int value) {
return UNSAFE.getAndBitwiseAndIntAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseXor(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorInt(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseXor(Object holder, int value) {
return UNSAFE.getAndBitwiseXorInt(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseXorRelease(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorIntRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseXorRelease(Object holder, int value) {
return UNSAFE.getAndBitwiseXorIntRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static int getAndBitwiseXorAcquire(VarHandle ob, Object holder, int value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorIntAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseXorAcquire(Object holder, int value) {
return UNSAFE.getAndBitwiseXorIntAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, int.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 = int.class.describeConstable();
if (!fieldTypeRef.isPresent())
return Optional.empty();
// Reflect on this VarHandle to extract the field name
var staticField = VarHandles.getStaticFieldFromBaseAndOffset(
base, fieldOffset, int.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, int.class);
}
@ForceInline
static int get(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getInt(handle.base,
handle.fieldOffset);
}
// @Override
public int get() {
return UNSAFE.getInt(base, fieldOffset);
}
@ForceInline
static int getVolatile(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getIntVolatile(handle.base,
handle.fieldOffset);
}
// @Override
public int getVolatile() {
return UNSAFE.getIntVolatile(base, fieldOffset);
}
@ForceInline
static int getOpaque(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getIntOpaque(handle.base,
handle.fieldOffset);
}
// @Override
public int getOpaque() {
return UNSAFE.getIntOpaque(base, fieldOffset);
}
@ForceInline
static int getAcquire(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getIntAcquire(handle.base,
handle.fieldOffset);
}
// @Override
public int getAcquire() {
return UNSAFE.getIntAcquire(base, fieldOffset);
}
static final VarForm FORM = new VarForm(FieldStaticReadOnly.class, null, int.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, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putInt(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void set(int value) {
UNSAFE.putInt(base, fieldOffset, value);
}
@ForceInline
static void setVolatile(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putIntVolatile(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setVolatile(int value) {
UNSAFE.putIntVolatile(base, fieldOffset, value);
}
@ForceInline
static void setOpaque(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putIntOpaque(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setOpaque(int value) {
UNSAFE.putIntOpaque(base, fieldOffset, value);
}
@ForceInline
static void setRelease(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putIntRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setRelease(int value) {
UNSAFE.putIntRelease(base, fieldOffset, value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndSetInt(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean compareAndSet(int expected, int value) {
return UNSAFE.compareAndSetInt(base, fieldOffset,
expected,
value);
}
@ForceInline
static int compareAndExchange(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeInt(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public int compareAndExchange(int expected, int value) {
return UNSAFE.compareAndExchangeInt(base, fieldOffset,
expected,
value);
}
@ForceInline
static int compareAndExchangeAcquire(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeIntAcquire(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public int compareAndExchangeAcquire(int expected, int value) {
return UNSAFE.compareAndExchangeIntAcquire(base, fieldOffset,
expected,
value);
}
@ForceInline
static int compareAndExchangeRelease(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeIntRelease(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public int compareAndExchangeRelease(int expected, int value) {
return UNSAFE.compareAndExchangeIntRelease(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetIntPlain(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(int expected, int value) {
return UNSAFE.weakCompareAndSetIntPlain(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetInt(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(int expected, int value) {
return UNSAFE.weakCompareAndSetInt(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetIntAcquire(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(int expected, int value) {
return UNSAFE.weakCompareAndSetIntAcquire(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, int expected, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetIntRelease(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(int expected, int value) {
return UNSAFE.weakCompareAndSetIntRelease(base, fieldOffset,
expected,
value);
}
@ForceInline
static int getAndSet(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetInt(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndSet(int value) {
return UNSAFE.getAndSetInt(base, fieldOffset, value);
}
@ForceInline
static int getAndSetAcquire(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetIntAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndSetAcquire(int value) {
return UNSAFE.getAndSetIntAcquire(base, fieldOffset, value);
}
@ForceInline
static int getAndSetRelease(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetIntRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndSetRelease(int value) {
return UNSAFE.getAndSetIntRelease(base, fieldOffset, value);
}
@ForceInline
static int getAndAdd(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddInt(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndAdd(int value) {
return UNSAFE.getAndAddInt(base, fieldOffset, value);
}
@ForceInline
static int getAndAddAcquire(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddIntAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndAddAcquire(int value) {
return UNSAFE.getAndAddIntAcquire(base, fieldOffset, value);
}
@ForceInline
static int getAndAddRelease(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddIntRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndAddRelease(int value) {
return UNSAFE.getAndAddIntRelease(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseOr(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrInt(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseOr(int value) {
return UNSAFE.getAndBitwiseOrInt(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseOrRelease(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrIntRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseOrRelease(int value) {
return UNSAFE.getAndBitwiseOrIntRelease(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseOrAcquire(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrIntAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseOrAcquire(int value) {
return UNSAFE.getAndBitwiseOrIntAcquire(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseAnd(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndInt(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseAnd(int value) {
return UNSAFE.getAndBitwiseAndInt(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseAndRelease(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndIntRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseAndRelease(int value) {
return UNSAFE.getAndBitwiseAndIntRelease(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseAndAcquire(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndIntAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseAndAcquire(int value) {
return UNSAFE.getAndBitwiseAndIntAcquire(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseXor(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorInt(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseXor(int value) {
return UNSAFE.getAndBitwiseXorInt(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseXorRelease(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorIntRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseXorRelease(int value) {
return UNSAFE.getAndBitwiseXorIntRelease(base, fieldOffset, value);
}
@ForceInline
static int getAndBitwiseXorAcquire(VarHandle ob, int value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorIntAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public int getAndBitwiseXorAcquire(int value) {
return UNSAFE.getAndBitwiseXorIntAcquire(base, fieldOffset, value);
}
static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, int.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 = int[].class.describeConstable();
if (!arrayTypeRef.isPresent())
return Optional.empty();
return Optional.of(VarHandleDesc.ofArray(arrayTypeRef.get()));
}
@Override
final MethodType accessModeTypeUncached(AccessType at) {
return at.accessModeType(int[].class, int.class, int.class);
}
@ForceInline
static int get(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return array[index];
}
// @Override
public int get(Object oarray, int index) {
int[] array = (int[]) oarray;
return array[index];
}
@ForceInline
static void set(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
array[index] = value;
}
// @Override
public void set(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
array[index] = value;
}
@ForceInline
static int getVolatile(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getIntVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public int getVolatile(Object oarray, int index) {
int[] array = (int[]) oarray;
return UNSAFE.getIntVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setVolatile(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
UNSAFE.putIntVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setVolatile(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
UNSAFE.putIntVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getOpaque(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getIntOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public int getOpaque(Object oarray, int index) {
int[] array = (int[]) oarray;
return UNSAFE.getIntOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setOpaque(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
UNSAFE.putIntOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setOpaque(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
UNSAFE.putIntOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAcquire(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public int getAcquire(Object oarray, int index) {
int[] array = (int[]) oarray;
return UNSAFE.getIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setRelease(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
UNSAFE.putIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setRelease(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
UNSAFE.putIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.compareAndSetInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean compareAndSet(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.compareAndSetInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static int compareAndExchange(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.compareAndExchangeInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public int compareAndExchange(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.compareAndExchangeInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static int compareAndExchangeAcquire(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.compareAndExchangeIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public int compareAndExchangeAcquire(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.compareAndExchangeIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static int compareAndExchangeRelease(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.compareAndExchangeIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public int compareAndExchangeRelease(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.compareAndExchangeIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetIntPlain(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetIntPlain(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, Object oarray, int index, int expected, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(Object oarray, int index, int expected, int value) {
int[] array = (int[]) oarray;
return UNSAFE.weakCompareAndSetIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static int getAndSet(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndSetInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndSet(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndSetInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndSetAcquire(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndSetIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndSetAcquire(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndSetIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndSetRelease(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndSetIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndSetRelease(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndSetIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndAdd(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndAddInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndAdd(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndAddInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndAddAcquire(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndAddIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndAddAcquire(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndAddIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndAddRelease(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndAddIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndAddRelease(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndAddIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseOr(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseOrInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseOr(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseOrInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseOrRelease(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseOrIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseOrRelease(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseOrIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseOrAcquire(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseOrIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseOrAcquire(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseOrIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseAnd(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseAndInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseAnd(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseAndInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseAndRelease(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseAndIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseAndRelease(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseAndIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseAndAcquire(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseAndIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseAndAcquire(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseAndIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseXor(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseXorInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseXor(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseXorInt(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseXorRelease(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseXorIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseXorRelease(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseXorIntRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static int getAndBitwiseXorAcquire(VarHandle ob, Object oarray, int index, int value) {
Array handle = (Array)ob;
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseXorIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public int getAndBitwiseXorAcquire(Object oarray, int index, int value) {
int[] array = (int[]) oarray;
return UNSAFE.getAndBitwiseXorIntAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
static final VarForm FORM = new VarForm(Array.class, int[].class, int.class, int.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy