com.oracle.truffle.js.nodes.intl.GetStringOptionNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.truffle.js.nodes.intl;
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.NeverDefault;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.api.strings.TruffleString.ToJavaStringNode;
import com.oracle.truffle.js.nodes.cast.JSToStringNode;
import com.oracle.truffle.js.runtime.JSContext;
import java.lang.invoke.VarHandle;
import java.util.List;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link GetStringOptionNode#getOption}
* Activation probability: 1.00000
* With/without class size: 28/8 bytes
*
*/
@GeneratedBy(GetStringOptionNode.class)
@SuppressWarnings("javadoc")
public final class GetStringOptionNodeGen extends GetStringOptionNode {
/**
* State Info:
* 0: SpecializationActive {@link GetStringOptionNode#getOption}
*
*/
@CompilationFinal private int state_0_;
/**
* Source Info:
* Specialization: {@link GetStringOptionNode#getOption}
* Parameter: {@link JSToStringNode} toStringNode
*/
@Child private JSToStringNode toStringNode_;
/**
* Source Info:
* Specialization: {@link GetStringOptionNode#getOption}
* Parameter: {@link ToJavaStringNode} toJavaStringNode
*/
@Child private ToJavaStringNode toJavaStringNode_;
private GetStringOptionNodeGen(JSContext context, TruffleString property, List values, String fallback) {
super(context, property, values, fallback);
}
@Override
public String executeValue(Object arg0Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[GetStringOptionNode.getOption(Object, JSToStringNode, ToJavaStringNode)] */) {
{
JSToStringNode toStringNode__ = this.toStringNode_;
if (toStringNode__ != null) {
ToJavaStringNode toJavaStringNode__ = this.toJavaStringNode_;
if (toJavaStringNode__ != null) {
return getOption(arg0Value, toStringNode__, toJavaStringNode__);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private String executeAndSpecialize(Object arg0Value) {
int state_0 = this.state_0_;
JSToStringNode toStringNode__ = this.insert((JSToStringNode.create()));
Objects.requireNonNull(toStringNode__, "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.toStringNode_ = toStringNode__;
ToJavaStringNode toJavaStringNode__ = this.insert((ToJavaStringNode.create()));
Objects.requireNonNull(toJavaStringNode__, "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.toJavaStringNode_ = toJavaStringNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[GetStringOptionNode.getOption(Object, JSToStringNode, ToJavaStringNode)] */;
this.state_0_ = state_0;
return getOption(arg0Value, toStringNode__, toJavaStringNode__);
}
@NeverDefault
public static GetStringOptionNode create(JSContext context, TruffleString property, List values, String fallback) {
return new GetStringOptionNodeGen(context, property, values, fallback);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy