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

com.oracle.truffle.js.nodes.intl.CoerceOptionsToObjectNodeGen 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.UnsupportedSpecializationException;
import com.oracle.truffle.js.nodes.JSGuards;
import com.oracle.truffle.js.nodes.cast.JSToObjectNode;
import com.oracle.truffle.js.runtime.JSContext;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link CoerceOptionsToObjectNode#fromUndefined}
 *     Activation probability: 0.65000
 *     With/without class size: 11/0 bytes
 *   Specialization {@link CoerceOptionsToObjectNode#fromOtherThanUndefined}
 *     Activation probability: 0.35000
 *     With/without class size: 11/4 bytes
 * 
*/ @GeneratedBy(CoerceOptionsToObjectNode.class) @SuppressWarnings("javadoc") public final class CoerceOptionsToObjectNodeGen extends CoerceOptionsToObjectNode { /** * State Info:
     *   0: SpecializationActive {@link CoerceOptionsToObjectNode#fromUndefined}
     *   1: SpecializationActive {@link CoerceOptionsToObjectNode#fromOtherThanUndefined}
     * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
     *   Specialization: {@link CoerceOptionsToObjectNode#fromOtherThanUndefined}
     *   Parameter: {@link JSToObjectNode} toObjectNode
*/ @Child private JSToObjectNode fromOtherThanUndefined_toObjectNode_; private CoerceOptionsToObjectNodeGen(JSContext context) { super(context); } @Override public Object execute(Object arg0Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[CoerceOptionsToObjectNode.fromUndefined(Object)] || SpecializationActive[CoerceOptionsToObjectNode.fromOtherThanUndefined(Object, JSToObjectNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[CoerceOptionsToObjectNode.fromUndefined(Object)] */) { if ((JSGuards.isUndefined(arg0Value))) { return fromUndefined(arg0Value); } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[CoerceOptionsToObjectNode.fromOtherThanUndefined(Object, JSToObjectNode)] */) { { JSToObjectNode toObjectNode__ = this.fromOtherThanUndefined_toObjectNode_; if (toObjectNode__ != null) { if ((!(JSGuards.isUndefined(arg0Value)))) { return fromOtherThanUndefined(arg0Value, toObjectNode__); } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value); } private Object executeAndSpecialize(Object arg0Value) { int state_0 = this.state_0_; if ((JSGuards.isUndefined(arg0Value))) { state_0 = state_0 | 0b1 /* add SpecializationActive[CoerceOptionsToObjectNode.fromUndefined(Object)] */; this.state_0_ = state_0; return fromUndefined(arg0Value); } if ((!(JSGuards.isUndefined(arg0Value)))) { JSToObjectNode toObjectNode__ = this.insert((JSToObjectNode.create())); Objects.requireNonNull(toObjectNode__, "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.fromOtherThanUndefined_toObjectNode_ = toObjectNode__; state_0 = state_0 | 0b10 /* add SpecializationActive[CoerceOptionsToObjectNode.fromOtherThanUndefined(Object, JSToObjectNode)] */; this.state_0_ = state_0; return fromOtherThanUndefined(arg0Value, toObjectNode__); } throw new UnsupportedSpecializationException(this, null, arg0Value); } @NeverDefault public static CoerceOptionsToObjectNode create(JSContext context) { return new CoerceOptionsToObjectNodeGen(context); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy