All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.truffle.js.nodes.intl.GetStringOrBooleanOptionNodeGen 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.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.api.strings.TruffleString.ToJavaStringNode;
import com.oracle.truffle.js.nodes.cast.JSToBooleanNode;
import com.oracle.truffle.js.nodes.cast.JSToBooleanNodeGen;
import com.oracle.truffle.js.nodes.cast.JSToStringNode;
import com.oracle.truffle.js.runtime.JSContext;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.List;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link GetStringOrBooleanOptionNode#getOption}
 *     Activation probability: 1.00000
 *     With/without class size: 36/14 bytes
 * 
*/ @GeneratedBy(GetStringOrBooleanOptionNode.class) @SuppressWarnings("javadoc") public final class GetStringOrBooleanOptionNodeGen extends GetStringOrBooleanOptionNode { private static final StateField STATE_0_GetStringOrBooleanOptionNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
     *   Specialization: {@link GetStringOrBooleanOptionNode#getOption}
     *   Parameter: {@link JSToBooleanNode} toBooleanNode
     *   Inline method: {@link JSToBooleanNodeGen#inline}
*/ private static final JSToBooleanNode INLINED_TO_BOOLEAN_NODE_ = JSToBooleanNodeGen.inline(InlineTarget.create(JSToBooleanNode.class, STATE_0_GetStringOrBooleanOptionNode_UPDATER.subUpdater(1, 15), ReferenceField.create(MethodHandles.lookup(), "toBooleanNode__field1_", Node.class))); /** * State Info:
     *   0: SpecializationActive {@link GetStringOrBooleanOptionNode#getOption}
     *   1-15: InlinedCache
     *        Specialization: {@link GetStringOrBooleanOptionNode#getOption}
     *        Parameter: {@link JSToBooleanNode} toBooleanNode
     *        Inline method: {@link JSToBooleanNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
     *   Specialization: {@link GetStringOrBooleanOptionNode#getOption}
     *   Parameter: {@link JSToBooleanNode} toBooleanNode
     *   Inline method: {@link JSToBooleanNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toBooleanNode__field1_; /** * Source Info:
     *   Specialization: {@link GetStringOrBooleanOptionNode#getOption}
     *   Parameter: {@link JSToStringNode} toStringNode
*/ @Child private JSToStringNode toStringNode_; /** * Source Info:
     *   Specialization: {@link GetStringOrBooleanOptionNode#getOption}
     *   Parameter: {@link ToJavaStringNode} toJavaStringNode
*/ @Child private ToJavaStringNode toJavaStringNode_; private GetStringOrBooleanOptionNodeGen(JSContext context, TruffleString property, List values, Object trueValue, Object falsyValue, Object fallback) { super(context, property, values, trueValue, falsyValue, fallback); } @Override public Object executeValue(Object arg0Value) { int state_0 = this.state_0_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetStringOrBooleanOptionNode.getOption(Object, JSToBooleanNode, JSToStringNode, ToJavaStringNode)] */) { { JSToStringNode toStringNode__ = this.toStringNode_; if (toStringNode__ != null) { ToJavaStringNode toJavaStringNode__ = this.toJavaStringNode_; if (toJavaStringNode__ != null) { return getOption(arg0Value, INLINED_TO_BOOLEAN_NODE_, toStringNode__, toJavaStringNode__); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value); } private Object 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[GetStringOrBooleanOptionNode.getOption(Object, JSToBooleanNode, JSToStringNode, ToJavaStringNode)] */; this.state_0_ = state_0; return getOption(arg0Value, INLINED_TO_BOOLEAN_NODE_, toStringNode__, toJavaStringNode__); } @NeverDefault public static GetStringOrBooleanOptionNode create(JSContext context, TruffleString property, List values, Object trueValue, Object falsyValue, Object fallback) { return new GetStringOrBooleanOptionNodeGen(context, property, values, trueValue, falsyValue, fallback); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy