org.jruby.truffle.debug.TruffleDebugNodesFactory Maven / Gradle / Ivy
// CheckStyle: start generated
package org.jruby.truffle.debug;
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.NodeFactory;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
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.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.object.DynamicObject;
import java.util.Arrays;
import java.util.List;
import org.jruby.truffle.builtins.CoreMethodNode;
import org.jruby.truffle.debug.TruffleDebugNodes.ASTNode;
import org.jruby.truffle.debug.TruffleDebugNodes.ArrayStorageNode;
import org.jruby.truffle.debug.TruffleDebugNodes.BreakNode;
import org.jruby.truffle.debug.TruffleDebugNodes.IsSharedNode;
import org.jruby.truffle.debug.TruffleDebugNodes.JavaClassOfNode;
import org.jruby.truffle.debug.TruffleDebugNodes.ObjectTypeOfNode;
import org.jruby.truffle.debug.TruffleDebugNodes.PrintBacktraceNode;
import org.jruby.truffle.debug.TruffleDebugNodes.RemoveNode;
import org.jruby.truffle.debug.TruffleDebugNodes.ShapeNode;
import org.jruby.truffle.debug.TruffleDebugNodes.SimpleShellNode;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.RubyTypesGen;
@GeneratedBy(TruffleDebugNodes.class)
public final class TruffleDebugNodesFactory {
public static List> getFactories() {
return Arrays.asList(BreakNodeFactory.getInstance(), RemoveNodeFactory.getInstance(), JavaClassOfNodeFactory.getInstance(), SimpleShellNodeFactory.getInstance(), PrintBacktraceNodeFactory.getInstance(), ASTNodeFactory.getInstance(), ObjectTypeOfNodeFactory.getInstance(), ShapeNodeFactory.getInstance(), ArrayStorageNodeFactory.getInstance(), IsSharedNodeFactory.getInstance());
}
@GeneratedBy(BreakNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class BreakNodeFactory implements NodeFactory {
private static BreakNodeFactory breakNodeFactoryInstance;
private BreakNodeFactory() {
}
@Override
public Class getNodeClass() {
return BreakNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class, RubyNode.class, RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public BreakNode 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 (breakNodeFactoryInstance == null) {
breakNodeFactoryInstance = new BreakNodeFactory();
}
return breakNodeFactoryInstance;
}
public static BreakNode create(RubyNode[] arguments) {
return new BreakNodeGen(arguments);
}
@GeneratedBy(BreakNode.class)
public static final class BreakNodeGen extends BreakNode implements SpecializedNode {
@Child private RubyNode arguments0_;
@Child private RubyNode arguments1_;
@Child private RubyNode arguments2_;
@CompilationFinal private Class> arguments1Type_;
@Child private BaseNode_ specialization_;
private BreakNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
this.arguments1_ = arguments != null && 1 < arguments.length ? arguments[1] : null;
this.arguments2_ = arguments != null && 2 < arguments.length ? arguments[2] : null;
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 DynamicObject executeDynamicObject(VirtualFrame frameValue) {
return specialization_.executeDynamicObject(frameValue);
}
@Override
public SpecializationNode getSpecializationNode() {
return specialization_;
}
@Override
public Node deepCopy() {
return SpecializationNode.updateRoot(super.deepCopy());
}
@GeneratedBy(BreakNode.class)
private abstract static class BaseNode_ extends SpecializationNode {
@CompilationFinal protected BreakNodeGen root;
BaseNode_(BreakNodeGen root, int index) {
super(index);
this.root = root;
}
@Override
protected final void setRoot(Node root) {
this.root = (BreakNodeGen) root;
}
@Override
protected final Node[] getSuppliedChildren() {
return new Node[] {root.arguments0_, root.arguments1_, root.arguments2_};
}
@Override
public final Object acceptAndExecute(Frame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value) {
return this.executeDynamicObject_((VirtualFrame) frameValue, arguments0Value, arguments1Value, arguments2Value);
}
public abstract DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value);
public Object execute(VirtualFrame frameValue) {
Object arguments0Value_ = root.arguments0_.execute(frameValue);
Object arguments1Value_ = executeArguments1_(frameValue);
Object arguments2Value_ = root.arguments2_.execute(frameValue);
return executeDynamicObject_(frameValue, arguments0Value_, arguments1Value_, arguments2Value_);
}
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
public DynamicObject executeDynamicObject(VirtualFrame frameValue) {
return (DynamicObject) execute(frameValue);
}
@Override
protected final SpecializationNode createNext(Frame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value) {
if (arguments0Value instanceof DynamicObject && RubyTypesGen.isImplicitInteger(arguments1Value) && arguments2Value instanceof DynamicObject) {
DynamicObject arguments0Value_ = (DynamicObject) arguments0Value;
if ((RubyGuards.isRubyString(arguments0Value_))) {
return SetBreakNode_.create(root, arguments1Value);
}
}
return null;
}
@Override
protected final SpecializationNode createPolymorphic() {
return PolymorphicNode_.create(root);
}
protected final BaseNode_ getNext() {
return (BaseNode_) this.next;
}
protected final Object executeArguments1_(Frame frameValue) {
Class> arguments1Type_ = root.arguments1Type_;
try {
if (arguments1Type_ == int.class) {
return root.arguments1_.executeInteger((VirtualFrame) frameValue);
} else if (arguments1Type_ == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Class> _type = Object.class;
try {
Object _value = root.arguments1_.execute((VirtualFrame) frameValue);
if (_value instanceof Integer) {
_type = int.class;
} else {
_type = Object.class;
}
return _value;
} finally {
root.arguments1Type_ = _type;
}
} else {
return root.arguments1_.execute((VirtualFrame) frameValue);
}
} catch (UnexpectedResultException ex) {
root.arguments1Type_ = Object.class;
return ex.getResult();
}
}
}
@GeneratedBy(BreakNode.class)
private static final class UninitializedNode_ extends BaseNode_ {
UninitializedNode_(BreakNodeGen root) {
super(root, 2147483647);
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value) {
return (DynamicObject) uninitialized(frameValue, arguments0Value, arguments1Value, arguments2Value);
}
static BaseNode_ create(BreakNodeGen root) {
return new UninitializedNode_(root);
}
}
@GeneratedBy(BreakNode.class)
private static final class PolymorphicNode_ extends BaseNode_ {
PolymorphicNode_(BreakNodeGen root) {
super(root, 0);
}
@Override
public SpecializationNode merge(SpecializationNode newNode, Frame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value) {
return polymorphicMerge(newNode, super.merge(newNode, frameValue, arguments0Value, arguments1Value, arguments2Value));
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value) {
return getNext().executeDynamicObject_(frameValue, arguments0Value, arguments1Value, arguments2Value);
}
static BaseNode_ create(BreakNodeGen root) {
return new PolymorphicNode_(root);
}
}
@GeneratedBy(methodName = "setBreak(DynamicObject, int, DynamicObject)", value = BreakNode.class)
private static final class SetBreakNode_ extends BaseNode_ {
private final Class> arguments1ImplicitType;
SetBreakNode_(BreakNodeGen root, Object arguments1Value) {
super(root, 1);
this.arguments1ImplicitType = RubyTypesGen.getImplicitIntegerClass(arguments1Value);
}
@Override
public boolean isSame(SpecializationNode other) {
return super.isSame(other) && this.arguments1ImplicitType == ((SetBreakNode_) other).arguments1ImplicitType;
}
@Override
public Object execute(VirtualFrame frameValue) {
return executeDynamicObject(frameValue);
}
@Override
public DynamicObject executeDynamicObject(VirtualFrame frameValue) {
DynamicObject arguments0Value_;
try {
arguments0Value_ = root.arguments0_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
Object arguments1Value = executeArguments1_(frameValue);
Object arguments2Value = root.arguments2_.execute(frameValue);
return getNext().executeDynamicObject_(frameValue, ex.getResult(), arguments1Value, arguments2Value);
}
int arguments1Value_;
try {
if (arguments1ImplicitType == int.class) {
arguments1Value_ = root.arguments1_.executeInteger(frameValue);
} else {
Object arguments1Value__ = executeArguments1_(frameValue);
arguments1Value_ = RubyTypesGen.expectImplicitInteger(arguments1Value__, arguments1ImplicitType);
}
} catch (UnexpectedResultException ex) {
Object arguments2Value = root.arguments2_.execute(frameValue);
return getNext().executeDynamicObject_(frameValue, arguments0Value_, ex.getResult(), arguments2Value);
}
DynamicObject arguments2Value_;
try {
arguments2Value_ = root.arguments2_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
return getNext().executeDynamicObject_(frameValue, arguments0Value_, arguments1Value_, ex.getResult());
}
if ((RubyGuards.isRubyString(arguments0Value_))) {
return root.setBreak(arguments0Value_, arguments1Value_, arguments2Value_);
}
return getNext().executeDynamicObject_(frameValue, arguments0Value_, arguments1Value_, arguments2Value_);
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value, Object arguments1Value, Object arguments2Value) {
if (arguments0Value instanceof DynamicObject && RubyTypesGen.isImplicitInteger(arguments1Value, arguments1ImplicitType) && arguments2Value instanceof DynamicObject) {
DynamicObject arguments0Value_ = (DynamicObject) arguments0Value;
int arguments1Value_ = RubyTypesGen.asImplicitInteger(arguments1Value, arguments1ImplicitType);
DynamicObject arguments2Value_ = (DynamicObject) arguments2Value;
if ((RubyGuards.isRubyString(arguments0Value_))) {
return root.setBreak(arguments0Value_, arguments1Value_, arguments2Value_);
}
}
return getNext().executeDynamicObject_(frameValue, arguments0Value, arguments1Value, arguments2Value);
}
static BaseNode_ create(BreakNodeGen root, Object arguments1Value) {
return new SetBreakNode_(root, arguments1Value);
}
}
}
}
@GeneratedBy(RemoveNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class RemoveNodeFactory implements NodeFactory {
private static RemoveNodeFactory removeNodeFactoryInstance;
private RemoveNodeFactory() {
}
@Override
public Class getNodeClass() {
return RemoveNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public RemoveNode 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 (removeNodeFactoryInstance == null) {
removeNodeFactoryInstance = new RemoveNodeFactory();
}
return removeNodeFactoryInstance;
}
public static RemoveNode create(RubyNode[] arguments) {
return new RemoveNodeGen(arguments);
}
@GeneratedBy(RemoveNode.class)
public static final class RemoveNodeGen extends RemoveNode {
@Child private RubyNode arguments0_;
@CompilationFinal private boolean seenUnsupported0;
private RemoveNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
DynamicObject arguments0Value_;
try {
arguments0Value_ = arguments0_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
throw unsupported(ex.getResult());
}
if ((RubyGuards.isHandle(arguments0Value_))) {
return this.remove(arguments0Value_);
}
throw unsupported(arguments0Value_);
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
private UnsupportedSpecializationException unsupported(Object arguments0Value) {
if (!seenUnsupported0) {
CompilerDirectives.transferToInterpreterAndInvalidate();
seenUnsupported0 = true;
}
return new UnsupportedSpecializationException(this, new Node[] {arguments0_}, arguments0Value);
}
}
}
@GeneratedBy(JavaClassOfNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class JavaClassOfNodeFactory implements NodeFactory {
private static JavaClassOfNodeFactory javaClassOfNodeFactoryInstance;
private JavaClassOfNodeFactory() {
}
@Override
public Class getNodeClass() {
return JavaClassOfNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public JavaClassOfNode 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 (javaClassOfNodeFactoryInstance == null) {
javaClassOfNodeFactoryInstance = new JavaClassOfNodeFactory();
}
return javaClassOfNodeFactoryInstance;
}
public static JavaClassOfNode create(RubyNode[] arguments) {
return new JavaClassOfNodeGen(arguments);
}
@GeneratedBy(JavaClassOfNode.class)
public static final class JavaClassOfNodeGen extends JavaClassOfNode {
@Child private RubyNode arguments0_;
private JavaClassOfNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
Object arguments0Value_ = arguments0_.execute(frameValue);
return this.javaClassOf(arguments0Value_);
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
}
}
@GeneratedBy(SimpleShellNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class SimpleShellNodeFactory implements NodeFactory {
private static SimpleShellNodeFactory simpleShellNodeFactoryInstance;
private SimpleShellNodeFactory() {
}
@Override
public Class getNodeClass() {
return SimpleShellNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList();
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public SimpleShellNode 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 (simpleShellNodeFactoryInstance == null) {
simpleShellNodeFactoryInstance = new SimpleShellNodeFactory();
}
return simpleShellNodeFactoryInstance;
}
public static SimpleShellNode create(RubyNode[] arguments) {
return new SimpleShellNodeGen(arguments);
}
@GeneratedBy(SimpleShellNode.class)
public static final class SimpleShellNodeGen extends SimpleShellNode {
@SuppressWarnings("unused")
private SimpleShellNodeGen(RubyNode[] arguments) {
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
return this.simpleShell();
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
}
}
@GeneratedBy(PrintBacktraceNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class PrintBacktraceNodeFactory implements NodeFactory {
private static PrintBacktraceNodeFactory printBacktraceNodeFactoryInstance;
private PrintBacktraceNodeFactory() {
}
@Override
public Class getNodeClass() {
return PrintBacktraceNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList();
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList());
}
@Override
public PrintBacktraceNode createNode(Object... arguments) {
if (arguments.length == 0) {
return create();
} else {
throw new IllegalArgumentException("Invalid create signature.");
}
}
public static NodeFactory getInstance() {
if (printBacktraceNodeFactoryInstance == null) {
printBacktraceNodeFactoryInstance = new PrintBacktraceNodeFactory();
}
return printBacktraceNodeFactoryInstance;
}
public static PrintBacktraceNode create() {
return new PrintBacktraceNodeGen();
}
@GeneratedBy(PrintBacktraceNode.class)
public static final class PrintBacktraceNodeGen extends PrintBacktraceNode {
private PrintBacktraceNodeGen() {
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
return this.printBacktrace();
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
}
}
@GeneratedBy(ASTNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class ASTNodeFactory implements NodeFactory {
private static ASTNodeFactory aSTNodeFactoryInstance;
private ASTNodeFactory() {
}
@Override
public Class getNodeClass() {
return ASTNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public ASTNode 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 (aSTNodeFactoryInstance == null) {
aSTNodeFactoryInstance = new ASTNodeFactory();
}
return aSTNodeFactoryInstance;
}
public static ASTNode create(RubyNode[] arguments) {
return new ASTNodeGen(arguments);
}
@GeneratedBy(ASTNode.class)
public static final class ASTNodeGen extends ASTNode implements SpecializedNode {
@Child private RubyNode arguments0_;
@Child private BaseNode_ specialization_;
private ASTNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
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(ASTNode.class)
private abstract static class BaseNode_ extends SpecializationNode {
@CompilationFinal protected ASTNodeGen root;
BaseNode_(ASTNodeGen root, int index) {
super(index);
this.root = root;
}
@Override
protected final void setRoot(Node root) {
this.root = (ASTNodeGen) root;
}
@Override
protected final Node[] getSuppliedChildren() {
return new Node[] {root.arguments0_};
}
@Override
public final Object acceptAndExecute(Frame frameValue, Object arguments0Value) {
return this.executeDynamicObject_((VirtualFrame) frameValue, arguments0Value);
}
public abstract DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value);
public Object execute(VirtualFrame frameValue) {
Object arguments0Value_ = root.arguments0_.execute(frameValue);
return executeDynamicObject_(frameValue, arguments0Value_);
}
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
@Override
protected final SpecializationNode createNext(Frame frameValue, Object arguments0Value) {
if (arguments0Value instanceof DynamicObject) {
DynamicObject arguments0Value_ = (DynamicObject) arguments0Value;
if ((RubyGuards.isRubyMethod(arguments0Value_))) {
return AstMethodNode_.create(root);
}
if ((RubyGuards.isRubyUnboundMethod(arguments0Value_))) {
return AstUnboundMethodNode_.create(root);
}
if ((RubyGuards.isRubyProc(arguments0Value_))) {
return AstProcNode_.create(root);
}
}
return null;
}
@Override
protected final SpecializationNode createPolymorphic() {
return PolymorphicNode_.create(root);
}
protected final BaseNode_ getNext() {
return (BaseNode_) this.next;
}
}
@GeneratedBy(ASTNode.class)
private static final class UninitializedNode_ extends BaseNode_ {
UninitializedNode_(ASTNodeGen root) {
super(root, 2147483647);
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value) {
return (DynamicObject) uninitialized(frameValue, arguments0Value);
}
static BaseNode_ create(ASTNodeGen root) {
return new UninitializedNode_(root);
}
}
@GeneratedBy(ASTNode.class)
private static final class PolymorphicNode_ extends BaseNode_ {
PolymorphicNode_(ASTNodeGen root) {
super(root, 0);
}
@Override
public SpecializationNode merge(SpecializationNode newNode, Frame frameValue, Object arguments0Value) {
return polymorphicMerge(newNode, super.merge(newNode, frameValue, arguments0Value));
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value) {
return getNext().executeDynamicObject_(frameValue, arguments0Value);
}
static BaseNode_ create(ASTNodeGen root) {
return new PolymorphicNode_(root);
}
}
@GeneratedBy(methodName = "astMethod(DynamicObject)", value = ASTNode.class)
private static final class AstMethodNode_ extends BaseNode_ {
AstMethodNode_(ASTNodeGen root) {
super(root, 1);
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value) {
if (arguments0Value instanceof DynamicObject) {
DynamicObject arguments0Value_ = (DynamicObject) arguments0Value;
if ((RubyGuards.isRubyMethod(arguments0Value_))) {
return root.astMethod(arguments0Value_);
}
}
return getNext().executeDynamicObject_(frameValue, arguments0Value);
}
static BaseNode_ create(ASTNodeGen root) {
return new AstMethodNode_(root);
}
}
@GeneratedBy(methodName = "astUnboundMethod(DynamicObject)", value = ASTNode.class)
private static final class AstUnboundMethodNode_ extends BaseNode_ {
AstUnboundMethodNode_(ASTNodeGen root) {
super(root, 2);
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value) {
if (arguments0Value instanceof DynamicObject) {
DynamicObject arguments0Value_ = (DynamicObject) arguments0Value;
if ((RubyGuards.isRubyUnboundMethod(arguments0Value_))) {
return root.astUnboundMethod(arguments0Value_);
}
}
return getNext().executeDynamicObject_(frameValue, arguments0Value);
}
static BaseNode_ create(ASTNodeGen root) {
return new AstUnboundMethodNode_(root);
}
}
@GeneratedBy(methodName = "astProc(DynamicObject)", value = ASTNode.class)
private static final class AstProcNode_ extends BaseNode_ {
AstProcNode_(ASTNodeGen root) {
super(root, 3);
}
@Override
public DynamicObject executeDynamicObject_(VirtualFrame frameValue, Object arguments0Value) {
if (arguments0Value instanceof DynamicObject) {
DynamicObject arguments0Value_ = (DynamicObject) arguments0Value;
if ((RubyGuards.isRubyProc(arguments0Value_))) {
return root.astProc(arguments0Value_);
}
}
return getNext().executeDynamicObject_(frameValue, arguments0Value);
}
static BaseNode_ create(ASTNodeGen root) {
return new AstProcNode_(root);
}
}
}
}
@GeneratedBy(ObjectTypeOfNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class ObjectTypeOfNodeFactory implements NodeFactory {
private static ObjectTypeOfNodeFactory objectTypeOfNodeFactoryInstance;
private ObjectTypeOfNodeFactory() {
}
@Override
public Class getNodeClass() {
return ObjectTypeOfNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public ObjectTypeOfNode 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 (objectTypeOfNodeFactoryInstance == null) {
objectTypeOfNodeFactoryInstance = new ObjectTypeOfNodeFactory();
}
return objectTypeOfNodeFactoryInstance;
}
public static ObjectTypeOfNode create(RubyNode[] arguments) {
return new ObjectTypeOfNodeGen(arguments);
}
@GeneratedBy(ObjectTypeOfNode.class)
public static final class ObjectTypeOfNodeGen extends ObjectTypeOfNode {
@Child private RubyNode arguments0_;
@CompilationFinal private boolean seenUnsupported0;
private ObjectTypeOfNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
DynamicObject arguments0Value_;
try {
arguments0Value_ = arguments0_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
throw unsupported(ex.getResult());
}
return this.objectTypeOf(arguments0Value_);
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
private UnsupportedSpecializationException unsupported(Object arguments0Value) {
if (!seenUnsupported0) {
CompilerDirectives.transferToInterpreterAndInvalidate();
seenUnsupported0 = true;
}
return new UnsupportedSpecializationException(this, new Node[] {arguments0_}, arguments0Value);
}
}
}
@GeneratedBy(ShapeNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class ShapeNodeFactory implements NodeFactory {
private static ShapeNodeFactory shapeNodeFactoryInstance;
private ShapeNodeFactory() {
}
@Override
public Class getNodeClass() {
return ShapeNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public ShapeNode 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 (shapeNodeFactoryInstance == null) {
shapeNodeFactoryInstance = new ShapeNodeFactory();
}
return shapeNodeFactoryInstance;
}
public static ShapeNode create(RubyNode[] arguments) {
return new ShapeNodeGen(arguments);
}
@GeneratedBy(ShapeNode.class)
public static final class ShapeNodeGen extends ShapeNode {
@Child private RubyNode arguments0_;
@CompilationFinal private boolean seenUnsupported0;
private ShapeNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
DynamicObject arguments0Value_;
try {
arguments0Value_ = arguments0_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
throw unsupported(ex.getResult());
}
return this.shape(arguments0Value_);
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
private UnsupportedSpecializationException unsupported(Object arguments0Value) {
if (!seenUnsupported0) {
CompilerDirectives.transferToInterpreterAndInvalidate();
seenUnsupported0 = true;
}
return new UnsupportedSpecializationException(this, new Node[] {arguments0_}, arguments0Value);
}
}
}
@GeneratedBy(ArrayStorageNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class ArrayStorageNodeFactory implements NodeFactory {
private static ArrayStorageNodeFactory arrayStorageNodeFactoryInstance;
private ArrayStorageNodeFactory() {
}
@Override
public Class getNodeClass() {
return ArrayStorageNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public ArrayStorageNode 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 (arrayStorageNodeFactoryInstance == null) {
arrayStorageNodeFactoryInstance = new ArrayStorageNodeFactory();
}
return arrayStorageNodeFactoryInstance;
}
public static ArrayStorageNode create(RubyNode[] arguments) {
return new ArrayStorageNodeGen(arguments);
}
@GeneratedBy(ArrayStorageNode.class)
public static final class ArrayStorageNodeGen extends ArrayStorageNode {
@Child private RubyNode arguments0_;
@CompilationFinal private boolean seenUnsupported0;
private ArrayStorageNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@Override
public Object execute(VirtualFrame frameValue) {
DynamicObject arguments0Value_;
try {
arguments0Value_ = arguments0_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
throw unsupported(ex.getResult());
}
if ((RubyGuards.isRubyArray(arguments0Value_))) {
return this.arrayStorage(arguments0Value_);
}
throw unsupported(arguments0Value_);
}
@Override
public void executeVoid(VirtualFrame frameValue) {
execute(frameValue);
return;
}
private UnsupportedSpecializationException unsupported(Object arguments0Value) {
if (!seenUnsupported0) {
CompilerDirectives.transferToInterpreterAndInvalidate();
seenUnsupported0 = true;
}
return new UnsupportedSpecializationException(this, new Node[] {arguments0_}, arguments0Value);
}
}
}
@GeneratedBy(IsSharedNode.class)
@SuppressWarnings({"unchecked", "rawtypes"})
public static final class IsSharedNodeFactory implements NodeFactory {
private static IsSharedNodeFactory isSharedNodeFactoryInstance;
private IsSharedNodeFactory() {
}
@Override
public Class getNodeClass() {
return IsSharedNode.class;
}
@Override
public List getExecutionSignature() {
return Arrays.asList(RubyNode.class);
}
@Override
public List getNodeSignatures() {
return Arrays.asList(Arrays.asList(RubyNode[].class));
}
@Override
public IsSharedNode 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 (isSharedNodeFactoryInstance == null) {
isSharedNodeFactoryInstance = new IsSharedNodeFactory();
}
return isSharedNodeFactoryInstance;
}
public static IsSharedNode create(RubyNode[] arguments) {
return new IsSharedNodeGen(arguments);
}
@GeneratedBy(IsSharedNode.class)
public static final class IsSharedNodeGen extends IsSharedNode {
@Child private RubyNode arguments0_;
@CompilationFinal private boolean seenUnsupported0;
private IsSharedNodeGen(RubyNode[] arguments) {
this.arguments0_ = arguments != null && 0 < arguments.length ? arguments[0] : null;
}
@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) {
DynamicObject arguments0Value_;
try {
arguments0Value_ = arguments0_.executeDynamicObject(frameValue);
} catch (UnexpectedResultException ex) {
throw unsupported(ex.getResult());
}
return this.isShared(arguments0Value_);
}
private UnsupportedSpecializationException unsupported(Object arguments0Value) {
if (!seenUnsupported0) {
CompilerDirectives.transferToInterpreterAndInvalidate();
seenUnsupported0 = true;
}
return new UnsupportedSpecializationException(this, new Node[] {arguments0_}, arguments0Value);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy