com.oracle.truffle.api.interop.java.ReadFieldNodeSubNodeGen Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-api Show documentation
Show all versions of truffle-api Show documentation
Truffle is a multi-language framework for executing dynamic languages
that achieves high performance when combined with Graal.
// CheckStyle: start generated
package com.oracle.truffle.api.interop.java;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.GeneratedBy;
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;
@GeneratedBy(ReadFieldNodeSub.class)
final class ReadFieldNodeSubNodeGen extends ReadFieldNodeSub implements SpecializedNode {
@Child private BaseNode_ specialization_;
private ReadFieldNodeSubNodeGen() {
this.specialization_ = UninitializedNode_.create(this);
}
@Override
public NodeCost getCost() {
return specialization_.getNodeCost();
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
return specialization_.execute(frameValue, arg0Value, arg1Value);
}
@Override
public SpecializationNode getSpecializationNode() {
return specialization_;
}
@Override
public Node deepCopy() {
return SpecializationNode.updateRoot(super.deepCopy());
}
public static ReadFieldNodeSub create() {
return new ReadFieldNodeSubNodeGen();
}
@GeneratedBy(ReadFieldNodeSub.class)
private abstract static class BaseNode_ extends SpecializationNode {
@CompilationFinal protected ReadFieldNodeSubNodeGen root;
BaseNode_(ReadFieldNodeSubNodeGen root, int index) {
super(index);
this.root = root;
}
@Override
protected final void setRoot(Node root) {
this.root = (ReadFieldNodeSubNodeGen) root;
}
@Override
protected final Node[] getSuppliedChildren() {
return new Node[] {null, null};
}
@Override
public final Object acceptAndExecute(Frame frameValue, Object arg0Value, Object arg1Value) {
return this.execute((VirtualFrame) frameValue, arg0Value, arg1Value);
}
public abstract Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value);
@Override
protected final SpecializationNode createNext(Frame frameValue, Object arg0Value, Object arg1Value) {
if (arg0Value instanceof JavaObject) {
if (arg1Value instanceof Integer) {
return AccessWithTarget0Node_.create(root);
}
if (arg1Value instanceof String) {
return AccessWithTarget1Node_.create(root);
}
}
return null;
}
protected final BaseNode_ getNext() {
return (BaseNode_) this.next;
}
}
@GeneratedBy(ReadFieldNodeSub.class)
private static final class UninitializedNode_ extends BaseNode_ {
UninitializedNode_(ReadFieldNodeSubNodeGen root) {
super(root, 2147483647);
}
@Override
public Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
return uninitialized(frameValue, arg0Value, arg1Value);
}
static BaseNode_ create(ReadFieldNodeSubNodeGen root) {
return new UninitializedNode_(root);
}
}
@GeneratedBy(methodName = "accessWithTarget(JavaObject, int)", value = ReadFieldNodeSub.class)
private static final class AccessWithTarget0Node_ extends BaseNode_ {
AccessWithTarget0Node_(ReadFieldNodeSubNodeGen root) {
super(root, 1);
}
@Override
public Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
if (arg0Value instanceof JavaObject && arg1Value instanceof Integer) {
JavaObject arg0Value_ = (JavaObject) arg0Value;
int arg1Value_ = (int) arg1Value;
return root.accessWithTarget(arg0Value_, arg1Value_);
}
return getNext().execute(frameValue, arg0Value, arg1Value);
}
static BaseNode_ create(ReadFieldNodeSubNodeGen root) {
return new AccessWithTarget0Node_(root);
}
}
@GeneratedBy(methodName = "accessWithTarget(JavaObject, String)", value = ReadFieldNodeSub.class)
private static final class AccessWithTarget1Node_ extends BaseNode_ {
AccessWithTarget1Node_(ReadFieldNodeSubNodeGen root) {
super(root, 2);
}
@Override
public Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value) {
if (arg0Value instanceof JavaObject && arg1Value instanceof String) {
JavaObject arg0Value_ = (JavaObject) arg0Value;
String arg1Value_ = (String) arg1Value;
return root.accessWithTarget(arg0Value_, arg1Value_);
}
return getNext().execute(frameValue, arg0Value, arg1Value);
}
static BaseNode_ create(ReadFieldNodeSubNodeGen root) {
return new AccessWithTarget1Node_(root);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy