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

org.jruby.truffle.language.objects.SingletonClassNodeGen Maven / Gradle / Ivy

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

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.internal.SpecializationNode;
import com.oracle.truffle.api.dsl.internal.SpecializedNode;
import com.oracle.truffle.api.dsl.internal.SuppressFBWarnings;
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 com.oracle.truffle.api.object.Shape;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.RubyTypes;
import org.jruby.truffle.language.RubyTypesGen;

@GeneratedBy(SingletonClassNode.class)
@SuppressFBWarnings("SA_LOCAL_SELF_COMPARISON")
public final class SingletonClassNodeGen extends SingletonClassNode implements SpecializedNode {

    @Child private RubyNode value_;
    @CompilationFinal private Class valueType_;
    @CompilationFinal private boolean excludeSingletonClassClassCached_;
    @CompilationFinal private boolean excludeSingletonClassInstanceCached_;
    @Child private BaseNode_ specialization_;

    private SingletonClassNodeGen(RubyNode value) {
        this.value_ = value;
        this.specialization_ = UninitializedNode_.create(this);
    }

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

    @Override
    public DynamicObject executeSingletonClass(Object valueValue) {
        return specialization_.executeDynamicObject1(valueValue);
    }

    @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_.executeDynamicObject0(frameValue);
    }

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

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

    public static SingletonClassNode create(RubyNode value) {
        return new SingletonClassNodeGen(value);
    }

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

        @CompilationFinal protected SingletonClassNodeGen root;

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

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

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

        @Override
        public final Object acceptAndExecute(Frame frameValue, Object valueValue) {
            return this.executeDynamicObject1(valueValue);
        }

        public abstract DynamicObject executeDynamicObject1(Object valueValue);

        public Object execute(VirtualFrame frameValue) {
            Object valueValue_ = executeValue_(frameValue);
            return executeDynamicObject1(valueValue_);
        }

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

        public DynamicObject executeDynamicObject0(VirtualFrame frameValue) {
            return (DynamicObject) execute(frameValue);
        }

        @Override
        protected final SpecializationNode createNext(Frame frameValue, Object valueValue) {
            if (valueValue instanceof Boolean) {
                boolean valueValue_ = (boolean) valueValue;
                if ((valueValue_)) {
                    return SingletonClassTrueNode_.create(root);
                } else {
                    return SingletonClassFalseNode_.create(root);
                }
            }
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((root.isNil(valueValue_))) {
                    return SingletonClassNilNode_.create(root);
                }
            }
            if (RubyTypesGen.isImplicitInteger(valueValue)) {
                return SingletonClass0Node_.create(root, valueValue);
            }
            if (RubyTypesGen.isImplicitLong(valueValue)) {
                return SingletonClass1Node_.create(root, valueValue);
            }
            if (RubyTypesGen.isImplicitDouble(valueValue)) {
                return SingletonClass2Node_.create(root, valueValue);
            }
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((RubyGuards.isRubyBignum(valueValue_))) {
                    return SingletonClassBignumNode_.create(root);
                }
                if ((RubyGuards.isRubySymbol(valueValue_))) {
                    return SingletonClassSymbolNode_.create(root);
                }
                Shape cachedShape9 = (valueValue_.getShape());
                DynamicObject cachedSingletonClass9 = (root.getSingletonClassOrNull(valueValue_));
                if ((RubyGuards.isRubyClass(valueValue_)) && (valueValue_.getShape() == cachedShape9) && (cachedSingletonClass9 != null)) {
                    if (!root.excludeSingletonClassClassCached_) {
                        SpecializationNode s = SingletonClassClassCachedNode_.create(root, cachedShape9, cachedSingletonClass9);
                        if (countSame(s) < (root.getCacheLimit())) {
                            return s;
                        }
                    }
                }
                if ((RubyGuards.isRubyClass(valueValue_))) {
                    root.excludeSingletonClassClassCached_ = true;
                    return SingletonClassClassUncachedNode_.create(root);
                }
                DynamicObject cachedObject11 = (valueValue_);
                if ((valueValue_ == cachedObject11) && (!(root.isNil(cachedObject11))) && (!(RubyGuards.isRubyBignum(cachedObject11))) && (!(RubyGuards.isRubySymbol(cachedObject11))) && (!(RubyGuards.isRubyClass(cachedObject11)))) {
                    if (!root.excludeSingletonClassInstanceCached_) {
                        DynamicObject cachedSingletonClass11 = (root.getSingletonClassForInstance(valueValue_));
                        SpecializationNode s = SingletonClassInstanceCachedNode_.create(root, cachedObject11, cachedSingletonClass11);
                        if (countSame(s) < (root.getCacheLimit())) {
                            return s;
                        }
                    }
                }
                if ((!(root.isNil(valueValue_))) && (!(RubyGuards.isRubyBignum(valueValue_))) && (!(RubyGuards.isRubySymbol(valueValue_))) && (!(RubyGuards.isRubyClass(valueValue_)))) {
                    root.excludeSingletonClassInstanceCached_ = true;
                    return SingletonClassInstanceUncachedNode_.create(root);
                }
            }
            return null;
        }

        @Override
        protected final SpecializationNode createPolymorphic() {
            return PolymorphicNode_.create(root);
        }

        protected final BaseNode_ getNext() {
            return (BaseNode_) this.next;
        }

        protected final Object executeValue_(Frame frameValue) {
            Class valueType_ = root.valueType_;
            try {
                if (valueType_ == boolean.class) {
                    return root.value_.executeBoolean((VirtualFrame) frameValue);
                } else if (valueType_ == double.class) {
                    return root.value_.executeDouble((VirtualFrame) frameValue);
                } else if (valueType_ == int.class) {
                    return root.value_.executeInteger((VirtualFrame) frameValue);
                } else if (valueType_ == long.class) {
                    return root.value_.executeLong((VirtualFrame) frameValue);
                } else if (valueType_ == null) {
                    CompilerDirectives.transferToInterpreterAndInvalidate();
                    Class _type = Object.class;
                    try {
                        Object _value = root.value_.execute((VirtualFrame) frameValue);
                        if (_value instanceof Boolean) {
                            _type = boolean.class;
                        } else if (_value instanceof Double) {
                            _type = double.class;
                        } else if (_value instanceof Integer) {
                            _type = int.class;
                        } else if (_value instanceof Long) {
                            _type = long.class;
                        } else {
                            _type = Object.class;
                        }
                        return _value;
                    } finally {
                        root.valueType_ = _type;
                    }
                } else {
                    return root.value_.execute((VirtualFrame) frameValue);
                }
            } catch (UnexpectedResultException ex) {
                root.valueType_ = Object.class;
                return ex.getResult();
            }
        }

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

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

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            return (DynamicObject) uninitialized(null, valueValue);
        }

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

    }
    @GeneratedBy(SingletonClassNode.class)
    private static final class PolymorphicNode_ extends BaseNode_ {

        PolymorphicNode_(SingletonClassNodeGen root) {
            super(root, 0);
        }

        @Override
        public SpecializationNode merge(SpecializationNode newNode, Frame frameValue, Object valueValue) {
            return polymorphicMerge(newNode, super.merge(newNode, frameValue, valueValue));
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new PolymorphicNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClassTrue(boolean)", value = SingletonClassNode.class)
    private static final class SingletonClassTrueNode_ extends BaseNode_ {

        SingletonClassTrueNode_(SingletonClassNodeGen root) {
            super(root, 1);
        }

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

        @Override
        public DynamicObject executeDynamicObject0(VirtualFrame frameValue) {
            boolean valueValue_;
            try {
                valueValue_ = root.value_.executeBoolean(frameValue);
            } catch (UnexpectedResultException ex) {
                return getNext().executeDynamicObject1(ex.getResult());
            }
            if ((valueValue_)) {
                return root.singletonClassTrue(valueValue_);
            }
            return getNext().executeDynamicObject1(valueValue_);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof Boolean) {
                boolean valueValue_ = (boolean) valueValue;
                if ((valueValue_)) {
                    return root.singletonClassTrue(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassTrueNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClassFalse(boolean)", value = SingletonClassNode.class)
    private static final class SingletonClassFalseNode_ extends BaseNode_ {

        SingletonClassFalseNode_(SingletonClassNodeGen root) {
            super(root, 2);
        }

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

        @Override
        public DynamicObject executeDynamicObject0(VirtualFrame frameValue) {
            boolean valueValue_;
            try {
                valueValue_ = root.value_.executeBoolean(frameValue);
            } catch (UnexpectedResultException ex) {
                return getNext().executeDynamicObject1(ex.getResult());
            }
            if ((!(valueValue_))) {
                return root.singletonClassFalse(valueValue_);
            }
            return getNext().executeDynamicObject1(valueValue_);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof Boolean) {
                boolean valueValue_ = (boolean) valueValue;
                if ((!(valueValue_))) {
                    return root.singletonClassFalse(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassFalseNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClassNil(DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassNilNode_ extends BaseNode_ {

        SingletonClassNilNode_(SingletonClassNodeGen root) {
            super(root, 3);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((root.isNil(valueValue_))) {
                    return root.singletonClassNil(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassNilNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClass(int)", value = SingletonClassNode.class)
    private static final class SingletonClass0Node_ extends BaseNode_ {

        private final Class valueImplicitType;

        SingletonClass0Node_(SingletonClassNodeGen root, Object valueValue) {
            super(root, 4);
            this.valueImplicitType = RubyTypesGen.getImplicitIntegerClass(valueValue);
        }

        @Override
        public boolean isSame(SpecializationNode other) {
            return super.isSame(other) && this.valueImplicitType == ((SingletonClass0Node_) other).valueImplicitType;
        }

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

        @Override
        public DynamicObject executeDynamicObject0(VirtualFrame frameValue) {
            int valueValue_;
            try {
                if (valueImplicitType == int.class) {
                    valueValue_ = root.value_.executeInteger(frameValue);
                } else {
                    Object valueValue__ = executeValue_(frameValue);
                    valueValue_ = RubyTypesGen.expectImplicitInteger(valueValue__, valueImplicitType);
                }
            } catch (UnexpectedResultException ex) {
                return getNext().executeDynamicObject1(ex.getResult());
            }
            return root.singletonClass(valueValue_);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (RubyTypesGen.isImplicitInteger(valueValue, valueImplicitType)) {
                int valueValue_ = RubyTypesGen.asImplicitInteger(valueValue, valueImplicitType);
                return root.singletonClass(valueValue_);
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root, Object valueValue) {
            return new SingletonClass0Node_(root, valueValue);
        }

    }
    @GeneratedBy(methodName = "singletonClass(long)", value = SingletonClassNode.class)
    private static final class SingletonClass1Node_ extends BaseNode_ {

        private final Class valueImplicitType;

        SingletonClass1Node_(SingletonClassNodeGen root, Object valueValue) {
            super(root, 5);
            this.valueImplicitType = RubyTypesGen.getImplicitLongClass(valueValue);
        }

        @Override
        public boolean isSame(SpecializationNode other) {
            return super.isSame(other) && this.valueImplicitType == ((SingletonClass1Node_) other).valueImplicitType;
        }

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

        @Override
        public DynamicObject executeDynamicObject0(VirtualFrame frameValue) {
            long valueValue_;
            try {
                if (valueImplicitType == long.class) {
                    valueValue_ = root.value_.executeLong(frameValue);
                } else if (valueImplicitType == int.class) {
                    valueValue_ = RubyTypes.promoteToLong(root.value_.executeInteger(frameValue));
                } else {
                    Object valueValue__ = executeValue_(frameValue);
                    valueValue_ = RubyTypesGen.expectImplicitLong(valueValue__, valueImplicitType);
                }
            } catch (UnexpectedResultException ex) {
                return getNext().executeDynamicObject1(ex.getResult());
            }
            return root.singletonClass(valueValue_);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (RubyTypesGen.isImplicitLong(valueValue, valueImplicitType)) {
                long valueValue_ = RubyTypesGen.asImplicitLong(valueValue, valueImplicitType);
                return root.singletonClass(valueValue_);
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root, Object valueValue) {
            return new SingletonClass1Node_(root, valueValue);
        }

    }
    @GeneratedBy(methodName = "singletonClass(double)", value = SingletonClassNode.class)
    private static final class SingletonClass2Node_ extends BaseNode_ {

        private final Class valueImplicitType;

        SingletonClass2Node_(SingletonClassNodeGen root, Object valueValue) {
            super(root, 6);
            this.valueImplicitType = RubyTypesGen.getImplicitDoubleClass(valueValue);
        }

        @Override
        public boolean isSame(SpecializationNode other) {
            return super.isSame(other) && this.valueImplicitType == ((SingletonClass2Node_) other).valueImplicitType;
        }

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

        @Override
        public DynamicObject executeDynamicObject0(VirtualFrame frameValue) {
            double valueValue_;
            try {
                if (valueImplicitType == double.class) {
                    valueValue_ = root.value_.executeDouble(frameValue);
                } else {
                    Object valueValue__ = executeValue_(frameValue);
                    valueValue_ = RubyTypesGen.expectImplicitDouble(valueValue__, valueImplicitType);
                }
            } catch (UnexpectedResultException ex) {
                return getNext().executeDynamicObject1(ex.getResult());
            }
            return root.singletonClass(valueValue_);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (RubyTypesGen.isImplicitDouble(valueValue, valueImplicitType)) {
                double valueValue_ = RubyTypesGen.asImplicitDouble(valueValue, valueImplicitType);
                return root.singletonClass(valueValue_);
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root, Object valueValue) {
            return new SingletonClass2Node_(root, valueValue);
        }

    }
    @GeneratedBy(methodName = "singletonClassBignum(DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassBignumNode_ extends BaseNode_ {

        SingletonClassBignumNode_(SingletonClassNodeGen root) {
            super(root, 7);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((RubyGuards.isRubyBignum(valueValue_))) {
                    return root.singletonClassBignum(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassBignumNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClassSymbol(DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassSymbolNode_ extends BaseNode_ {

        SingletonClassSymbolNode_(SingletonClassNodeGen root) {
            super(root, 8);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((RubyGuards.isRubySymbol(valueValue_))) {
                    return root.singletonClassSymbol(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassSymbolNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClassClassCached(DynamicObject, Shape, DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassClassCachedNode_ extends BaseNode_ {

        private final Shape cachedShape;
        private final DynamicObject cachedSingletonClass;

        SingletonClassClassCachedNode_(SingletonClassNodeGen root, Shape cachedShape, DynamicObject cachedSingletonClass) {
            super(root, 9);
            this.cachedShape = cachedShape;
            this.cachedSingletonClass = cachedSingletonClass;
        }

        @Override
        public SpecializationNode merge(SpecializationNode newNode, Frame frameValue, Object valueValue) {
            if (newNode.getClass() == SingletonClassClassUncachedNode_.class) {
                removeSame("Contained by singletonClassClassUncached(DynamicObject)");
            }
            return super.merge(newNode, frameValue, valueValue);
        }

        @Override
        public boolean isIdentical(SpecializationNode other, Frame frameValue, Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((RubyGuards.isRubyClass(valueValue_)) && (valueValue_.getShape() == this.cachedShape)) {
                    assert (this.cachedSingletonClass != null);
                    return true;
                }
            }
            return false;
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((RubyGuards.isRubyClass(valueValue_)) && (valueValue_.getShape() == this.cachedShape)) {
                    assert (this.cachedSingletonClass != null);
                    return root.singletonClassClassCached(valueValue_, this.cachedShape, this.cachedSingletonClass);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root, Shape cachedShape, DynamicObject cachedSingletonClass) {
            return new SingletonClassClassCachedNode_(root, cachedShape, cachedSingletonClass);
        }

    }
    @GeneratedBy(methodName = "singletonClassClassUncached(DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassClassUncachedNode_ extends BaseNode_ {

        SingletonClassClassUncachedNode_(SingletonClassNodeGen root) {
            super(root, 10);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((RubyGuards.isRubyClass(valueValue_))) {
                    return root.singletonClassClassUncached(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassClassUncachedNode_(root);
        }

    }
    @GeneratedBy(methodName = "singletonClassInstanceCached(DynamicObject, DynamicObject, DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassInstanceCachedNode_ extends BaseNode_ {

        private final DynamicObject cachedObject;
        private final DynamicObject cachedSingletonClass;

        SingletonClassInstanceCachedNode_(SingletonClassNodeGen root, DynamicObject cachedObject, DynamicObject cachedSingletonClass) {
            super(root, 11);
            this.cachedObject = cachedObject;
            this.cachedSingletonClass = cachedSingletonClass;
        }

        @Override
        public SpecializationNode merge(SpecializationNode newNode, Frame frameValue, Object valueValue) {
            if (newNode.getClass() == SingletonClassInstanceUncachedNode_.class) {
                removeSame("Contained by singletonClassInstanceUncached(DynamicObject)");
            }
            return super.merge(newNode, frameValue, valueValue);
        }

        @Override
        public boolean isIdentical(SpecializationNode other, Frame frameValue, Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((valueValue_ == this.cachedObject)) {
                    assert (!(root.isNil(this.cachedObject)));
                    assert (!(RubyGuards.isRubyBignum(this.cachedObject)));
                    assert (!(RubyGuards.isRubySymbol(this.cachedObject)));
                    assert (!(RubyGuards.isRubyClass(this.cachedObject)));
                    return true;
                }
            }
            return false;
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((valueValue_ == this.cachedObject)) {
                    assert (!(root.isNil(this.cachedObject)));
                    assert (!(RubyGuards.isRubyBignum(this.cachedObject)));
                    assert (!(RubyGuards.isRubySymbol(this.cachedObject)));
                    assert (!(RubyGuards.isRubyClass(this.cachedObject)));
                    return root.singletonClassInstanceCached(valueValue_, this.cachedObject, this.cachedSingletonClass);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root, DynamicObject cachedObject, DynamicObject cachedSingletonClass) {
            return new SingletonClassInstanceCachedNode_(root, cachedObject, cachedSingletonClass);
        }

    }
    @GeneratedBy(methodName = "singletonClassInstanceUncached(DynamicObject)", value = SingletonClassNode.class)
    private static final class SingletonClassInstanceUncachedNode_ extends BaseNode_ {

        SingletonClassInstanceUncachedNode_(SingletonClassNodeGen root) {
            super(root, 12);
        }

        @Override
        public DynamicObject executeDynamicObject1(Object valueValue) {
            if (valueValue instanceof DynamicObject) {
                DynamicObject valueValue_ = (DynamicObject) valueValue;
                if ((!(root.isNil(valueValue_))) && (!(RubyGuards.isRubyBignum(valueValue_))) && (!(RubyGuards.isRubySymbol(valueValue_))) && (!(RubyGuards.isRubyClass(valueValue_)))) {
                    return root.singletonClassInstanceUncached(valueValue_);
                }
            }
            return getNext().executeDynamicObject1(valueValue);
        }

        static BaseNode_ create(SingletonClassNodeGen root) {
            return new SingletonClassInstanceUncachedNode_(root);
        }

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy