com.oracle.truffle.polyglot.HostObjectMRForeignFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-api Show documentation
Show all versions of truffle-api Show documentation
Truffle is a multi-language framework for executing dynamic languages
that achieves high performance when combined with Graal.
// CheckStyle: start generated
package com.oracle.truffle.polyglot;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.polyglot.HostObjectMRForeign.ArrayGetSizeSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.ArrayHasSizeSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.BoxedCheckSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.ExecuteObjectSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.HasKeysSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.InvokeSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.IsExecutableObjectSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.IsInstantiableObjectSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.KeyInfoSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.KeysSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.NewSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.NullCheckSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.ReadSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.RemoveSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.UnboxSubNode;
import com.oracle.truffle.polyglot.HostObjectMRForeign.WriteSubNode;
import java.util.concurrent.locks.Lock;
@GeneratedBy(HostObjectMRForeign.class)
final class HostObjectMRForeignFactory {
@GeneratedBy(ExecuteObjectSubNode.class)
static final class ExecuteObjectSubNodeGen extends ExecuteObjectSubNode {
@CompilationFinal private int state_;
private ExecuteObjectSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, Object[]) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Object[]) {
Object[] arg1Value_ = (Object[]) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Object[]) {
Object[] arg1Value_ = (Object[]) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, Object[]) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static ExecuteObjectSubNode create() {
return new ExecuteObjectSubNodeGen();
}
}
@GeneratedBy(WriteSubNode.class)
static final class WriteSubNodeGen extends WriteSubNode {
@CompilationFinal private int state_;
private WriteSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, Number, Object) || accessWithTarget(HostObject, String, Object) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if ((state & 0b1) != 0 /* is-active accessWithTarget(HostObject, Number, Object) */ && arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_, arg2Value);
}
if ((state & 0b10) != 0 /* is-active accessWithTarget(HostObject, String, Object) */ && arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value, Object arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, Number, Object) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_, arg2Value);
}
if (arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
this.state_ = state = state | 0b10 /* add-active accessWithTarget(HostObject, String, Object) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
return NodeCost.MONOMORPHIC;
}
return NodeCost.POLYMORPHIC;
}
public static WriteSubNode create() {
return new WriteSubNodeGen();
}
}
@GeneratedBy(NewSubNode.class)
static final class NewSubNodeGen extends NewSubNode {
@CompilationFinal private int state_;
private NewSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, Object[]) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Object[]) {
Object[] arg1Value_ = (Object[]) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Object[]) {
Object[] arg1Value_ = (Object[]) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, Object[]) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static NewSubNode create() {
return new NewSubNodeGen();
}
}
@GeneratedBy(InvokeSubNode.class)
static final class InvokeSubNodeGen extends InvokeSubNode {
@CompilationFinal private int state_;
private InvokeSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, String, Object[]) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
if (arg2Value instanceof Object[]) {
Object[] arg2Value_ = (Object[]) arg2Value;
return accessWithTarget(arg0Value_, arg1Value_, arg2Value_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value, Object arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
if (arg2Value instanceof Object[]) {
Object[] arg2Value_ = (Object[]) arg2Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, String, Object[]) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_, arg2Value_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null, null}, arg0Value, arg1Value, arg2Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static InvokeSubNode create() {
return new InvokeSubNodeGen();
}
}
@GeneratedBy(ReadSubNode.class)
static final class ReadSubNodeGen extends ReadSubNode {
@CompilationFinal private int state_;
private ReadSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, Number) || accessWithTarget(HostObject, String) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if ((state & 0b1) != 0 /* is-active accessWithTarget(HostObject, Number) */ && arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
if ((state & 0b10) != 0 /* is-active accessWithTarget(HostObject, String) */ && arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, Number) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
if (arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
this.state_ = state = state | 0b10 /* add-active accessWithTarget(HostObject, String) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
return NodeCost.MONOMORPHIC;
}
return NodeCost.POLYMORPHIC;
}
public static ReadSubNode create() {
return new ReadSubNodeGen();
}
}
@GeneratedBy(KeysSubNode.class)
static final class KeysSubNodeGen extends KeysSubNode {
@CompilationFinal private int state_;
private KeysSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, boolean) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Boolean) {
boolean arg1Value_ = (boolean) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Boolean) {
boolean arg1Value_ = (boolean) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, boolean) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static KeysSubNode create() {
return new KeysSubNodeGen();
}
}
@GeneratedBy(NullCheckSubNode.class)
static final class NullCheckSubNodeGen extends NullCheckSubNode {
@CompilationFinal private int state_;
private NullCheckSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static NullCheckSubNode create() {
return new NullCheckSubNodeGen();
}
}
@GeneratedBy(UnboxSubNode.class)
static final class UnboxSubNodeGen extends UnboxSubNode {
@CompilationFinal private int state_;
private UnboxSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static UnboxSubNode create() {
return new UnboxSubNodeGen();
}
}
@GeneratedBy(BoxedCheckSubNode.class)
static final class BoxedCheckSubNodeGen extends BoxedCheckSubNode {
@CompilationFinal private int state_;
private BoxedCheckSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static BoxedCheckSubNode create() {
return new BoxedCheckSubNodeGen();
}
}
@GeneratedBy(IsExecutableObjectSubNode.class)
static final class IsExecutableObjectSubNodeGen extends IsExecutableObjectSubNode {
@CompilationFinal private int state_;
private IsExecutableObjectSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static IsExecutableObjectSubNode create() {
return new IsExecutableObjectSubNodeGen();
}
}
@GeneratedBy(ArrayGetSizeSubNode.class)
static final class ArrayGetSizeSubNodeGen extends ArrayGetSizeSubNode {
@CompilationFinal private int state_;
private ArrayGetSizeSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static ArrayGetSizeSubNode create() {
return new ArrayGetSizeSubNodeGen();
}
}
@GeneratedBy(ArrayHasSizeSubNode.class)
static final class ArrayHasSizeSubNodeGen extends ArrayHasSizeSubNode {
@CompilationFinal private int state_;
private ArrayHasSizeSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static ArrayHasSizeSubNode create() {
return new ArrayHasSizeSubNodeGen();
}
}
@GeneratedBy(IsInstantiableObjectSubNode.class)
static final class IsInstantiableObjectSubNodeGen extends IsInstantiableObjectSubNode {
@CompilationFinal private int state_;
private IsInstantiableObjectSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static IsInstantiableObjectSubNode create() {
return new IsInstantiableObjectSubNodeGen();
}
}
@GeneratedBy(RemoveSubNode.class)
static final class RemoveSubNodeGen extends RemoveSubNode {
@CompilationFinal private int state_;
private RemoveSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, Number) || accessWithTarget(HostObject, String) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if ((state & 0b1) != 0 /* is-active accessWithTarget(HostObject, Number) */ && arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
if ((state & 0b10) != 0 /* is-active accessWithTarget(HostObject, String) */ && arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, Number) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
if (arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
this.state_ = state = state | 0b10 /* add-active accessWithTarget(HostObject, String) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
return NodeCost.MONOMORPHIC;
}
return NodeCost.POLYMORPHIC;
}
public static RemoveSubNode create() {
return new RemoveSubNodeGen();
}
}
@GeneratedBy(KeyInfoSubNode.class)
static final class KeyInfoSubNodeGen extends KeyInfoSubNode {
@CompilationFinal private int state_;
private KeyInfoSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject, int) || accessWithTarget(HostObject, Number) || accessWithTarget(HostObject, String) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if ((state & 0b1) != 0 /* is-active accessWithTarget(HostObject, int) */ && arg1Value instanceof Integer) {
int arg1Value_ = (int) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
if ((state & 0b10) != 0 /* is-active accessWithTarget(HostObject, Number) */ && arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
if ((state & 0b100) != 0 /* is-active accessWithTarget(HostObject, String) */ && arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value);
}
private Object executeAndSpecialize(Object arg0Value, Object arg1Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
if (arg1Value instanceof Integer) {
int arg1Value_ = (int) arg1Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject, int) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
if (arg1Value instanceof Number) {
Number arg1Value_ = (Number) arg1Value;
this.state_ = state = state | 0b10 /* add-active accessWithTarget(HostObject, Number) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
if (arg1Value instanceof String) {
String arg1Value_ = (String) arg1Value;
this.state_ = state = state | 0b100 /* add-active accessWithTarget(HostObject, String) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_, arg1Value_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
return NodeCost.MONOMORPHIC;
}
return NodeCost.POLYMORPHIC;
}
public static KeyInfoSubNode create() {
return new KeyInfoSubNodeGen();
}
}
@GeneratedBy(HasKeysSubNode.class)
static final class HasKeysSubNodeGen extends HasKeysSubNode {
@CompilationFinal private int state_;
private HasKeysSubNodeGen() {
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value) {
int state = state_;
if (state != 0 /* is-active accessWithTarget(HostObject) */ && arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
if (arg0Value instanceof HostObject) {
HostObject arg0Value_ = (HostObject) arg0Value;
this.state_ = state = state | 0b1 /* add-active accessWithTarget(HostObject) */;
lock.unlock();
hasLock = false;
return accessWithTarget(arg0Value_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new UnsupportedSpecializationException(this, new Node[] {null}, arg0Value);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static HasKeysSubNode create() {
return new HasKeysSubNodeGen();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy