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

com.oracle.truffle.js.builtins.BigIntFunctionBuiltinsFactory Maven / Gradle / Ivy

// CheckStyle: start generated
package com.oracle.truffle.js.builtins;

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.frame.VirtualFrame;
import com.oracle.truffle.js.builtins.BigIntFunctionBuiltins.JSBigIntAsIntNNode;
import com.oracle.truffle.js.builtins.BigIntFunctionBuiltins.JSBigIntAsUintNNode;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.cast.JSToBigIntNode;
import com.oracle.truffle.js.nodes.cast.JSToIndexNode;
import com.oracle.truffle.js.nodes.function.JSBuiltin;
import com.oracle.truffle.js.runtime.BigInt;
import com.oracle.truffle.js.runtime.JSContext;
import java.lang.invoke.VarHandle;
import java.util.Objects;

@GeneratedBy(BigIntFunctionBuiltins.class)
@SuppressWarnings("javadoc")
public final class BigIntFunctionBuiltinsFactory {

    /**
     * Debug Info: 
     *   Specialization {@link JSBigIntAsUintNNode#doIt}
     *     Activation probability: 1.00000
     *     With/without class size: 28/8 bytes
     * 
*/ @GeneratedBy(JSBigIntAsUintNNode.class) @SuppressWarnings("javadoc") public static final class JSBigIntAsUintNNodeGen extends JSBigIntAsUintNNode { @Child private JavaScriptNode arguments0_; @Child private JavaScriptNode arguments1_; /** * State Info:
         *   0: SpecializationActive {@link JSBigIntAsUintNNode#doIt}
         * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
         *   Specialization: {@link JSBigIntAsUintNNode#doIt}
         *   Parameter: {@link JSToIndexNode} toIndexNode
*/ @Child private JSToIndexNode toIndexNode_; /** * Source Info:
         *   Specialization: {@link JSBigIntAsUintNNode#doIt}
         *   Parameter: {@link JSToBigIntNode} toBigIntNode
*/ @Child private JSToBigIntNode toBigIntNode_; private JSBigIntAsUintNNodeGen(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { super(context, builtin); this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null; this.arguments1_ = arguments != null && 1 < arguments.length ? arguments[1] : null; } @Override public JavaScriptNode[] getArguments() { return new JavaScriptNode[] {this.arguments0_, this.arguments1_}; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object arguments0Value_ = this.arguments0_.execute(frameValue); Object arguments1Value_ = this.arguments1_.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[BigIntFunctionBuiltins.JSBigIntAsUintNNode.doIt(Object, Object, JSToIndexNode, JSToBigIntNode)] */) { { JSToIndexNode toIndexNode__ = this.toIndexNode_; if (toIndexNode__ != null) { JSToBigIntNode toBigIntNode__ = this.toBigIntNode_; if (toBigIntNode__ != null) { return doIt(arguments0Value_, arguments1Value_, toIndexNode__, toBigIntNode__); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arguments0Value_, arguments1Value_); } private BigInt executeAndSpecialize(Object arguments0Value, Object arguments1Value) { int state_0 = this.state_0_; JSToIndexNode toIndexNode__ = this.insert((JSToIndexNode.create())); Objects.requireNonNull(toIndexNode__, "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.toIndexNode_ = toIndexNode__; JSToBigIntNode toBigIntNode__ = this.insert((JSToBigIntNode.create())); Objects.requireNonNull(toBigIntNode__, "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.toBigIntNode_ = toBigIntNode__; state_0 = state_0 | 0b1 /* add SpecializationActive[BigIntFunctionBuiltins.JSBigIntAsUintNNode.doIt(Object, Object, JSToIndexNode, JSToBigIntNode)] */; this.state_0_ = state_0; return doIt(arguments0Value, arguments1Value, toIndexNode__, toBigIntNode__); } @NeverDefault public static JSBigIntAsUintNNode create(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { return new JSBigIntAsUintNNodeGen(context, builtin, arguments); } } /** * Debug Info:
     *   Specialization {@link JSBigIntAsIntNNode#doIt}
     *     Activation probability: 1.00000
     *     With/without class size: 28/8 bytes
     * 
*/ @GeneratedBy(JSBigIntAsIntNNode.class) @SuppressWarnings("javadoc") public static final class JSBigIntAsIntNNodeGen extends JSBigIntAsIntNNode { @Child private JavaScriptNode arguments0_; @Child private JavaScriptNode arguments1_; /** * State Info:
         *   0: SpecializationActive {@link JSBigIntAsIntNNode#doIt}
         * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
         *   Specialization: {@link JSBigIntAsIntNNode#doIt}
         *   Parameter: {@link JSToIndexNode} toIndexNode
*/ @Child private JSToIndexNode toIndexNode_; /** * Source Info:
         *   Specialization: {@link JSBigIntAsIntNNode#doIt}
         *   Parameter: {@link JSToBigIntNode} toBigIntNode
*/ @Child private JSToBigIntNode toBigIntNode_; private JSBigIntAsIntNNodeGen(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { super(context, builtin); this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null; this.arguments1_ = arguments != null && 1 < arguments.length ? arguments[1] : null; } @Override public JavaScriptNode[] getArguments() { return new JavaScriptNode[] {this.arguments0_, this.arguments1_}; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object arguments0Value_ = this.arguments0_.execute(frameValue); Object arguments1Value_ = this.arguments1_.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[BigIntFunctionBuiltins.JSBigIntAsIntNNode.doIt(Object, Object, JSToIndexNode, JSToBigIntNode)] */) { { JSToIndexNode toIndexNode__ = this.toIndexNode_; if (toIndexNode__ != null) { JSToBigIntNode toBigIntNode__ = this.toBigIntNode_; if (toBigIntNode__ != null) { return doIt(arguments0Value_, arguments1Value_, toIndexNode__, toBigIntNode__); } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arguments0Value_, arguments1Value_); } private BigInt executeAndSpecialize(Object arguments0Value, Object arguments1Value) { int state_0 = this.state_0_; JSToIndexNode toIndexNode__ = this.insert((JSToIndexNode.create())); Objects.requireNonNull(toIndexNode__, "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.toIndexNode_ = toIndexNode__; JSToBigIntNode toBigIntNode__ = this.insert((JSToBigIntNode.create())); Objects.requireNonNull(toBigIntNode__, "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.toBigIntNode_ = toBigIntNode__; state_0 = state_0 | 0b1 /* add SpecializationActive[BigIntFunctionBuiltins.JSBigIntAsIntNNode.doIt(Object, Object, JSToIndexNode, JSToBigIntNode)] */; this.state_0_ = state_0; return doIt(arguments0Value, arguments1Value, toIndexNode__, toBigIntNode__); } @NeverDefault public static JSBigIntAsIntNNode create(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { return new JSBigIntAsIntNNodeGen(context, builtin, arguments); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy