com.oracle.truffle.js.nodes.interop.JSInteropExecuteNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.truffle.js.nodes.interop;
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.dsl.NeverDefault;
import com.oracle.truffle.api.interop.UnsupportedMessageException;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.UnadoptableNode;
import com.oracle.truffle.js.nodes.function.JSFunctionCallNode;
import com.oracle.truffle.js.nodes.unary.IsCallableNode;
import com.oracle.truffle.js.nodes.unary.IsCallableNodeGen;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import java.lang.invoke.VarHandle;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link JSInteropExecuteNode#doDefault}
* Activation probability: 1.00000
* With/without class size: 32/12 bytes
*
*/
@GeneratedBy(JSInteropExecuteNode.class)
@SuppressWarnings("javadoc")
public final class JSInteropExecuteNodeGen extends JSInteropExecuteNode {
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link JSInteropExecuteNode#doDefault}
*
*/
@CompilationFinal private int state_0_;
/**
* Source Info:
* Specialization: {@link JSInteropExecuteNode#doDefault}
* Parameter: {@link IsCallableNode} isCallableNode
*/
@Child private IsCallableNode isCallableNode_;
/**
* Source Info:
* Specialization: {@link JSInteropExecuteNode#doDefault}
* Parameter: {@link JSFunctionCallNode} callNode
*/
@Child private JSFunctionCallNode callNode_;
/**
* Source Info:
* Specialization: {@link JSInteropExecuteNode#doDefault}
* Parameter: {@link ImportValueNode} importValueNode
*/
@Child private ImportValueNode importValueNode_;
private JSInteropExecuteNodeGen() {
}
@Override
public Object execute(JSDynamicObject arg0Value, Object arg1Value, Object[] arg2Value) throws UnsupportedMessageException {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[JSInteropExecuteNode.doDefault(JSDynamicObject, Object, Object[], IsCallableNode, JSFunctionCallNode, ImportValueNode)] */) {
{
IsCallableNode isCallableNode__ = this.isCallableNode_;
if (isCallableNode__ != null) {
JSFunctionCallNode callNode__ = this.callNode_;
if (callNode__ != null) {
ImportValueNode importValueNode__ = this.importValueNode_;
if (importValueNode__ != null) {
return doDefault(arg0Value, arg1Value, arg2Value, isCallableNode__, callNode__, importValueNode__);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
private Object executeAndSpecialize(JSDynamicObject arg0Value, Object arg1Value, Object[] arg2Value) throws UnsupportedMessageException {
int state_0 = this.state_0_;
IsCallableNode isCallableNode__ = this.insert((IsCallableNode.create()));
Objects.requireNonNull(isCallableNode__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
VarHandle.storeStoreFence();
this.isCallableNode_ = isCallableNode__;
JSFunctionCallNode callNode__ = this.insert((JSFunctionCallNode.createCall()));
Objects.requireNonNull(callNode__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
VarHandle.storeStoreFence();
this.callNode_ = callNode__;
ImportValueNode importValueNode__ = this.insert((ImportValueNode.create()));
Objects.requireNonNull(importValueNode__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
VarHandle.storeStoreFence();
this.importValueNode_ = importValueNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[JSInteropExecuteNode.doDefault(JSDynamicObject, Object, Object[], IsCallableNode, JSFunctionCallNode, ImportValueNode)] */;
this.state_0_ = state_0;
return doDefault(arg0Value, arg1Value, arg2Value, isCallableNode__, callNode__, importValueNode__);
}
@NeverDefault
public static JSInteropExecuteNode create() {
return new JSInteropExecuteNodeGen();
}
@NeverDefault
public static JSInteropExecuteNode getUncached() {
return JSInteropExecuteNodeGen.UNCACHED;
}
@GeneratedBy(JSInteropExecuteNode.class)
@DenyReplace
private static final class Uncached extends JSInteropExecuteNode implements UnadoptableNode {
@TruffleBoundary
@Override
public Object execute(JSDynamicObject arg0Value, Object arg1Value, Object[] arg2Value) throws UnsupportedMessageException {
return doDefault(arg0Value, arg1Value, arg2Value, (IsCallableNodeGen.getUncached()), (JSFunctionCallNode.getUncachedCall()), (ImportValueNode.getUncached()));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy