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

com.oracle.truffle.js.builtins.PromiseFunctionBuiltinsFactory 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.dsl.UnsupportedSpecializationException;
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.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.js.builtins.PromiseFunctionBuiltins.PromiseCombinatorNode;
import com.oracle.truffle.js.builtins.PromiseFunctionBuiltins.RejectNode;
import com.oracle.truffle.js.builtins.PromiseFunctionBuiltins.ResolveNode;
import com.oracle.truffle.js.builtins.PromiseFunctionBuiltins.WithResolversNode;
import com.oracle.truffle.js.nodes.JSGuards;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.access.GetIteratorNode;
import com.oracle.truffle.js.nodes.access.GetIteratorNodeGen;
import com.oracle.truffle.js.nodes.function.JSBuiltin;
import com.oracle.truffle.js.nodes.promise.PerformPromiseCombinatorNode;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import com.oracle.truffle.js.runtime.objects.JSObject;
import java.lang.invoke.MethodHandles;

@GeneratedBy(PromiseFunctionBuiltins.class)
@SuppressWarnings("javadoc")
public final class PromiseFunctionBuiltinsFactory {

    /**
     * Debug Info: 
     *   Specialization {@link PromiseCombinatorNode#doObject}
     *     Activation probability: 0.65000
     *     With/without class size: 30/21 bytes
     *   Specialization {@link PromiseCombinatorNode#doNotObject}
     *     Activation probability: 0.35000
     *     With/without class size: 8/0 bytes
     * 
*/ @GeneratedBy(PromiseCombinatorNode.class) @SuppressWarnings("javadoc") public static final class PromiseCombinatorNodeGen extends PromiseCombinatorNode { private static final StateField STATE_0_PromiseCombinatorNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
         *   Specialization: {@link PromiseCombinatorNode#doObject}
         *   Parameter: {@link GetIteratorNode} getIteratorNode
         *   Inline method: {@link GetIteratorNodeGen#inline}
*/ private static final GetIteratorNode INLINED_OBJECT_GET_ITERATOR_NODE_ = GetIteratorNodeGen.inline(InlineTarget.create(GetIteratorNode.class, STATE_0_PromiseCombinatorNode_UPDATER.subUpdater(2, 6), ReferenceField.create(MethodHandles.lookup(), "object_getIteratorNode__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "object_getIteratorNode__field2_", Node.class), ReferenceField.create(MethodHandles.lookup(), "object_getIteratorNode__field3_", Node.class), ReferenceField.create(MethodHandles.lookup(), "object_getIteratorNode__field4_", Node.class), ReferenceField.create(MethodHandles.lookup(), "object_getIteratorNode__field5_", Node.class))); @Child private JavaScriptNode arguments0_; @Child private JavaScriptNode arguments1_; /** * State Info:
         *   0: SpecializationActive {@link PromiseCombinatorNode#doObject}
         *   1: SpecializationActive {@link PromiseCombinatorNode#doNotObject}
         *   2-7: InlinedCache
         *        Specialization: {@link PromiseCombinatorNode#doObject}
         *        Parameter: {@link GetIteratorNode} getIteratorNode
         *        Inline method: {@link GetIteratorNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
         *   Specialization: {@link PromiseCombinatorNode#doObject}
         *   Parameter: {@link GetIteratorNode} getIteratorNode
         *   Inline method: {@link GetIteratorNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node object_getIteratorNode__field1_; /** * Source Info:
         *   Specialization: {@link PromiseCombinatorNode#doObject}
         *   Parameter: {@link GetIteratorNode} getIteratorNode
         *   Inline method: {@link GetIteratorNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node object_getIteratorNode__field2_; /** * Source Info:
         *   Specialization: {@link PromiseCombinatorNode#doObject}
         *   Parameter: {@link GetIteratorNode} getIteratorNode
         *   Inline method: {@link GetIteratorNodeGen#inline}
         *   Inline field: {@link Node} field3
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node object_getIteratorNode__field3_; /** * Source Info:
         *   Specialization: {@link PromiseCombinatorNode#doObject}
         *   Parameter: {@link GetIteratorNode} getIteratorNode
         *   Inline method: {@link GetIteratorNodeGen#inline}
         *   Inline field: {@link Node} field4
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node object_getIteratorNode__field4_; /** * Source Info:
         *   Specialization: {@link PromiseCombinatorNode#doObject}
         *   Parameter: {@link GetIteratorNode} getIteratorNode
         *   Inline method: {@link GetIteratorNodeGen#inline}
         *   Inline field: {@link Node} field5
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node object_getIteratorNode__field5_; private PromiseCombinatorNodeGen(JSContext context, JSBuiltin builtin, PerformPromiseCombinatorNode performPromiseOp, JavaScriptNode[] arguments) { super(context, builtin, performPromiseOp); 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 & 0b11) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.PromiseCombinatorNode.doObject(JSObject, Object, GetIteratorNode)] || SpecializationActive[PromiseFunctionBuiltins.PromiseCombinatorNode.doNotObject(Object, Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.PromiseCombinatorNode.doObject(JSObject, Object, GetIteratorNode)] */ && arguments0Value_ instanceof JSObject) { JSObject arguments0Value__ = (JSObject) arguments0Value_; return doObject(arguments0Value__, arguments1Value_, INLINED_OBJECT_GET_ITERATOR_NODE_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.PromiseCombinatorNode.doNotObject(Object, Object)] */) { if ((!(JSGuards.isJSObject(arguments0Value_)))) { return doNotObject(arguments0Value_, arguments1Value_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arguments0Value_, arguments1Value_); } private Object executeAndSpecialize(Object arguments0Value, Object arguments1Value) { int state_0 = this.state_0_; if (arguments0Value instanceof JSObject) { JSObject arguments0Value_ = (JSObject) arguments0Value; state_0 = state_0 | 0b1 /* add SpecializationActive[PromiseFunctionBuiltins.PromiseCombinatorNode.doObject(JSObject, Object, GetIteratorNode)] */; this.state_0_ = state_0; return doObject(arguments0Value_, arguments1Value, INLINED_OBJECT_GET_ITERATOR_NODE_); } if ((!(JSGuards.isJSObject(arguments0Value)))) { state_0 = state_0 | 0b10 /* add SpecializationActive[PromiseFunctionBuiltins.PromiseCombinatorNode.doNotObject(Object, Object)] */; this.state_0_ = state_0; return doNotObject(arguments0Value, arguments1Value); } throw new UnsupportedSpecializationException(this, new Node[] {this.arguments0_, this.arguments1_}, arguments0Value, arguments1Value); } @NeverDefault public static PromiseCombinatorNode create(JSContext context, JSBuiltin builtin, PerformPromiseCombinatorNode performPromiseOp, JavaScriptNode[] arguments) { return new PromiseCombinatorNodeGen(context, builtin, performPromiseOp, arguments); } } /** * Debug Info:
     *   Specialization {@link RejectNode#doObject}
     *     Activation probability: 0.65000
     *     With/without class size: 11/0 bytes
     *   Specialization {@link RejectNode#doNotObject}
     *     Activation probability: 0.35000
     *     With/without class size: 8/0 bytes
     * 
*/ @GeneratedBy(RejectNode.class) @SuppressWarnings("javadoc") public static final class RejectNodeGen extends RejectNode { @Child private JavaScriptNode arguments0_; @Child private JavaScriptNode arguments1_; /** * State Info:
         *   0: SpecializationActive {@link RejectNode#doObject}
         *   1: SpecializationActive {@link RejectNode#doNotObject}
         * 
*/ @CompilationFinal private int state_0_; private RejectNodeGen(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[PromiseFunctionBuiltins.RejectNode.doObject(JSObject, Object)] || SpecializationActive[PromiseFunctionBuiltins.RejectNode.doNotObject(Object, Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.RejectNode.doObject(JSObject, Object)] */ && arguments0Value_ instanceof JSObject) { JSObject arguments0Value__ = (JSObject) arguments0Value_; return doObject(arguments0Value__, arguments1Value_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.RejectNode.doNotObject(Object, Object)] */) { if ((!(JSGuards.isJSObject(arguments0Value_)))) { return doNotObject(arguments0Value_, arguments1Value_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arguments0Value_, arguments1Value_); } private JSDynamicObject executeAndSpecialize(Object arguments0Value, Object arguments1Value) { int state_0 = this.state_0_; if (arguments0Value instanceof JSObject) { JSObject arguments0Value_ = (JSObject) arguments0Value; state_0 = state_0 | 0b1 /* add SpecializationActive[PromiseFunctionBuiltins.RejectNode.doObject(JSObject, Object)] */; this.state_0_ = state_0; return doObject(arguments0Value_, arguments1Value); } if ((!(JSGuards.isJSObject(arguments0Value)))) { state_0 = state_0 | 0b10 /* add SpecializationActive[PromiseFunctionBuiltins.RejectNode.doNotObject(Object, Object)] */; this.state_0_ = state_0; return doNotObject(arguments0Value, arguments1Value); } throw new UnsupportedSpecializationException(this, new Node[] {this.arguments0_, this.arguments1_}, arguments0Value, arguments1Value); } @NeverDefault public static RejectNode create(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { return new RejectNodeGen(context, builtin, arguments); } } /** * Debug Info:
     *   Specialization {@link ResolveNode#doObject}
     *     Activation probability: 0.65000
     *     With/without class size: 11/0 bytes
     *   Specialization {@link ResolveNode#doNotObject}
     *     Activation probability: 0.35000
     *     With/without class size: 8/0 bytes
     * 
*/ @GeneratedBy(ResolveNode.class) @SuppressWarnings("javadoc") public static final class ResolveNodeGen extends ResolveNode { @Child private JavaScriptNode arguments0_; @Child private JavaScriptNode arguments1_; /** * State Info:
         *   0: SpecializationActive {@link ResolveNode#doObject}
         *   1: SpecializationActive {@link ResolveNode#doNotObject}
         * 
*/ @CompilationFinal private int state_0_; private ResolveNodeGen(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[PromiseFunctionBuiltins.ResolveNode.doObject(JSObject, Object)] || SpecializationActive[PromiseFunctionBuiltins.ResolveNode.doNotObject(Object, Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.ResolveNode.doObject(JSObject, Object)] */ && arguments0Value_ instanceof JSObject) { JSObject arguments0Value__ = (JSObject) arguments0Value_; return doObject(arguments0Value__, arguments1Value_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PromiseFunctionBuiltins.ResolveNode.doNotObject(Object, Object)] */) { if ((!(JSGuards.isJSObject(arguments0Value_)))) { return doNotObject(arguments0Value_, arguments1Value_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arguments0Value_, arguments1Value_); } private JSDynamicObject executeAndSpecialize(Object arguments0Value, Object arguments1Value) { int state_0 = this.state_0_; if (arguments0Value instanceof JSObject) { JSObject arguments0Value_ = (JSObject) arguments0Value; state_0 = state_0 | 0b1 /* add SpecializationActive[PromiseFunctionBuiltins.ResolveNode.doObject(JSObject, Object)] */; this.state_0_ = state_0; return doObject(arguments0Value_, arguments1Value); } if ((!(JSGuards.isJSObject(arguments0Value)))) { state_0 = state_0 | 0b10 /* add SpecializationActive[PromiseFunctionBuiltins.ResolveNode.doNotObject(Object, Object)] */; this.state_0_ = state_0; return doNotObject(arguments0Value, arguments1Value); } throw new UnsupportedSpecializationException(this, new Node[] {this.arguments0_, this.arguments1_}, arguments0Value, arguments1Value); } @NeverDefault public static ResolveNode create(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { return new ResolveNodeGen(context, builtin, arguments); } } /** * Debug Info:
     *   Specialization {@link WithResolversNode#withResolvers}
     *     Activation probability: 1.00000
     *     With/without class size: 16/0 bytes
     * 
*/ @GeneratedBy(WithResolversNode.class) @SuppressWarnings("javadoc") public static final class WithResolversNodeGen extends WithResolversNode { @Child private JavaScriptNode arguments0_; private WithResolversNodeGen(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { super(context, builtin); this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null; } @Override public JavaScriptNode[] getArguments() { return new JavaScriptNode[] {this.arguments0_}; } @Override public Object execute(VirtualFrame frameValue) { Object arguments0Value_ = this.arguments0_.execute(frameValue); return withResolvers(frameValue, arguments0Value_); } @NeverDefault public static WithResolversNode create(JSContext context, JSBuiltin builtin, JavaScriptNode[] arguments) { return new WithResolversNodeGen(context, builtin, arguments); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy