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

org.truffleruby.stdlib.readline.ReadlineHistoryNodesFactory Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package org.truffleruby.stdlib.readline;

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.NodeFactory;
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 java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.List;
import java.util.Objects;
import org.truffleruby.builtins.CoreMethodArrayArgumentsNode;
import org.truffleruby.core.basicobject.RubyBasicObject;
import org.truffleruby.core.cast.ToIntNode;
import org.truffleruby.core.cast.ToIntNodeGen;
import org.truffleruby.core.proc.RubyProc;
import org.truffleruby.interop.ToJavaStringNode;
import org.truffleruby.interop.ToJavaStringNodeGen;
import org.truffleruby.language.RubyNode;
import org.truffleruby.language.yield.CallBlockNode;
import org.truffleruby.language.yield.CallBlockNodeGen;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.ClearNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.DeleteAtNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.EachNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.GetIndexNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.LengthNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.PopNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.PushNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.SetIndexNode;
import org.truffleruby.stdlib.readline.ReadlineHistoryNodes.ShiftNode;

@GeneratedBy(ReadlineHistoryNodes.class)
@SuppressWarnings({"javadoc", "unused"})
public final class ReadlineHistoryNodesFactory {

    public static List> getFactories() {
        return List.of(PushNodeFactory.getInstance(), PopNodeFactory.getInstance(), ShiftNodeFactory.getInstance(), LengthNodeFactory.getInstance(), ClearNodeFactory.getInstance(), EachNodeFactory.getInstance(), GetIndexNodeFactory.getInstance(), SetIndexNodeFactory.getInstance(), DeleteAtNodeFactory.getInstance());
    }

    @GeneratedBy(PushNode.class)
    public static final class PushNodeFactory implements NodeFactory {

        private static final PushNodeFactory PUSH_NODE_FACTORY_INSTANCE = new PushNodeFactory();

        private PushNodeFactory() {
        }

        @Override
        public Class getNodeClass() {
            return PushNode.class;
        }

        @Override
        public List> getExecutionSignature() {
            return List.of(RubyNode.class, RubyNode.class);
        }

        @Override
        public List>> getNodeSignatures() {
            return List.of(List.of(RubyNode[].class));
        }

        @Override
        public PushNode createNode(Object... arguments) {
            if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) {
                return create((RubyNode[]) arguments[0]);
            } else {
                throw new IllegalArgumentException("Invalid create signature.");
            }
        }

        public static NodeFactory getInstance() {
            return PUSH_NODE_FACTORY_INSTANCE;
        }

        @NeverDefault
        public static PushNode create(RubyNode[] argumentNodes) {
            return new PushNodeGen(argumentNodes);
        }

        /**
         * Debug Info: 
         *   Specialization {@link PushNode#push}
         *     Activation probability: 1.00000
         *     With/without class size: 32/10 bytes
         * 
*/ @GeneratedBy(PushNode.class) @SuppressWarnings("javadoc") public static final class PushNodeGen extends PushNode { private static final StateField STATE_0_PushNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
             *   Specialization: {@link PushNode#push}
             *   Parameter: {@link ToJavaStringNode} toJavaStringNode
             *   Inline method: {@link ToJavaStringNodeGen#inline}
*/ private static final ToJavaStringNode INLINED_TO_JAVA_STRING_NODE_ = ToJavaStringNodeGen.inline(InlineTarget.create(ToJavaStringNode.class, STATE_0_PushNode_UPDATER.subUpdater(1, 12), ReferenceField.create(MethodHandles.lookup(), "toJavaStringNode__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "toJavaStringNode__field2_", Node.class))); @Child private RubyNode argumentNodes0_; @Child private RubyNode argumentNodes1_; /** * State Info:
             *   0: SpecializationActive {@link PushNode#push}
             *   1-12: InlinedCache
             *        Specialization: {@link PushNode#push}
             *        Parameter: {@link ToJavaStringNode} toJavaStringNode
             *        Inline method: {@link ToJavaStringNodeGen#inline}
             * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
             *   Specialization: {@link PushNode#push}
             *   Parameter: {@link ToJavaStringNode} toJavaStringNode
             *   Inline method: {@link ToJavaStringNodeGen#inline}
             *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toJavaStringNode__field1_; /** * Source Info:
             *   Specialization: {@link PushNode#push}
             *   Parameter: {@link ToJavaStringNode} toJavaStringNode
             *   Inline method: {@link ToJavaStringNodeGen#inline}
             *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toJavaStringNode__field2_; private PushNodeGen(RubyNode[] argumentNodes) { this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null; this.argumentNodes1_ = argumentNodes != null && 1 < argumentNodes.length ? argumentNodes[1] : null; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue); Object argumentNodes1Value_ = this.argumentNodes1_.execute(frameValue); if ((state_0 & 0b1) != 0 /* is SpecializationActive[ReadlineHistoryNodes.PushNode.push(RubyBasicObject, Object[], ToJavaStringNode)] */ && argumentNodes0Value_ instanceof RubyBasicObject) { RubyBasicObject argumentNodes0Value__ = (RubyBasicObject) argumentNodes0Value_; if (argumentNodes1Value_ instanceof Object[]) { Object[] argumentNodes1Value__ = (Object[]) argumentNodes1Value_; return push(argumentNodes0Value__, argumentNodes1Value__, INLINED_TO_JAVA_STRING_NODE_); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(argumentNodes0Value_, argumentNodes1Value_); } private RubyBasicObject executeAndSpecialize(Object argumentNodes0Value, Object argumentNodes1Value) { int state_0 = this.state_0_; if (argumentNodes0Value instanceof RubyBasicObject) { RubyBasicObject argumentNodes0Value_ = (RubyBasicObject) argumentNodes0Value; if (argumentNodes1Value instanceof Object[]) { Object[] argumentNodes1Value_ = (Object[]) argumentNodes1Value; state_0 = state_0 | 0b1 /* add SpecializationActive[ReadlineHistoryNodes.PushNode.push(RubyBasicObject, Object[], ToJavaStringNode)] */; this.state_0_ = state_0; return push(argumentNodes0Value_, argumentNodes1Value_, INLINED_TO_JAVA_STRING_NODE_); } } throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_, this.argumentNodes1_}, argumentNodes0Value, argumentNodes1Value); } } } @GeneratedBy(PopNode.class) public static final class PopNodeFactory implements NodeFactory { private static final PopNodeFactory POP_NODE_FACTORY_INSTANCE = new PopNodeFactory(); private PopNodeFactory() { } @Override public Class getNodeClass() { return PopNode.class; } @Override public List> getExecutionSignature() { return List.of(); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public PopNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return POP_NODE_FACTORY_INSTANCE; } @NeverDefault public static PopNode create(RubyNode[] argumentNodes) { return new PopNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link PopNode#pop}
         *     Activation probability: 1.00000
         *     With/without class size: 16/0 bytes
         * 
*/ @GeneratedBy(PopNode.class) @SuppressWarnings("javadoc") public static final class PopNodeGen extends PopNode { private PopNodeGen(RubyNode[] argumentNodes) { } @Override public Object execute(VirtualFrame frameValue) { return pop(); } } } @GeneratedBy(ShiftNode.class) public static final class ShiftNodeFactory implements NodeFactory { private static final ShiftNodeFactory SHIFT_NODE_FACTORY_INSTANCE = new ShiftNodeFactory(); private ShiftNodeFactory() { } @Override public Class getNodeClass() { return ShiftNode.class; } @Override public List> getExecutionSignature() { return List.of(); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public ShiftNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return SHIFT_NODE_FACTORY_INSTANCE; } @NeverDefault public static ShiftNode create(RubyNode[] argumentNodes) { return new ShiftNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link ShiftNode#shift}
         *     Activation probability: 1.00000
         *     With/without class size: 16/0 bytes
         * 
*/ @GeneratedBy(ShiftNode.class) @SuppressWarnings("javadoc") public static final class ShiftNodeGen extends ShiftNode { private ShiftNodeGen(RubyNode[] argumentNodes) { } @Override public Object execute(VirtualFrame frameValue) { return shift(); } } } @GeneratedBy(LengthNode.class) public static final class LengthNodeFactory implements NodeFactory { private static final LengthNodeFactory LENGTH_NODE_FACTORY_INSTANCE = new LengthNodeFactory(); private LengthNodeFactory() { } @Override public Class getNodeClass() { return LengthNode.class; } @Override public List> getExecutionSignature() { return List.of(); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public LengthNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return LENGTH_NODE_FACTORY_INSTANCE; } @NeverDefault public static LengthNode create(RubyNode[] argumentNodes) { return new LengthNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link LengthNode#length}
         *     Activation probability: 1.00000
         *     With/without class size: 16/0 bytes
         * 
*/ @GeneratedBy(LengthNode.class) @SuppressWarnings("javadoc") public static final class LengthNodeGen extends LengthNode { private LengthNodeGen(RubyNode[] argumentNodes) { } @Override public Object execute(VirtualFrame frameValue) { return length(); } } } @GeneratedBy(ClearNode.class) public static final class ClearNodeFactory implements NodeFactory { private static final ClearNodeFactory CLEAR_NODE_FACTORY_INSTANCE = new ClearNodeFactory(); private ClearNodeFactory() { } @Override public Class getNodeClass() { return ClearNode.class; } @Override public List> getExecutionSignature() { return List.of(); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public ClearNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return CLEAR_NODE_FACTORY_INSTANCE; } @NeverDefault public static ClearNode create(RubyNode[] argumentNodes) { return new ClearNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link ClearNode#clear}
         *     Activation probability: 1.00000
         *     With/without class size: 16/0 bytes
         * 
*/ @GeneratedBy(ClearNode.class) @SuppressWarnings("javadoc") public static final class ClearNodeGen extends ClearNode { private ClearNodeGen(RubyNode[] argumentNodes) { } @Override public Object execute(VirtualFrame frameValue) { return clear(); } } } @GeneratedBy(EachNode.class) public static final class EachNodeFactory implements NodeFactory { private static final EachNodeFactory EACH_NODE_FACTORY_INSTANCE = new EachNodeFactory(); private EachNodeFactory() { } @Override public Class getNodeClass() { return EachNode.class; } @Override public List> getExecutionSignature() { return List.of(RubyNode.class, RubyNode.class); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public EachNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return EACH_NODE_FACTORY_INSTANCE; } @NeverDefault public static EachNode create(RubyNode[] argumentNodes) { return new EachNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link EachNode#each}
         *     Activation probability: 1.00000
         *     With/without class size: 32/9 bytes
         * 
*/ @GeneratedBy(EachNode.class) @SuppressWarnings("javadoc") public static final class EachNodeGen extends EachNode { private static final StateField STATE_0_EachNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
             *   Specialization: {@link EachNode#each}
             *   Parameter: {@link CallBlockNode} yieldNode
             *   Inline method: {@link CallBlockNodeGen#inline}
*/ private static final CallBlockNode INLINED_YIELD_NODE_ = CallBlockNodeGen.inline(InlineTarget.create(CallBlockNode.class, STATE_0_EachNode_UPDATER.subUpdater(1, 2), ReferenceField.create(MethodHandles.lookup(), "yieldNode__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "yieldNode__field2_", Node.class))); @Child private RubyNode argumentNodes0_; @Child private RubyNode argumentNodes1_; /** * State Info:
             *   0: SpecializationActive {@link EachNode#each}
             *   1-2: InlinedCache
             *        Specialization: {@link EachNode#each}
             *        Parameter: {@link CallBlockNode} yieldNode
             *        Inline method: {@link CallBlockNodeGen#inline}
             * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
             *   Specialization: {@link EachNode#each}
             *   Parameter: {@link CallBlockNode} yieldNode
             *   Inline method: {@link CallBlockNodeGen#inline}
             *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node yieldNode__field1_; /** * Source Info:
             *   Specialization: {@link EachNode#each}
             *   Parameter: {@link CallBlockNode} yieldNode
             *   Inline method: {@link CallBlockNodeGen#inline}
             *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node yieldNode__field2_; private EachNodeGen(RubyNode[] argumentNodes) { this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null; this.argumentNodes1_ = argumentNodes != null && 1 < argumentNodes.length ? argumentNodes[1] : null; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue); Object argumentNodes1Value_ = this.argumentNodes1_.execute(frameValue); if ((state_0 & 0b1) != 0 /* is SpecializationActive[ReadlineHistoryNodes.EachNode.each(RubyBasicObject, RubyProc, CallBlockNode)] */ && argumentNodes0Value_ instanceof RubyBasicObject) { RubyBasicObject argumentNodes0Value__ = (RubyBasicObject) argumentNodes0Value_; if (argumentNodes1Value_ instanceof RubyProc) { RubyProc argumentNodes1Value__ = (RubyProc) argumentNodes1Value_; return each(argumentNodes0Value__, argumentNodes1Value__, INLINED_YIELD_NODE_); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(argumentNodes0Value_, argumentNodes1Value_); } private RubyBasicObject executeAndSpecialize(Object argumentNodes0Value, Object argumentNodes1Value) { int state_0 = this.state_0_; if (argumentNodes0Value instanceof RubyBasicObject) { RubyBasicObject argumentNodes0Value_ = (RubyBasicObject) argumentNodes0Value; if (argumentNodes1Value instanceof RubyProc) { RubyProc argumentNodes1Value_ = (RubyProc) argumentNodes1Value; state_0 = state_0 | 0b1 /* add SpecializationActive[ReadlineHistoryNodes.EachNode.each(RubyBasicObject, RubyProc, CallBlockNode)] */; this.state_0_ = state_0; return each(argumentNodes0Value_, argumentNodes1Value_, INLINED_YIELD_NODE_); } } throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_, this.argumentNodes1_}, argumentNodes0Value, argumentNodes1Value); } } } @GeneratedBy(GetIndexNode.class) public static final class GetIndexNodeFactory implements NodeFactory { private static final GetIndexNodeFactory GET_INDEX_NODE_FACTORY_INSTANCE = new GetIndexNodeFactory(); private GetIndexNodeFactory() { } @Override public Class getNodeClass() { return GetIndexNode.class; } @Override public List> getExecutionSignature() { return List.of(RubyNode.class); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public GetIndexNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return GET_INDEX_NODE_FACTORY_INSTANCE; } @NeverDefault public static GetIndexNode create(RubyNode[] argumentNodes) { return new GetIndexNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link GetIndexNode#getIndex}
         *     Activation probability: 1.00000
         *     With/without class size: 16/0 bytes
         * 
*/ @GeneratedBy(GetIndexNode.class) @SuppressWarnings("javadoc") public static final class GetIndexNodeGen extends GetIndexNode { @Child private RubyNode argumentNodes0_; /** * State Info:
             *   0: SpecializationActive {@link GetIndexNode#getIndex}
             * 
*/ @CompilationFinal private int state_0_; private GetIndexNodeGen(RubyNode[] argumentNodes) { this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[ReadlineHistoryNodes.GetIndexNode.getIndex(int)] */ && argumentNodes0Value_ instanceof Integer) { int argumentNodes0Value__ = (int) argumentNodes0Value_; return getIndex(argumentNodes0Value__); } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(argumentNodes0Value_); } private Object executeAndSpecialize(Object argumentNodes0Value) { int state_0 = this.state_0_; if (argumentNodes0Value instanceof Integer) { int argumentNodes0Value_ = (int) argumentNodes0Value; state_0 = state_0 | 0b1 /* add SpecializationActive[ReadlineHistoryNodes.GetIndexNode.getIndex(int)] */; this.state_0_ = state_0; return getIndex(argumentNodes0Value_); } throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value); } } } @GeneratedBy(SetIndexNode.class) public static final class SetIndexNodeFactory implements NodeFactory { private static final SetIndexNodeFactory SET_INDEX_NODE_FACTORY_INSTANCE = new SetIndexNodeFactory(); private SetIndexNodeFactory() { } @Override public Class getNodeClass() { return SetIndexNode.class; } @Override public List> getExecutionSignature() { return List.of(RubyNode.class, RubyNode.class); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public SetIndexNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return SET_INDEX_NODE_FACTORY_INSTANCE; } @NeverDefault public static SetIndexNode create(RubyNode[] argumentNodes) { return new SetIndexNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link SetIndexNode#setIndex}
         *     Activation probability: 1.00000
         *     With/without class size: 36/14 bytes
         * 
*/ @GeneratedBy(SetIndexNode.class) @SuppressWarnings("javadoc") public static final class SetIndexNodeGen extends SetIndexNode { private static final StateField STATE_0_SetIndexNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
             *   Specialization: {@link SetIndexNode#setIndex}
             *   Parameter: {@link ToJavaStringNode} toJavaStringNode
             *   Inline method: {@link ToJavaStringNodeGen#inline}
*/ private static final ToJavaStringNode INLINED_TO_JAVA_STRING_NODE_ = ToJavaStringNodeGen.inline(InlineTarget.create(ToJavaStringNode.class, STATE_0_SetIndexNode_UPDATER.subUpdater(1, 12), ReferenceField.create(MethodHandles.lookup(), "toJavaStringNode__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "toJavaStringNode__field2_", Node.class))); @Child private RubyNode argumentNodes0_; @Child private RubyNode argumentNodes1_; /** * State Info:
             *   0: SpecializationActive {@link SetIndexNode#setIndex}
             *   1-12: InlinedCache
             *        Specialization: {@link SetIndexNode#setIndex}
             *        Parameter: {@link ToJavaStringNode} toJavaStringNode
             *        Inline method: {@link ToJavaStringNodeGen#inline}
             * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
             *   Specialization: {@link SetIndexNode#setIndex}
             *   Parameter: {@link ToIntNode} toIntNode
*/ @Child private ToIntNode toIntNode_; /** * Source Info:
             *   Specialization: {@link SetIndexNode#setIndex}
             *   Parameter: {@link ToJavaStringNode} toJavaStringNode
             *   Inline method: {@link ToJavaStringNodeGen#inline}
             *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toJavaStringNode__field1_; /** * Source Info:
             *   Specialization: {@link SetIndexNode#setIndex}
             *   Parameter: {@link ToJavaStringNode} toJavaStringNode
             *   Inline method: {@link ToJavaStringNodeGen#inline}
             *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toJavaStringNode__field2_; private SetIndexNodeGen(RubyNode[] argumentNodes) { this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null; this.argumentNodes1_ = argumentNodes != null && 1 < argumentNodes.length ? argumentNodes[1] : null; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue); Object argumentNodes1Value_ = this.argumentNodes1_.execute(frameValue); if ((state_0 & 0b1) != 0 /* is SpecializationActive[ReadlineHistoryNodes.SetIndexNode.setIndex(Object, Object, ToIntNode, ToJavaStringNode)] */) { { ToIntNode toIntNode__ = this.toIntNode_; if (toIntNode__ != null) { return setIndex(argumentNodes0Value_, argumentNodes1Value_, toIntNode__, INLINED_TO_JAVA_STRING_NODE_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(argumentNodes0Value_, argumentNodes1Value_); } private Object executeAndSpecialize(Object argumentNodes0Value, Object argumentNodes1Value) { int state_0 = this.state_0_; ToIntNode toIntNode__ = this.insert((ToIntNodeGen.create())); Objects.requireNonNull(toIntNode__, "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.toIntNode_ = toIntNode__; state_0 = state_0 | 0b1 /* add SpecializationActive[ReadlineHistoryNodes.SetIndexNode.setIndex(Object, Object, ToIntNode, ToJavaStringNode)] */; this.state_0_ = state_0; return setIndex(argumentNodes0Value, argumentNodes1Value, toIntNode__, INLINED_TO_JAVA_STRING_NODE_); } } } @GeneratedBy(DeleteAtNode.class) public static final class DeleteAtNodeFactory implements NodeFactory { private static final DeleteAtNodeFactory DELETE_AT_NODE_FACTORY_INSTANCE = new DeleteAtNodeFactory(); private DeleteAtNodeFactory() { } @Override public Class getNodeClass() { return DeleteAtNode.class; } @Override public List> getExecutionSignature() { return List.of(RubyNode.class); } @Override public List>> getNodeSignatures() { return List.of(List.of(RubyNode[].class)); } @Override public DeleteAtNode createNode(Object... arguments) { if (arguments.length == 1 && (arguments[0] == null || arguments[0] instanceof RubyNode[])) { return create((RubyNode[]) arguments[0]); } else { throw new IllegalArgumentException("Invalid create signature."); } } public static NodeFactory getInstance() { return DELETE_AT_NODE_FACTORY_INSTANCE; } @NeverDefault public static DeleteAtNode create(RubyNode[] argumentNodes) { return new DeleteAtNodeGen(argumentNodes); } /** * Debug Info:
         *   Specialization {@link DeleteAtNode#deleteAt}
         *     Activation probability: 1.00000
         *     With/without class size: 16/0 bytes
         * 
*/ @GeneratedBy(DeleteAtNode.class) @SuppressWarnings("javadoc") public static final class DeleteAtNodeGen extends DeleteAtNode { @Child private RubyNode argumentNodes0_; /** * State Info:
             *   0: SpecializationActive {@link DeleteAtNode#deleteAt}
             * 
*/ @CompilationFinal private int state_0_; private DeleteAtNodeGen(RubyNode[] argumentNodes) { this.argumentNodes0_ = argumentNodes != null && 0 < argumentNodes.length ? argumentNodes[0] : null; } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object argumentNodes0Value_ = this.argumentNodes0_.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[ReadlineHistoryNodes.DeleteAtNode.deleteAt(int)] */ && argumentNodes0Value_ instanceof Integer) { int argumentNodes0Value__ = (int) argumentNodes0Value_; return deleteAt(argumentNodes0Value__); } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(argumentNodes0Value_); } private Object executeAndSpecialize(Object argumentNodes0Value) { int state_0 = this.state_0_; if (argumentNodes0Value instanceof Integer) { int argumentNodes0Value_ = (int) argumentNodes0Value; state_0 = state_0 | 0b1 /* add SpecializationActive[ReadlineHistoryNodes.DeleteAtNode.deleteAt(int)] */; this.state_0_ = state_0; return deleteAt(argumentNodes0Value_); } throw new UnsupportedSpecializationException(this, new Node[] {this.argumentNodes0_}, argumentNodes0Value); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy