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

org.jruby.truffle.language.TruffleBootNodesFactory Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package org.jruby.truffle.language;

import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NodeFactory;
import com.oracle.truffle.api.dsl.internal.SpecializationNode;
import com.oracle.truffle.api.dsl.internal.SpecializedNode;
import com.oracle.truffle.api.frame.Frame;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.IndirectCallNode;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import java.util.Arrays;
import java.util.List;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.builtins.CoreMethodNode;
import org.jruby.truffle.language.TruffleBootNodes.ContextNode;
import org.jruby.truffle.language.TruffleBootNodes.InnerCheckSyntaxNode;
import org.jruby.truffle.language.TruffleBootNodes.MainNode;
import org.jruby.truffle.language.TruffleBootNodes.OriginalArgvNode;
import org.jruby.truffle.language.TruffleBootNodes.OriginalInputFileNode;
import org.jruby.truffle.language.TruffleBootNodes.OriginalLoadPathNode;
import org.jruby.truffle.language.TruffleBootNodes.RubyHomeNode;
import org.jruby.truffle.language.TruffleBootNodes.RubygemsEnabledNode;
import org.jruby.truffle.language.TruffleBootNodes.SourceOfCallerNode;

@GeneratedBy(TruffleBootNodes.class)
public final class TruffleBootNodesFactory {

    public static List> getFactories() {
        return Arrays.asList(RubyHomeNodeFactory.getInstance(), ContextNodeFactory.getInstance(), MainNodeFactory.getInstance(), OriginalArgvNodeFactory.getInstance(), OriginalInputFileNodeFactory.getInstance(), OriginalLoadPathNodeFactory.getInstance(), RubygemsEnabledNodeFactory.getInstance(), SourceOfCallerNodeFactory.getInstance(), InnerCheckSyntaxNodeFactory.getInstance());
    }

    @GeneratedBy(RubyHomeNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class RubyHomeNodeFactory implements NodeFactory {

        private static RubyHomeNodeFactory rubyHomeNodeFactoryInstance;

        private RubyHomeNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

        @Override
        public List getNodeSignatures() {
            return Arrays.asList(Arrays.asList());
        }

        @Override
        public RubyHomeNode createNode(Object... arguments) {
            if (arguments.length == 0) {
                return create();
            } else {
                throw new IllegalArgumentException("Invalid create signature.");
            }
        }

        public static NodeFactory getInstance() {
            if (rubyHomeNodeFactoryInstance == null) {
                rubyHomeNodeFactoryInstance = new RubyHomeNodeFactory();
            }
            return rubyHomeNodeFactoryInstance;
        }

        public static RubyHomeNode create() {
            return new RubyHomeNodeGen();
        }

        @GeneratedBy(RubyHomeNode.class)
        public static final class RubyHomeNodeGen extends RubyHomeNode {

            private RubyHomeNodeGen() {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return this.ruby_home();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                execute(frameValue);
                return;
            }

        }
    }
    @GeneratedBy(ContextNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class ContextNodeFactory implements NodeFactory {

        private static ContextNodeFactory contextNodeFactoryInstance;

        private ContextNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

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

        @Override
        public ContextNode 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() {
            if (contextNodeFactoryInstance == null) {
                contextNodeFactoryInstance = new ContextNodeFactory();
            }
            return contextNodeFactoryInstance;
        }

        public static ContextNode create(RubyNode[] arguments) {
            return new ContextNodeGen(arguments);
        }

        @GeneratedBy(ContextNode.class)
        public static final class ContextNodeGen extends ContextNode {

            @SuppressWarnings("unused")
            private ContextNodeGen(RubyNode[] arguments) {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return executeRubyContext_(frameValue);
            }

            @SuppressWarnings("unused")
            public RubyContext executeRubyContext_(VirtualFrame frameValue) {
                return this.context();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                executeRubyContext_(frameValue);
                return;
            }

        }
    }
    @GeneratedBy(MainNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class MainNodeFactory implements NodeFactory {

        private static MainNodeFactory mainNodeFactoryInstance;

        private MainNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

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

        @Override
        public MainNode 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() {
            if (mainNodeFactoryInstance == null) {
                mainNodeFactoryInstance = new MainNodeFactory();
            }
            return mainNodeFactoryInstance;
        }

        public static MainNode create(RubyNode[] arguments) {
            return new MainNodeGen(arguments);
        }

        @GeneratedBy(MainNode.class)
        public static final class MainNodeGen extends MainNode implements SpecializedNode {

            @Child private BaseNode_ specialization_;

            @SuppressWarnings("unused")
            private MainNodeGen(RubyNode[] arguments) {
                this.specialization_ = UninitializedNode_.create(this);
            }

            @Override
            public NodeCost getCost() {
                return specialization_.getNodeCost();
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return specialization_.execute(frameValue);
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                specialization_.executeVoid(frameValue);
                return;
            }

            @Override
            public SpecializationNode getSpecializationNode() {
                return specialization_;
            }

            @Override
            public Node deepCopy() {
                return SpecializationNode.updateRoot(super.deepCopy());
            }

            @GeneratedBy(MainNode.class)
            private abstract static class BaseNode_ extends SpecializationNode {

                @CompilationFinal protected MainNodeGen root;

                BaseNode_(MainNodeGen root, int index) {
                    super(index);
                    this.root = root;
                }

                @Override
                protected final void setRoot(Node root) {
                    this.root = (MainNodeGen) root;
                }

                @Override
                protected final Node[] getSuppliedChildren() {
                    return new Node[] {};
                }

                @Override
                public final Object acceptAndExecute(Frame frameValue) {
                    return this.execute((VirtualFrame) frameValue);
                }

                public abstract Object execute(VirtualFrame frameValue);

                public void executeVoid(VirtualFrame frameValue) {
                    execute(frameValue);
                    return;
                }

                @Override
                protected final SpecializationNode createNext(Frame frameValue) {
                    IndirectCallNode callNode1 = (IndirectCallNode.create());
                    return MainNode_.create(root, callNode1);
                }

            }
            @GeneratedBy(MainNode.class)
            private static final class UninitializedNode_ extends BaseNode_ {

                UninitializedNode_(MainNodeGen root) {
                    super(root, 2147483647);
                }

                @Override
                public Object execute(VirtualFrame frameValue) {
                    return uninitialized(frameValue);
                }

                static BaseNode_ create(MainNodeGen root) {
                    return new UninitializedNode_(root);
                }

            }
            @GeneratedBy(methodName = "main(VirtualFrame, IndirectCallNode)", value = MainNode.class)
            private static final class MainNode_ extends BaseNode_ {

                @Child private IndirectCallNode callNode;

                MainNode_(MainNodeGen root, IndirectCallNode callNode) {
                    super(root, 1);
                    this.callNode = callNode;
                }

                @Override
                public Object execute(VirtualFrame frameValue) {
                    return root.main(frameValue, this.callNode);
                }

                static BaseNode_ create(MainNodeGen root, IndirectCallNode callNode) {
                    return new MainNode_(root, callNode);
                }

            }
        }
    }
    @GeneratedBy(OriginalArgvNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class OriginalArgvNodeFactory implements NodeFactory {

        private static OriginalArgvNodeFactory originalArgvNodeFactoryInstance;

        private OriginalArgvNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

        @Override
        public List getNodeSignatures() {
            return Arrays.asList(Arrays.asList());
        }

        @Override
        public OriginalArgvNode createNode(Object... arguments) {
            if (arguments.length == 0) {
                return create();
            } else {
                throw new IllegalArgumentException("Invalid create signature.");
            }
        }

        public static NodeFactory getInstance() {
            if (originalArgvNodeFactoryInstance == null) {
                originalArgvNodeFactoryInstance = new OriginalArgvNodeFactory();
            }
            return originalArgvNodeFactoryInstance;
        }

        public static OriginalArgvNode create() {
            return new OriginalArgvNodeGen();
        }

        @GeneratedBy(OriginalArgvNode.class)
        public static final class OriginalArgvNodeGen extends OriginalArgvNode {

            private OriginalArgvNodeGen() {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return this.originalArgv();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                execute(frameValue);
                return;
            }

        }
    }
    @GeneratedBy(OriginalInputFileNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class OriginalInputFileNodeFactory implements NodeFactory {

        private static OriginalInputFileNodeFactory originalInputFileNodeFactoryInstance;

        private OriginalInputFileNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

        @Override
        public List getNodeSignatures() {
            return Arrays.asList(Arrays.asList());
        }

        @Override
        public OriginalInputFileNode createNode(Object... arguments) {
            if (arguments.length == 0) {
                return create();
            } else {
                throw new IllegalArgumentException("Invalid create signature.");
            }
        }

        public static NodeFactory getInstance() {
            if (originalInputFileNodeFactoryInstance == null) {
                originalInputFileNodeFactoryInstance = new OriginalInputFileNodeFactory();
            }
            return originalInputFileNodeFactoryInstance;
        }

        public static OriginalInputFileNode create() {
            return new OriginalInputFileNodeGen();
        }

        @GeneratedBy(OriginalInputFileNode.class)
        public static final class OriginalInputFileNodeGen extends OriginalInputFileNode {

            private OriginalInputFileNodeGen() {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return this.originalInputFile();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                execute(frameValue);
                return;
            }

        }
    }
    @GeneratedBy(OriginalLoadPathNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class OriginalLoadPathNodeFactory implements NodeFactory {

        private static OriginalLoadPathNodeFactory originalLoadPathNodeFactoryInstance;

        private OriginalLoadPathNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

        @Override
        public List getNodeSignatures() {
            return Arrays.asList(Arrays.asList());
        }

        @Override
        public OriginalLoadPathNode createNode(Object... arguments) {
            if (arguments.length == 0) {
                return create();
            } else {
                throw new IllegalArgumentException("Invalid create signature.");
            }
        }

        public static NodeFactory getInstance() {
            if (originalLoadPathNodeFactoryInstance == null) {
                originalLoadPathNodeFactoryInstance = new OriginalLoadPathNodeFactory();
            }
            return originalLoadPathNodeFactoryInstance;
        }

        public static OriginalLoadPathNode create() {
            return new OriginalLoadPathNodeGen();
        }

        @GeneratedBy(OriginalLoadPathNode.class)
        public static final class OriginalLoadPathNodeGen extends OriginalLoadPathNode {

            private OriginalLoadPathNodeGen() {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return this.originalLoadPath();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                execute(frameValue);
                return;
            }

        }
    }
    @GeneratedBy(RubygemsEnabledNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class RubygemsEnabledNodeFactory implements NodeFactory {

        private static RubygemsEnabledNodeFactory rubygemsEnabledNodeFactoryInstance;

        private RubygemsEnabledNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

        @Override
        public List getNodeSignatures() {
            return Arrays.asList(Arrays.asList());
        }

        @Override
        public RubygemsEnabledNode createNode(Object... arguments) {
            if (arguments.length == 0) {
                return create();
            } else {
                throw new IllegalArgumentException("Invalid create signature.");
            }
        }

        public static NodeFactory getInstance() {
            if (rubygemsEnabledNodeFactoryInstance == null) {
                rubygemsEnabledNodeFactoryInstance = new RubygemsEnabledNodeFactory();
            }
            return rubygemsEnabledNodeFactoryInstance;
        }

        public static RubygemsEnabledNode create() {
            return new RubygemsEnabledNodeGen();
        }

        @GeneratedBy(RubygemsEnabledNode.class)
        public static final class RubygemsEnabledNodeGen extends RubygemsEnabledNode {

            private RubygemsEnabledNodeGen() {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return executeBoolean(frameValue);
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                executeBoolean(frameValue);
                return;
            }

            @Override
            public boolean executeBoolean(VirtualFrame frameValue) {
                return this.isRubygemsEnabled();
            }

        }
    }
    @GeneratedBy(SourceOfCallerNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class SourceOfCallerNodeFactory implements NodeFactory {

        private static SourceOfCallerNodeFactory sourceOfCallerNodeFactoryInstance;

        private SourceOfCallerNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

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

        @Override
        public SourceOfCallerNode 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() {
            if (sourceOfCallerNodeFactoryInstance == null) {
                sourceOfCallerNodeFactoryInstance = new SourceOfCallerNodeFactory();
            }
            return sourceOfCallerNodeFactoryInstance;
        }

        public static SourceOfCallerNode create(RubyNode[] arguments) {
            return new SourceOfCallerNodeGen(arguments);
        }

        @GeneratedBy(SourceOfCallerNode.class)
        public static final class SourceOfCallerNodeGen extends SourceOfCallerNode {

            @SuppressWarnings("unused")
            private SourceOfCallerNodeGen(RubyNode[] arguments) {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return this.sourceOfCaller();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                execute(frameValue);
                return;
            }

        }
    }
    @GeneratedBy(InnerCheckSyntaxNode.class)
    @SuppressWarnings({"unchecked", "rawtypes"})
    public static final class InnerCheckSyntaxNodeFactory implements NodeFactory {

        private static InnerCheckSyntaxNodeFactory innerCheckSyntaxNodeFactoryInstance;

        private InnerCheckSyntaxNodeFactory() {
        }

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

        @Override
        public List getExecutionSignature() {
            return Arrays.asList();
        }

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

        @Override
        public InnerCheckSyntaxNode 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() {
            if (innerCheckSyntaxNodeFactoryInstance == null) {
                innerCheckSyntaxNodeFactoryInstance = new InnerCheckSyntaxNodeFactory();
            }
            return innerCheckSyntaxNodeFactoryInstance;
        }

        public static InnerCheckSyntaxNode create(RubyNode[] arguments) {
            return new InnerCheckSyntaxNodeGen(arguments);
        }

        @GeneratedBy(InnerCheckSyntaxNode.class)
        public static final class InnerCheckSyntaxNodeGen extends InnerCheckSyntaxNode {

            @SuppressWarnings("unused")
            private InnerCheckSyntaxNodeGen(RubyNode[] arguments) {
            }

            @Override
            public NodeCost getCost() {
                return NodeCost.MONOMORPHIC;
            }

            @Override
            public Object execute(VirtualFrame frameValue) {
                return this.innerCheckSyntax();
            }

            @Override
            public void executeVoid(VirtualFrame frameValue) {
                execute(frameValue);
                return;
            }

        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy