com.oracle.truffle.api.interop.java.WriteFieldNodeSubNodeGen 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(WriteFieldNodeSub.class)
final class WriteFieldNodeSubNodeGen extends WriteFieldNodeSub implements SpecializedNode {
@Child private BaseNode_ specialization_;
private WriteFieldNodeSubNodeGen() {
this.specialization_ = UninitializedNode_.create(this);
}
@Override
public NodeCost getCost() {
return specialization_.getNodeCost();
}
@Override
public Object executeWithTarget(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
return specialization_.execute(frameValue, arg0Value, arg1Value, arg2Value);
}
@Override
public SpecializationNode getSpecializationNode() {
return specialization_;
}
@Override
public Node deepCopy() {
return SpecializationNode.updateRoot(super.deepCopy());
}
public static WriteFieldNodeSub create() {
return new WriteFieldNodeSubNodeGen();
}
@GeneratedBy(WriteFieldNodeSub.class)
private abstract static class BaseNode_ extends SpecializationNode {
@CompilationFinal protected WriteFieldNodeSubNodeGen root;
BaseNode_(WriteFieldNodeSubNodeGen root, int index) {
super(index);
this.root = root;
}
@Override
protected final void setRoot(Node root) {
this.root = (WriteFieldNodeSubNodeGen) root;
}
@Override
protected final Node[] getSuppliedChildren() {
return new Node[] {null, null, null};
}
@Override
public final Object acceptAndExecute(Frame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
return this.execute((VirtualFrame) frameValue, arg0Value, arg1Value, arg2Value);
}
public abstract Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value);
@Override
protected final SpecializationNode createNext(Frame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
if (arg0Value instanceof JavaObject) {
if (arg1Value instanceof String) {
return AccessWithTarget0Node_.create(root);
}
if (arg1Value instanceof Integer) {
return AccessWithTarget1Node_.create(root);
}
}
return null;
}
protected final BaseNode_ getNext() {
return (BaseNode_) this.next;
}
}
@GeneratedBy(WriteFieldNodeSub.class)
private static final class UninitializedNode_ extends BaseNode_ {
UninitializedNode_(WriteFieldNodeSubNodeGen root) {
super(root, 2147483647);
}
@Override
public Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
return uninitialized(frameValue, arg0Value, arg1Value, arg2Value);
}
static BaseNode_ create(WriteFieldNodeSubNodeGen root) {
return new UninitializedNode_(root);
}
}
@GeneratedBy(methodName = "accessWithTarget(VirtualFrame, JavaObject, String, Object)", value = WriteFieldNodeSub.class)
private static final class AccessWithTarget0Node_ extends BaseNode_ {
AccessWithTarget0Node_(WriteFieldNodeSubNodeGen root) {
super(root, 1);
}
@Override
public Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
if (arg0Value instanceof JavaObject && arg1Value instanceof String) {
JavaObject arg0Value_ = (JavaObject) arg0Value;
String arg1Value_ = (String) arg1Value;
return root.accessWithTarget(frameValue, arg0Value_, arg1Value_, arg2Value);
}
return getNext().execute(frameValue, arg0Value, arg1Value, arg2Value);
}
static BaseNode_ create(WriteFieldNodeSubNodeGen root) {
return new AccessWithTarget0Node_(root);
}
}
@GeneratedBy(methodName = "accessWithTarget(JavaObject, int, Object)", value = WriteFieldNodeSub.class)
private static final class AccessWithTarget1Node_ extends BaseNode_ {
AccessWithTarget1Node_(WriteFieldNodeSubNodeGen root) {
super(root, 2);
}
@Override
public Object execute(VirtualFrame frameValue, Object arg0Value, Object arg1Value, Object arg2Value) {
if (arg0Value instanceof JavaObject && arg1Value instanceof Integer) {
JavaObject arg0Value_ = (JavaObject) arg0Value;
int arg1Value_ = (int) arg1Value;
return root.accessWithTarget(arg0Value_, arg1Value_, arg2Value);
}
return getNext().execute(frameValue, arg0Value, arg1Value, arg2Value);
}
static BaseNode_ create(WriteFieldNodeSubNodeGen root) {
return new AccessWithTarget1Node_(root);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy