java.lang.invoke.VarHandleChars 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 VarHandleChars {
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, char.class);
}
@Override
public Optional describeConstable() {
var receiverTypeRef = receiverType.describeConstable();
var fieldTypeRef = char.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, char.class).getName();
return Optional.of(VarHandleDesc.ofField(receiverTypeRef.get(), name, fieldTypeRef.get()));
}
@ForceInline
static char get(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public char get(Object holder) {
return UNSAFE.getChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static char getVolatile(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getCharVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public char getVolatile(Object holder) {
return UNSAFE.getCharVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static char getOpaque(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getCharOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public char getOpaque(Object holder) {
return UNSAFE.getCharOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
@ForceInline
static char getAcquire(VarHandle ob, Object holder) {
FieldInstanceReadOnly handle = (FieldInstanceReadOnly)ob;
return UNSAFE.getCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset);
}
// @Override
public char getAcquire(Object holder) {
return UNSAFE.getCharAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset);
}
static final VarForm FORM = new VarForm(FieldInstanceReadOnly.class, Object.class, char.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, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void set(Object holder, char value) {
UNSAFE.putChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setVolatile(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putCharVolatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setVolatile(Object holder, char value) {
UNSAFE.putCharVolatile(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setOpaque(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putCharOpaque(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setOpaque(Object holder, char value) {
UNSAFE.putCharOpaque(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static void setRelease(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
UNSAFE.putCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public void setRelease(Object holder, char value) {
UNSAFE.putCharRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndSetChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean compareAndSet(Object holder, char expected, char value) {
return UNSAFE.compareAndSetChar(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static char compareAndExchange(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public char compareAndExchange(Object holder, char expected, char value) {
return UNSAFE.compareAndExchangeChar(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static char compareAndExchangeAcquire(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public char compareAndExchangeAcquire(Object holder, char expected, char value) {
return UNSAFE.compareAndExchangeCharAcquire(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static char compareAndExchangeRelease(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.compareAndExchangeCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public char compareAndExchangeRelease(Object holder, char expected, char value) {
return UNSAFE.compareAndExchangeCharRelease(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetCharPlain(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(Object holder, char expected, char value) {
return UNSAFE.weakCompareAndSetCharPlain(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(Object holder, char expected, char value) {
return UNSAFE.weakCompareAndSetChar(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(Object holder, char expected, char value) {
return UNSAFE.weakCompareAndSetCharAcquire(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, Object holder, char expected, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.weakCompareAndSetCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(Object holder, char expected, char value) {
return UNSAFE.weakCompareAndSetCharRelease(Objects.requireNonNull(receiverType.cast(holder)),
fieldOffset,
expected,
value);
}
@ForceInline
static char getAndSet(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndSet(Object holder, char value) {
return UNSAFE.getAndSetChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static char getAndSetAcquire(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndSetAcquire(Object holder, char value) {
return UNSAFE.getAndSetCharAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static char getAndSetRelease(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndSetCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndSetRelease(Object holder, char value) {
return UNSAFE.getAndSetCharRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset,
value);
}
@ForceInline
static char getAndAdd(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndAdd(Object holder, char value) {
return UNSAFE.getAndAddChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndAddAcquire(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndAddAcquire(Object holder, char value) {
return UNSAFE.getAndAddCharAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndAddRelease(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndAddCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndAddRelease(Object holder, char value) {
return UNSAFE.getAndAddCharRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseOr(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseOr(Object holder, char value) {
return UNSAFE.getAndBitwiseOrChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseOrRelease(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseOrRelease(Object holder, char value) {
return UNSAFE.getAndBitwiseOrCharRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseOrAcquire(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseOrCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseOrAcquire(Object holder, char value) {
return UNSAFE.getAndBitwiseOrCharAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseAnd(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseAnd(Object holder, char value) {
return UNSAFE.getAndBitwiseAndChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseAndRelease(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseAndRelease(Object holder, char value) {
return UNSAFE.getAndBitwiseAndCharRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseAndAcquire(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseAndCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseAndAcquire(Object holder, char value) {
return UNSAFE.getAndBitwiseAndCharAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseXor(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorChar(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseXor(Object holder, char value) {
return UNSAFE.getAndBitwiseXorChar(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseXorRelease(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorCharRelease(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseXorRelease(Object holder, char value) {
return UNSAFE.getAndBitwiseXorCharRelease(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
@ForceInline
static char getAndBitwiseXorAcquire(VarHandle ob, Object holder, char value) {
FieldInstanceReadWrite handle = (FieldInstanceReadWrite)ob;
return UNSAFE.getAndBitwiseXorCharAcquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseXorAcquire(Object holder, char value) {
return UNSAFE.getAndBitwiseXorCharAcquire(Objects.requireNonNull(receiverType.cast(holder)), fieldOffset, value);
}
static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, char.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 = char.class.describeConstable();
if (!fieldTypeRef.isPresent())
return Optional.empty();
// Reflect on this VarHandle to extract the field name
var staticField = VarHandles.getStaticFieldFromBaseAndOffset(
base, fieldOffset, char.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, char.class);
}
@ForceInline
static char get(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getChar(handle.base,
handle.fieldOffset);
}
// @Override
public char get() {
return UNSAFE.getChar(base, fieldOffset);
}
@ForceInline
static char getVolatile(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getCharVolatile(handle.base,
handle.fieldOffset);
}
// @Override
public char getVolatile() {
return UNSAFE.getCharVolatile(base, fieldOffset);
}
@ForceInline
static char getOpaque(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getCharOpaque(handle.base,
handle.fieldOffset);
}
// @Override
public char getOpaque() {
return UNSAFE.getCharOpaque(base, fieldOffset);
}
@ForceInline
static char getAcquire(VarHandle ob) {
FieldStaticReadOnly handle = (FieldStaticReadOnly)ob;
return UNSAFE.getCharAcquire(handle.base,
handle.fieldOffset);
}
// @Override
public char getAcquire() {
return UNSAFE.getCharAcquire(base, fieldOffset);
}
static final VarForm FORM = new VarForm(FieldStaticReadOnly.class, null, char.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, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putChar(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void set(char value) {
UNSAFE.putChar(base, fieldOffset, value);
}
@ForceInline
static void setVolatile(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putCharVolatile(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setVolatile(char value) {
UNSAFE.putCharVolatile(base, fieldOffset, value);
}
@ForceInline
static void setOpaque(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putCharOpaque(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setOpaque(char value) {
UNSAFE.putCharOpaque(base, fieldOffset, value);
}
@ForceInline
static void setRelease(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
UNSAFE.putCharRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public void setRelease(char value) {
UNSAFE.putCharRelease(base, fieldOffset, value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndSetChar(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean compareAndSet(char expected, char value) {
return UNSAFE.compareAndSetChar(base, fieldOffset,
expected,
value);
}
@ForceInline
static char compareAndExchange(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeChar(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public char compareAndExchange(char expected, char value) {
return UNSAFE.compareAndExchangeChar(base, fieldOffset,
expected,
value);
}
@ForceInline
static char compareAndExchangeAcquire(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeCharAcquire(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public char compareAndExchangeAcquire(char expected, char value) {
return UNSAFE.compareAndExchangeCharAcquire(base, fieldOffset,
expected,
value);
}
@ForceInline
static char compareAndExchangeRelease(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.compareAndExchangeCharRelease(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public char compareAndExchangeRelease(char expected, char value) {
return UNSAFE.compareAndExchangeCharRelease(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetCharPlain(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(char expected, char value) {
return UNSAFE.weakCompareAndSetCharPlain(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetChar(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(char expected, char value) {
return UNSAFE.weakCompareAndSetChar(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetCharAcquire(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(char expected, char value) {
return UNSAFE.weakCompareAndSetCharAcquire(base, fieldOffset,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, char expected, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.weakCompareAndSetCharRelease(handle.base,
handle.fieldOffset,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(char expected, char value) {
return UNSAFE.weakCompareAndSetCharRelease(base, fieldOffset,
expected,
value);
}
@ForceInline
static char getAndSet(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetChar(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndSet(char value) {
return UNSAFE.getAndSetChar(base, fieldOffset, value);
}
@ForceInline
static char getAndSetAcquire(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetCharAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndSetAcquire(char value) {
return UNSAFE.getAndSetCharAcquire(base, fieldOffset, value);
}
@ForceInline
static char getAndSetRelease(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndSetCharRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndSetRelease(char value) {
return UNSAFE.getAndSetCharRelease(base, fieldOffset, value);
}
@ForceInline
static char getAndAdd(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddChar(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndAdd(char value) {
return UNSAFE.getAndAddChar(base, fieldOffset, value);
}
@ForceInline
static char getAndAddAcquire(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddCharAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndAddAcquire(char value) {
return UNSAFE.getAndAddCharAcquire(base, fieldOffset, value);
}
@ForceInline
static char getAndAddRelease(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndAddCharRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndAddRelease(char value) {
return UNSAFE.getAndAddCharRelease(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseOr(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrChar(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseOr(char value) {
return UNSAFE.getAndBitwiseOrChar(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseOrRelease(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrCharRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseOrRelease(char value) {
return UNSAFE.getAndBitwiseOrCharRelease(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseOrAcquire(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseOrCharAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseOrAcquire(char value) {
return UNSAFE.getAndBitwiseOrCharAcquire(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseAnd(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndChar(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseAnd(char value) {
return UNSAFE.getAndBitwiseAndChar(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseAndRelease(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndCharRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseAndRelease(char value) {
return UNSAFE.getAndBitwiseAndCharRelease(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseAndAcquire(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseAndCharAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseAndAcquire(char value) {
return UNSAFE.getAndBitwiseAndCharAcquire(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseXor(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorChar(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseXor(char value) {
return UNSAFE.getAndBitwiseXorChar(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseXorRelease(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorCharRelease(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseXorRelease(char value) {
return UNSAFE.getAndBitwiseXorCharRelease(base, fieldOffset, value);
}
@ForceInline
static char getAndBitwiseXorAcquire(VarHandle ob, char value) {
FieldStaticReadWrite handle = (FieldStaticReadWrite)ob;
return UNSAFE.getAndBitwiseXorCharAcquire(handle.base,
handle.fieldOffset,
value);
}
// @Override
public char getAndBitwiseXorAcquire(char value) {
return UNSAFE.getAndBitwiseXorCharAcquire(base, fieldOffset, value);
}
static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, char.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 = char[].class.describeConstable();
if (!arrayTypeRef.isPresent())
return Optional.empty();
return Optional.of(VarHandleDesc.ofArray(arrayTypeRef.get()));
}
@Override
final MethodType accessModeTypeUncached(AccessType at) {
return at.accessModeType(char[].class, char.class, int.class);
}
@ForceInline
static char get(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return array[index];
}
// @Override
public char get(Object oarray, int index) {
char[] array = (char[]) oarray;
return array[index];
}
@ForceInline
static void set(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
array[index] = value;
}
// @Override
public void set(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
array[index] = value;
}
@ForceInline
static char getVolatile(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getCharVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public char getVolatile(Object oarray, int index) {
char[] array = (char[]) oarray;
return UNSAFE.getCharVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setVolatile(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
UNSAFE.putCharVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setVolatile(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
UNSAFE.putCharVolatile(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getOpaque(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getCharOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public char getOpaque(Object oarray, int index) {
char[] array = (char[]) oarray;
return UNSAFE.getCharOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setOpaque(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
UNSAFE.putCharOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setOpaque(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
UNSAFE.putCharOpaque(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAcquire(VarHandle ob, Object oarray, int index) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase);
}
// @Override
public char getAcquire(Object oarray, int index) {
char[] array = (char[]) oarray;
return UNSAFE.getCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase);
}
@ForceInline
static void setRelease(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
UNSAFE.putCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public void setRelease(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
UNSAFE.putCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static boolean compareAndSet(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.compareAndSetChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean compareAndSet(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.compareAndSetChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static char compareAndExchange(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.compareAndExchangeChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public char compareAndExchange(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.compareAndExchangeChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static char compareAndExchangeAcquire(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.compareAndExchangeCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public char compareAndExchangeAcquire(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.compareAndExchangeCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static char compareAndExchangeRelease(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.compareAndExchangeCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public char compareAndExchangeRelease(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.compareAndExchangeCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetPlain(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetCharPlain(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetPlain(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetCharPlain(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSet(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSet(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetAcquire(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetAcquire(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static boolean weakCompareAndSetRelease(VarHandle ob, Object oarray, int index, char expected, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
expected,
value);
}
// @Override
public boolean weakCompareAndSetRelease(Object oarray, int index, char expected, char value) {
char[] array = (char[]) oarray;
return UNSAFE.weakCompareAndSetCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
expected,
value);
}
@ForceInline
static char getAndSet(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndSetChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndSet(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndSetChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndSetAcquire(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndSetCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndSetAcquire(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndSetCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndSetRelease(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndSetCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndSetRelease(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndSetCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndAdd(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndAddChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndAdd(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndAddChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndAddAcquire(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndAddCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndAddAcquire(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndAddCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndAddRelease(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndAddCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndAddRelease(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndAddCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseOr(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseOrChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseOr(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseOrChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseOrRelease(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseOrCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseOrRelease(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseOrCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseOrAcquire(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseOrCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseOrAcquire(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseOrCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseAnd(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseAndChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseAnd(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseAndChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseAndRelease(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseAndCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseAndRelease(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseAndCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseAndAcquire(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseAndCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseAndAcquire(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseAndCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseXor(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseXorChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseXor(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseXorChar(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseXorRelease(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseXorCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseXorRelease(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseXorCharRelease(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
@ForceInline
static char getAndBitwiseXorAcquire(VarHandle ob, Object oarray, int index, char value) {
Array handle = (Array)ob;
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseXorCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
value);
}
// @Override
public char getAndBitwiseXorAcquire(Object oarray, int index, char value) {
char[] array = (char[]) oarray;
return UNSAFE.getAndBitwiseXorCharAcquire(array,
(((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << ashift) + abase,
value);
}
static final VarForm FORM = new VarForm(Array.class, char[].class, char.class, int.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy