org.jruby.truffle.interop.ForeignWriteStringCachingHelperNodeGen Maven / Gradle / Ivy
The newest version!
// CheckStyle: start generated
package org.jruby.truffle.interop;
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;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.core.cast.NameToJavaStringNode;
import org.jruby.truffle.language.RubyNode;
@GeneratedBy(ForeignWriteStringCachingHelperNode.class)
final class ForeignWriteStringCachingHelperNodeGen extends ForeignWriteStringCachingHelperNode implements SpecializedNode {
@Child private RubyNode receiver_;
@Child private RubyNode name_;
@Child private RubyNode value_;
@Child private BaseNode_ specialization_;
private ForeignWriteStringCachingHelperNodeGen(RubyNode receiver, RubyNode name, RubyNode value) {
this.receiver_ = receiver;
this.name_ = name;
this.value_ = value;
this.specialization_ = UninitializedNode_.create(this);
}
@Override
public NodeCost getCost() {
return specialization_.getNodeCost();
}
@Override
public Object executeStringCachingHelper(VirtualFrame frameValue, DynamicObject receiverValue, Object nameValue, Object valueValue) {
return specialization_.execute1(frameValue, receiverValue, nameValue, valueValue);
}
@Override
public Object execute(VirtualFrame frameValue) {
return specialization_.execute0(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());
}
public static ForeignWriteStringCachingHelperNode create(RubyNode receiver, RubyNode name, RubyNode value) {
return new ForeignWriteStringCachingHelperNodeGen(receiver, name, value);
}
@GeneratedBy(ForeignWriteStringCachingHelperNode.class)
private abstract static class BaseNode_ extends SpecializationNode {
@CompilationFinal protected ForeignWriteStringCachingHelperNodeGen root;
BaseNode_(ForeignWriteStringCachingHelperNodeGen root, int index) {
super(index);
this.root = root;
}
@Override
protected final void setRoot(Node root) {
this.root = (ForeignWriteStringCachingHelperNodeGen) root;
}
@Override
protected final Node[] getSuppliedChildren() {
return new Node[] {root.receiver_, root.name_, root.value_};
}
@Override
public final Object acceptAndExecute(Frame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
return this.execute_((VirtualFrame) frameValue, receiverValue, nameValue, valueValue);
}
public abstract Object execute_(VirtualFrame frameValue, Object receiverValue, Object nameValue, Object valueValue);
public Object execute1(VirtualFrame frameValue, DynamicObject receiverValue, Object nameValue, Object valueValue) {
return execute_(frameValue, receiverValue, nameValue, valueValue);
}
public Object execute0(VirtualFrame frameValue) {
Object receiverValue_ = root.receiver_.execute(frameValue);
Object nameValue_ = root.name_.execute(frameValue);
Object valueValue_ = root.value_.execute(frameValue);
return execute_(frameValue, receiverValue_, nameValue_, valueValue_);
}
public void executeVoid(VirtualFrame frameValue) {
execute0(frameValue);
return;
}
@Override
protected final SpecializationNode createNext(Frame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
if (receiverValue instanceof DynamicObject) {
if ((root.isStringLike(nameValue))) {
NameToJavaStringNode toJavaStringNode1 = (NameToJavaStringNode.create());
ForeignWriteStringCachedHelperNode nextHelper1 = (root.createNextHelper());
return CacheStringLikeAndForwardNode_.create(root, toJavaStringNode1, nextHelper1);
} else {
ForeignWriteStringCachedHelperNode nextHelper2 = (root.createNextHelper());
return PassThroughNonStringNode_.create(root, nextHelper2);
}
}
return null;
}
@Override
protected final SpecializationNode createPolymorphic() {
return PolymorphicNode_.create(root);
}
protected final BaseNode_ getNext() {
return (BaseNode_) this.next;
}
}
@GeneratedBy(ForeignWriteStringCachingHelperNode.class)
private static final class UninitializedNode_ extends BaseNode_ {
UninitializedNode_(ForeignWriteStringCachingHelperNodeGen root) {
super(root, 2147483647);
}
@Override
public Object execute_(VirtualFrame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
return uninitialized(frameValue, receiverValue, nameValue, valueValue);
}
static BaseNode_ create(ForeignWriteStringCachingHelperNodeGen root) {
return new UninitializedNode_(root);
}
}
@GeneratedBy(ForeignWriteStringCachingHelperNode.class)
private static final class PolymorphicNode_ extends BaseNode_ {
PolymorphicNode_(ForeignWriteStringCachingHelperNodeGen root) {
super(root, 0);
}
@Override
public SpecializationNode merge(SpecializationNode newNode, Frame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
return polymorphicMerge(newNode, super.merge(newNode, frameValue, receiverValue, nameValue, valueValue));
}
@Override
public Object execute_(VirtualFrame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
return getNext().execute_(frameValue, receiverValue, nameValue, valueValue);
}
static BaseNode_ create(ForeignWriteStringCachingHelperNodeGen root) {
return new PolymorphicNode_(root);
}
}
@GeneratedBy(methodName = "cacheStringLikeAndForward(VirtualFrame, DynamicObject, Object, Object, NameToJavaStringNode, ForeignWriteStringCachedHelperNode)", value = ForeignWriteStringCachingHelperNode.class)
private static final class CacheStringLikeAndForwardNode_ extends BaseNode_ {
@Child private NameToJavaStringNode toJavaStringNode;
@Child private ForeignWriteStringCachedHelperNode nextHelper;
CacheStringLikeAndForwardNode_(ForeignWriteStringCachingHelperNodeGen root, NameToJavaStringNode toJavaStringNode, ForeignWriteStringCachedHelperNode nextHelper) {
super(root, 1);
this.toJavaStringNode = toJavaStringNode;
this.nextHelper = nextHelper;
}
@Override
public Object execute1(VirtualFrame frameValue, DynamicObject receiverValue, Object nameValue, Object valueValue) {
if ((root.isStringLike(nameValue))) {
return root.cacheStringLikeAndForward(frameValue, receiverValue, nameValue, valueValue, this.toJavaStringNode, this.nextHelper);
}
return getNext().execute1(frameValue, receiverValue, nameValue, valueValue);
}
@Override
public Object execute_(VirtualFrame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
if (receiverValue instanceof DynamicObject) {
DynamicObject receiverValue_ = (DynamicObject) receiverValue;
if ((root.isStringLike(nameValue))) {
return root.cacheStringLikeAndForward(frameValue, receiverValue_, nameValue, valueValue, this.toJavaStringNode, this.nextHelper);
}
}
return getNext().execute_(frameValue, receiverValue, nameValue, valueValue);
}
static BaseNode_ create(ForeignWriteStringCachingHelperNodeGen root, NameToJavaStringNode toJavaStringNode, ForeignWriteStringCachedHelperNode nextHelper) {
return new CacheStringLikeAndForwardNode_(root, toJavaStringNode, nextHelper);
}
}
@GeneratedBy(methodName = "passThroughNonString(VirtualFrame, DynamicObject, Object, Object, ForeignWriteStringCachedHelperNode)", value = ForeignWriteStringCachingHelperNode.class)
private static final class PassThroughNonStringNode_ extends BaseNode_ {
@Child private ForeignWriteStringCachedHelperNode nextHelper;
PassThroughNonStringNode_(ForeignWriteStringCachingHelperNodeGen root, ForeignWriteStringCachedHelperNode nextHelper) {
super(root, 2);
this.nextHelper = nextHelper;
}
@Override
public Object execute1(VirtualFrame frameValue, DynamicObject receiverValue, Object nameValue, Object valueValue) {
if ((!(root.isStringLike(nameValue)))) {
return root.passThroughNonString(frameValue, receiverValue, nameValue, valueValue, this.nextHelper);
}
return getNext().execute1(frameValue, receiverValue, nameValue, valueValue);
}
@Override
public Object execute_(VirtualFrame frameValue, Object receiverValue, Object nameValue, Object valueValue) {
if (receiverValue instanceof DynamicObject) {
DynamicObject receiverValue_ = (DynamicObject) receiverValue;
if ((!(root.isStringLike(nameValue)))) {
return root.passThroughNonString(frameValue, receiverValue_, nameValue, valueValue, this.nextHelper);
}
}
return getNext().execute_(frameValue, receiverValue, nameValue, valueValue);
}
static BaseNode_ create(ForeignWriteStringCachingHelperNodeGen root, ForeignWriteStringCachedHelperNode nextHelper) {
return new PassThroughNonStringNode_(root, nextHelper);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy