com.oracle.truffle.nfi.backend.libffi.DefaultConversionGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.truffle.nfi.backend.libffi;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.interop.UnsupportedMessageException;
import com.oracle.truffle.api.interop.UnsupportedTypeException;
import com.oracle.truffle.api.library.DynamicDispatchLibrary;
import com.oracle.truffle.api.library.LibraryExport;
import com.oracle.truffle.api.library.LibraryFactory;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.profiles.BranchProfile;
import com.oracle.truffle.nfi.backend.libffi.SerializeArgumentLibrary.DefaultConversion;
import com.oracle.truffle.nfi.backend.libffi.SerializeArgumentLibrary.DefaultConversion.PutPointer;
import com.oracle.truffle.nfi.backend.libffi.SerializeArgumentLibrary.DefaultConversion.PutString;
import java.util.concurrent.locks.Lock;
@GeneratedBy(DefaultConversion.class)
final class DefaultConversionGen {
private static final LibraryFactory DYNAMIC_DISPATCH_LIBRARY_ = LibraryFactory.resolve(DynamicDispatchLibrary.class);
private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);
static {
LibraryExport.register(DefaultConversion.class, new SerializeArgumentLibraryExports());
}
private DefaultConversionGen() {
}
@GeneratedBy(DefaultConversion.class)
private static final class SerializeArgumentLibraryExports extends LibraryExport {
private SerializeArgumentLibraryExports() {
super(SerializeArgumentLibrary.class, Object.class, true, false, 0);
}
@Override
protected SerializeArgumentLibrary createUncached(Object receiver) {
SerializeArgumentLibrary uncached = new Uncached(receiver);
return uncached;
}
@Override
protected SerializeArgumentLibrary createCached(Object receiver) {
return new Cached(receiver);
}
@GeneratedBy(DefaultConversion.class)
private static final class Cached extends SerializeArgumentLibrary {
@Child private InteropLibrary receiverInteropLibrary_;
@Child private DynamicDispatchLibrary dynamicDispatch_;
private final Class> dynamicDispatchTarget_;
@CompilationFinal private volatile int state_0_;
@CompilationFinal private volatile int exclude_;
@CompilationFinal private BranchProfile exception;
protected Cached(Object receiver) {
this.receiverInteropLibrary_ = super.insert(INTEROP_LIBRARY_.create((receiver)));
this.dynamicDispatch_ = insert(DYNAMIC_DISPATCH_LIBRARY_.create(receiver));
this.dynamicDispatchTarget_ = DYNAMIC_DISPATCH_LIBRARY_.getUncached(receiver).dispatch(receiver);
}
@Override
public boolean accepts(Object receiver) {
if (!(dynamicDispatch_.accepts(receiver) && dynamicDispatch_.dispatch(receiver) == dynamicDispatchTarget_)) {
return false;
} else if (!this.receiverInteropLibrary_.accepts((receiver))) {
return false;
} else {
return true;
}
}
@Override
public void putPointer(Object arg0Value, NativeArgumentBuffer arg1Value, int arg2Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b111) != 0 /* is-state_0 putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) || putNull(Object, NativeArgumentBuffer, int, InteropLibrary) || putGeneric(Object, NativeArgumentBuffer, int, InteropLibrary, BranchProfile) */) {
if ((state_0 & 0b1) != 0 /* is-state_0 putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
InteropLibrary putPointer_putPointer_interop__ = this.receiverInteropLibrary_;
if ((putPointer_putPointer_interop__.isPointer(arg0Value))) {
try {
PutPointer.putPointer(arg0Value, arg1Value, arg2Value, putPointer_putPointer_interop__);
return;
} catch (UnsupportedMessageException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Lock lock = getLock();
lock.lock();
try {
this.exclude_ = this.exclude_ | 0b1 /* add-exclude putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */;
this.state_0_ = this.state_0_ & 0xfffffffe /* remove-state_0 putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */;
} finally {
lock.unlock();
}
putPointerAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
}
}
}
if ((state_0 & 0b10) != 0 /* is-state_0 putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
InteropLibrary putPointer_putNull_interop__ = this.receiverInteropLibrary_;
if ((!(putPointer_putNull_interop__.isPointer(arg0Value))) && (putPointer_putNull_interop__.isNull(arg0Value))) {
PutPointer.putNull(arg0Value, arg1Value, arg2Value, putPointer_putNull_interop__);
return;
}
}
}
if ((state_0 & 0b100) != 0 /* is-state_0 putGeneric(Object, NativeArgumentBuffer, int, InteropLibrary, BranchProfile) */) {
{
InteropLibrary putPointer_putGeneric_interop__ = this.receiverInteropLibrary_;
PutPointer.putGeneric(arg0Value, arg1Value, arg2Value, putPointer_putGeneric_interop__, this.exception);
return;
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putPointerAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
private void putPointerAndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value, int arg2Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
int exclude = this.exclude_;
{
InteropLibrary putPointer_putPointer_interop__ = null;
if (((exclude & 0b1)) == 0 /* is-not-exclude putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
putPointer_putPointer_interop__ = this.receiverInteropLibrary_;
if ((putPointer_putPointer_interop__.isPointer(arg0Value))) {
this.state_0_ = state_0 = state_0 | 0b1 /* add-state_0 putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */;
try {
lock.unlock();
hasLock = false;
PutPointer.putPointer(arg0Value, arg1Value, arg2Value, putPointer_putPointer_interop__);
return;
} catch (UnsupportedMessageException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
lock.lock();
try {
this.exclude_ = this.exclude_ | 0b1 /* add-exclude putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */;
this.state_0_ = this.state_0_ & 0xfffffffe /* remove-state_0 putPointer(Object, NativeArgumentBuffer, int, InteropLibrary) */;
} finally {
lock.unlock();
}
putPointerAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
}
}
}
}
{
InteropLibrary putPointer_putNull_interop__ = null;
if (((exclude & 0b10)) == 0 /* is-not-exclude putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
putPointer_putNull_interop__ = this.receiverInteropLibrary_;
if ((!(putPointer_putNull_interop__.isPointer(arg0Value))) && (putPointer_putNull_interop__.isNull(arg0Value))) {
this.state_0_ = state_0 = state_0 | 0b10 /* add-state_0 putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */;
lock.unlock();
hasLock = false;
PutPointer.putNull(arg0Value, arg1Value, arg2Value, putPointer_putNull_interop__);
return;
}
}
}
}
{
InteropLibrary putPointer_putGeneric_interop__ = null;
putPointer_putGeneric_interop__ = this.receiverInteropLibrary_;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
this.exclude_ = exclude = exclude | 0b11 /* add-exclude putPointer(Object, NativeArgumentBuffer, int, InteropLibrary), putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */;
state_0 = state_0 & 0xfffffffc /* remove-state_0 putPointer(Object, NativeArgumentBuffer, int, InteropLibrary), putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */;
this.state_0_ = state_0 = state_0 | 0b100 /* add-state_0 putGeneric(Object, NativeArgumentBuffer, int, InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
PutPointer.putGeneric(arg0Value, arg1Value, arg2Value, putPointer_putGeneric_interop__, this.exception);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b111) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b111) & ((state_0 & 0b111) - 1)) == 0 /* is-single-state_0 */) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
@Override
public void putString(Object arg0Value, NativeArgumentBuffer arg1Value, int arg2Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b111000) != 0 /* is-state_0 putString(Object, NativeArgumentBuffer, int, InteropLibrary) || putNull(Object, NativeArgumentBuffer, int, InteropLibrary) || putGeneric(Object, NativeArgumentBuffer, int, InteropLibrary, BranchProfile) */) {
if ((state_0 & 0b1000) != 0 /* is-state_0 putString(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
InteropLibrary putString_putString_interop__ = this.receiverInteropLibrary_;
if ((putString_putString_interop__.isString(arg0Value))) {
try {
PutString.putString(arg0Value, arg1Value, arg2Value, putString_putString_interop__);
return;
} catch (UnsupportedMessageException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Lock lock = getLock();
lock.lock();
try {
this.exclude_ = this.exclude_ | 0b100 /* add-exclude putString(Object, NativeArgumentBuffer, int, InteropLibrary) */;
this.state_0_ = this.state_0_ & 0xfffffff7 /* remove-state_0 putString(Object, NativeArgumentBuffer, int, InteropLibrary) */;
} finally {
lock.unlock();
}
putStringAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
}
}
}
if ((state_0 & 0b10000) != 0 /* is-state_0 putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
InteropLibrary putString_putNull_interop__ = this.receiverInteropLibrary_;
if ((!(putString_putNull_interop__.isString(arg0Value))) && (putString_putNull_interop__.isNull(arg0Value))) {
PutString.putNull(arg0Value, arg1Value, arg2Value, putString_putNull_interop__);
return;
}
}
}
if ((state_0 & 0b100000) != 0 /* is-state_0 putGeneric(Object, NativeArgumentBuffer, int, InteropLibrary, BranchProfile) */) {
{
InteropLibrary putString_putGeneric_interop__ = this.receiverInteropLibrary_;
PutString.putGeneric(arg0Value, arg1Value, arg2Value, putString_putGeneric_interop__, this.exception);
return;
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putStringAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
private void putStringAndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value, int arg2Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
int exclude = this.exclude_;
{
InteropLibrary putString_putString_interop__ = null;
if (((exclude & 0b100)) == 0 /* is-not-exclude putString(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
putString_putString_interop__ = this.receiverInteropLibrary_;
if ((putString_putString_interop__.isString(arg0Value))) {
this.state_0_ = state_0 = state_0 | 0b1000 /* add-state_0 putString(Object, NativeArgumentBuffer, int, InteropLibrary) */;
try {
lock.unlock();
hasLock = false;
PutString.putString(arg0Value, arg1Value, arg2Value, putString_putString_interop__);
return;
} catch (UnsupportedMessageException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
lock.lock();
try {
this.exclude_ = this.exclude_ | 0b100 /* add-exclude putString(Object, NativeArgumentBuffer, int, InteropLibrary) */;
this.state_0_ = this.state_0_ & 0xfffffff7 /* remove-state_0 putString(Object, NativeArgumentBuffer, int, InteropLibrary) */;
} finally {
lock.unlock();
}
putStringAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
}
}
}
}
{
InteropLibrary putString_putNull_interop__ = null;
if (((exclude & 0b1000)) == 0 /* is-not-exclude putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */) {
{
putString_putNull_interop__ = this.receiverInteropLibrary_;
if ((!(putString_putNull_interop__.isString(arg0Value))) && (putString_putNull_interop__.isNull(arg0Value))) {
this.state_0_ = state_0 = state_0 | 0b10000 /* add-state_0 putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */;
lock.unlock();
hasLock = false;
PutString.putNull(arg0Value, arg1Value, arg2Value, putString_putNull_interop__);
return;
}
}
}
}
{
InteropLibrary putString_putGeneric_interop__ = null;
putString_putGeneric_interop__ = this.receiverInteropLibrary_;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
this.exclude_ = exclude = exclude | 0b1100 /* add-exclude putString(Object, NativeArgumentBuffer, int, InteropLibrary), putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */;
state_0 = state_0 & 0xffffffe7 /* remove-state_0 putString(Object, NativeArgumentBuffer, int, InteropLibrary), putNull(Object, NativeArgumentBuffer, int, InteropLibrary) */;
this.state_0_ = state_0 = state_0 | 0b100000 /* add-state_0 putGeneric(Object, NativeArgumentBuffer, int, InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
PutString.putGeneric(arg0Value, arg1Value, arg2Value, putString_putGeneric_interop__, this.exception);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putByte(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b1000000) != 0 /* is-state_0 putByte(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putByteNode__putByte_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putByte(arg0Value, arg1Value, this.exception, putByteNode__putByte_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putByteNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putByteNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putByteNode__putByte_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putByteNode__putByte_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b1000000 /* add-state_0 putByte(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putByte(arg0Value, arg1Value, this.exception, putByteNode__putByte_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putUByte(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b10000000) != 0 /* is-state_0 putUByte(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putUByteNode__putUByte_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putUByte(arg0Value, arg1Value, this.exception, putUByteNode__putUByte_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putUByteNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putUByteNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putUByteNode__putUByte_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putUByteNode__putUByte_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b10000000 /* add-state_0 putUByte(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putUByte(arg0Value, arg1Value, this.exception, putUByteNode__putUByte_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putShort(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b100000000) != 0 /* is-state_0 putShort(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putShortNode__putShort_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putShort(arg0Value, arg1Value, this.exception, putShortNode__putShort_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putShortNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putShortNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putShortNode__putShort_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putShortNode__putShort_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b100000000 /* add-state_0 putShort(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putShort(arg0Value, arg1Value, this.exception, putShortNode__putShort_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putUShort(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b1000000000) != 0 /* is-state_0 putUShort(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putUShortNode__putUShort_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putUShort(arg0Value, arg1Value, this.exception, putUShortNode__putUShort_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putUShortNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putUShortNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putUShortNode__putUShort_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putUShortNode__putUShort_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b1000000000 /* add-state_0 putUShort(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putUShort(arg0Value, arg1Value, this.exception, putUShortNode__putUShort_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putInt(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b10000000000) != 0 /* is-state_0 putInt(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putIntNode__putInt_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putInt(arg0Value, arg1Value, this.exception, putIntNode__putInt_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putIntNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putIntNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putIntNode__putInt_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putIntNode__putInt_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b10000000000 /* add-state_0 putInt(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putInt(arg0Value, arg1Value, this.exception, putIntNode__putInt_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putUInt(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b100000000000) != 0 /* is-state_0 putUInt(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putUIntNode__putUInt_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putUInt(arg0Value, arg1Value, this.exception, putUIntNode__putUInt_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putUIntNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putUIntNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putUIntNode__putUInt_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putUIntNode__putUInt_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b100000000000 /* add-state_0 putUInt(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putUInt(arg0Value, arg1Value, this.exception, putUIntNode__putUInt_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putLong(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b1000000000000) != 0 /* is-state_0 putLong(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putLongNode__putLong_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putLong(arg0Value, arg1Value, this.exception, putLongNode__putLong_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putLongNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putLongNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putLongNode__putLong_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putLongNode__putLong_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b1000000000000 /* add-state_0 putLong(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putLong(arg0Value, arg1Value, this.exception, putLongNode__putLong_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putULong(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b1000000000000) != 0 /* is-state_0 putLong(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putLongNode__putLong_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putLong(arg0Value, arg1Value, this.exception, putLongNode__putLong_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putLongNode_AndSpecialize(arg0Value, arg1Value);
return;
}
@Override
public void putFloat(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b10000000000000) != 0 /* is-state_0 putFloat(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putFloatNode__putFloat_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putFloat(arg0Value, arg1Value, this.exception, putFloatNode__putFloat_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putFloatNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putFloatNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putFloatNode__putFloat_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putFloatNode__putFloat_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b10000000000000 /* add-state_0 putFloat(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putFloat(arg0Value, arg1Value, this.exception, putFloatNode__putFloat_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public void putDouble(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
assert dynamicDispatch_.accepts(arg0Value) && dynamicDispatch_.dispatch(arg0Value) == dynamicDispatchTarget_ : "Invalid library usage. Library does not accept given receiver.";
assert getRootNode() != null : "Invalid libray usage. Cached library must be adopted by a RootNode before it is executed.";
int state_0 = this.state_0_;
if ((state_0 & 0b100000000000000) != 0 /* is-state_0 putDouble(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */) {
{
InteropLibrary putDoubleNode__putDouble_interop__ = this.receiverInteropLibrary_;
DefaultConversion.putDouble(arg0Value, arg1Value, this.exception, putDoubleNode__putDouble_interop__);
return;
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
putDoubleNode_AndSpecialize(arg0Value, arg1Value);
return;
}
private void putDoubleNode_AndSpecialize(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
try {
int state_0 = this.state_0_;
{
InteropLibrary putDoubleNode__putDouble_interop__ = null;
this.exception = this.exception == null ? ((BranchProfile.create())) : this.exception;
putDoubleNode__putDouble_interop__ = this.receiverInteropLibrary_;
this.state_0_ = state_0 = state_0 | 0b100000000000000 /* add-state_0 putDouble(Object, NativeArgumentBuffer, BranchProfile, InteropLibrary) */;
lock.unlock();
hasLock = false;
DefaultConversion.putDouble(arg0Value, arg1Value, this.exception, putDoubleNode__putDouble_interop__);
return;
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
}
@GeneratedBy(DefaultConversion.class)
private static final class Uncached extends SerializeArgumentLibrary {
@Child private DynamicDispatchLibrary dynamicDispatch_;
private final Class> dynamicDispatchTarget_;
protected Uncached(Object receiver) {
this.dynamicDispatch_ = DYNAMIC_DISPATCH_LIBRARY_.getUncached(receiver);
this.dynamicDispatchTarget_ = dynamicDispatch_.dispatch(receiver);
}
@Override
@TruffleBoundary
public boolean accepts(Object receiver) {
return dynamicDispatch_.accepts(receiver) && dynamicDispatch_.dispatch(receiver) == dynamicDispatchTarget_;
}
@Override
public boolean isAdoptable() {
return false;
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@TruffleBoundary
@Override
public void putPointer(Object arg0Value, NativeArgumentBuffer arg1Value, int arg2Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
PutPointer.putGeneric(arg0Value, arg1Value, arg2Value, INTEROP_LIBRARY_.getUncached((arg0Value)), (BranchProfile.getUncached()));
return;
}
@TruffleBoundary
@Override
public void putString(Object arg0Value, NativeArgumentBuffer arg1Value, int arg2Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
PutString.putGeneric(arg0Value, arg1Value, arg2Value, INTEROP_LIBRARY_.getUncached((arg0Value)), (BranchProfile.getUncached()));
return;
}
@TruffleBoundary
@Override
public void putByte(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putByte(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putUByte(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putUByte(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putShort(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putShort(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putUShort(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putUShort(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putInt(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putInt(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putUInt(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putUInt(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putLong(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putLong(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putULong(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putLong(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putFloat(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putFloat(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
@TruffleBoundary
@Override
public void putDouble(Object arg0Value, NativeArgumentBuffer arg1Value) throws UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value) : "Invalid library usage. Library does not accept given receiver.";
DefaultConversion.putDouble(arg0Value, arg1Value, (BranchProfile.getUncached()), INTEROP_LIBRARY_.getUncached((arg0Value)));
return;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy