com.oracle.truffle.js.nodes.cast.JSToBigIntNodeGen Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
// CheckStyle: start generated
package com.oracle.truffle.js.nodes.cast;
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.Introspection;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.dsl.Introspection.Provider;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.js.nodes.JSGuards;
import com.oracle.truffle.js.nodes.JSTypesGen;
import com.oracle.truffle.js.runtime.BigInt;
import com.oracle.truffle.js.runtime.Symbol;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.locks.Lock;
@GeneratedBy(JSToBigIntNode.class)
public final class JSToBigIntNodeGen extends JSToBigIntNode implements Provider {
@CompilationFinal private volatile int state_;
@Child private JSToPrimitiveNode toPrimitiveNode_;
@Child private JSToBigIntInnerConversionNode innerConversionNode_;
private JSToBigIntNodeGen() {
}
@Override
public Object execute(Object arg0Value) {
int state = state_;
if (state != 0 /* is-active doIt(Object, JSToPrimitiveNode, JSToBigIntInnerConversionNode) */) {
return doIt(arg0Value, this.toPrimitiveNode_, this.innerConversionNode_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private Object executeAndSpecialize(Object arg0Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
this.toPrimitiveNode_ = super.insert((JSToPrimitiveNode.createHintNumber()));
this.innerConversionNode_ = super.insert((JSToBigIntInnerConversionNode.create()));
this.state_ = state = state | 0b1 /* add-active doIt(Object, JSToPrimitiveNode, JSToBigIntInnerConversionNode) */;
lock.unlock();
hasLock = false;
return doIt(arg0Value, this.toPrimitiveNode_, this.innerConversionNode_);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
@Override
public Introspection getIntrospectionData() {
Object[] data = new Object[2];
Object[] s;
data[0] = 0;
int state = state_;
s = new Object[3];
s[0] = "doIt";
if (state != 0 /* is-active doIt(Object, JSToPrimitiveNode, JSToBigIntInnerConversionNode) */) {
s[1] = (byte)0b01 /* active */;
ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy