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

com.oracle.graal.python.lib.PyObjectGetAttrNodeGen Maven / Gradle / Ivy

There is a newer version: 24.1.1
Show newest version
// CheckStyle: start generated
package com.oracle.graal.python.lib;

import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
import com.oracle.graal.python.nodes.attributes.GetAttributeNode.GetFixedAttributeNode;
import com.oracle.graal.python.nodes.call.special.CallBinaryMethodNode;
import com.oracle.graal.python.nodes.call.special.LookupSpecialMethodSlotNode;
import com.oracle.graal.python.nodes.object.GetClassNode;
import com.oracle.graal.python.nodes.object.GetClassNodeGen;
import com.oracle.graal.python.nodes.object.BuiltinClassProfiles.IsBuiltinObjectProfile;
import com.oracle.graal.python.nodes.object.BuiltinClassProfilesFactory.IsBuiltinObjectProfileNodeGen;
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.NeverDefault;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.RequiredField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.frame.Frame;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.api.strings.TruffleString.CodePointAtIndexNode;
import com.oracle.truffle.api.strings.TruffleString.CodePointLengthNode;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link PyObjectGetAttr#getFixedAttr}
 *     Activation probability: 0.65000
 *     With/without class size: 19/8 bytes
 *   Specialization {@link PyObjectGetAttr#getDynamicAttr}
 *     Activation probability: 0.35000
 *     With/without class size: 23/37 bytes
 * 
*/ @GeneratedBy(PyObjectGetAttr.class) @SuppressWarnings({"javadoc", "unused"}) public final class PyObjectGetAttrNodeGen extends PyObjectGetAttr { private static final StateField GET_DYNAMIC_ATTR__PY_OBJECT_GET_ATTR_GET_DYNAMIC_ATTR_STATE_0_UPDATER = StateField.create(GetDynamicAttrData.lookup_(), "getDynamicAttr_state_0_"); private static final StateField GET_DYNAMIC_ATTR__PY_OBJECT_GET_ATTR_GET_DYNAMIC_ATTR_STATE_1_UPDATER = StateField.create(GetDynamicAttrData.lookup_(), "getDynamicAttr_state_1_"); static final ReferenceField GET_FIXED_ATTR_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "getFixedAttr_cache", GetFixedAttrData.class); /** * Source Info:
     *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
     *   Parameter: {@link GetClassNode} getClass
     *   Inline method: {@link GetClassNodeGen#inline}
*/ private static final GetClassNode INLINED_GET_DYNAMIC_ATTR_GET_CLASS_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, GET_DYNAMIC_ATTR__PY_OBJECT_GET_ATTR_GET_DYNAMIC_ATTR_STATE_0_UPDATER.subUpdater(0, 17), ReferenceField.create(GetDynamicAttrData.lookup_(), "getDynamicAttr_getClass__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
     *   Parameter: {@link IsBuiltinObjectProfile} errorProfile
     *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/ private static final IsBuiltinObjectProfile INLINED_GET_DYNAMIC_ATTR_ERROR_PROFILE_ = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, GET_DYNAMIC_ATTR__PY_OBJECT_GET_ATTR_GET_DYNAMIC_ATTR_STATE_1_UPDATER.subUpdater(0, 20), ReferenceField.create(GetDynamicAttrData.lookup_(), "getDynamicAttr_errorProfile__field1_", Node.class))); private static final Uncached UNCACHED = new Uncached(); /** * State Info:
     *   0: SpecializationActive {@link PyObjectGetAttr#getFixedAttr}
     *   1: SpecializationActive {@link PyObjectGetAttr#getDynamicAttr}
     * 
*/ @CompilationFinal private int state_0_; @UnsafeAccessedField @Child private GetFixedAttrData getFixedAttr_cache; @Child private GetDynamicAttrData getDynamicAttr_cache; private PyObjectGetAttrNodeGen() { } @Override public Object execute(Frame frameValue, Node arg0Value, Object arg1Value, Object arg2Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] || SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] */ && arg2Value instanceof TruffleString) { TruffleString arg2Value_ = (TruffleString) arg2Value; GetFixedAttrData s0_ = this.getFixedAttr_cache; if (s0_ != null) { if ((arg2Value_ == s0_.cachedName_)) { return PyObjectGetAttr.getFixedAttr((VirtualFrame) frameValue, arg1Value, arg2Value_, s0_.cachedName_, s0_.getAttrNode_); } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */) { GetDynamicAttrData s1_ = this.getDynamicAttr_cache; if (s1_ != null) { return PyObjectGetAttr.getDynamicAttr(frameValue, s1_, arg1Value, arg2Value, INLINED_GET_DYNAMIC_ATTR_GET_CLASS_, s1_.lookupGetattribute_, s1_.lookupGetattr_, s1_.callGetattribute_, s1_.callGetattr_, INLINED_GET_DYNAMIC_ATTR_ERROR_PROFILE_, s1_.codePointLengthNode_, s1_.codePointAtIndexNode_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, arg0Value, arg1Value, arg2Value); } private Object executeAndSpecialize(Frame frameValue, Node arg0Value, Object arg1Value, Object arg2Value) { int state_0 = this.state_0_; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */ && arg2Value instanceof TruffleString) { TruffleString arg2Value_ = (TruffleString) arg2Value; while (true) { int count0_ = 0; GetFixedAttrData s0_ = GET_FIXED_ATTR_CACHE_UPDATER.getVolatile(this); GetFixedAttrData s0_original = s0_; while (s0_ != null) { if ((arg2Value_ == s0_.cachedName_)) { break; } count0_++; s0_ = null; break; } if (s0_ == null && count0_ < 1) { // assert (arg2Value_ == s0_.cachedName_); s0_ = this.insert(new GetFixedAttrData()); s0_.cachedName_ = (arg2Value_); GetFixedAttributeNode getAttrNode__ = s0_.insert((GetFixedAttributeNode.create(arg2Value_))); Objects.requireNonNull(getAttrNode__, "Specialization 'getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)' cache 'getAttrNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s0_.getAttrNode_ = getAttrNode__; if (!GET_FIXED_ATTR_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] */; this.state_0_ = state_0; } if (s0_ != null) { return PyObjectGetAttr.getFixedAttr((VirtualFrame) frameValue, arg1Value, arg2Value_, s0_.cachedName_, s0_.getAttrNode_); } break; } } GetDynamicAttrData s1_ = this.insert(new GetDynamicAttrData()); LookupSpecialMethodSlotNode lookupGetattribute__ = s1_.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.GetAttribute))); Objects.requireNonNull(lookupGetattribute__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'lookupGetattribute' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.lookupGetattribute_ = lookupGetattribute__; LookupSpecialMethodSlotNode lookupGetattr__ = s1_.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.GetAttr))); Objects.requireNonNull(lookupGetattr__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'lookupGetattr' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.lookupGetattr_ = lookupGetattr__; CallBinaryMethodNode callGetattribute__ = s1_.insert((CallBinaryMethodNode.create())); Objects.requireNonNull(callGetattribute__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'callGetattribute' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.callGetattribute_ = callGetattribute__; CallBinaryMethodNode callGetattr__ = s1_.insert((CallBinaryMethodNode.create())); Objects.requireNonNull(callGetattr__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'callGetattr' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.callGetattr_ = callGetattr__; CodePointLengthNode codePointLengthNode__ = s1_.insert((CodePointLengthNode.create())); Objects.requireNonNull(codePointLengthNode__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'codePointLengthNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.codePointLengthNode_ = codePointLengthNode__; CodePointAtIndexNode codePointAtIndexNode__ = s1_.insert((CodePointAtIndexNode.create())); Objects.requireNonNull(codePointAtIndexNode__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'codePointAtIndexNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.codePointAtIndexNode_ = codePointAtIndexNode__; VarHandle.storeStoreFence(); this.getDynamicAttr_cache = s1_; this.getFixedAttr_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */; this.state_0_ = state_0; return PyObjectGetAttr.getDynamicAttr(frameValue, s1_, arg1Value, arg2Value, INLINED_GET_DYNAMIC_ATTR_GET_CLASS_, lookupGetattribute__, lookupGetattr__, callGetattribute__, callGetattr__, INLINED_GET_DYNAMIC_ATTR_ERROR_PROFILE_, codePointLengthNode__, codePointAtIndexNode__); } @Override public NodeCost getCost() { int state_0 = this.state_0_; if (state_0 == 0) { return NodeCost.UNINITIALIZED; } else { if ((state_0 & (state_0 - 1)) == 0 /* is-single */) { return NodeCost.MONOMORPHIC; } } return NodeCost.POLYMORPHIC; } @NeverDefault public static PyObjectGetAttr create() { return new PyObjectGetAttrNodeGen(); } @NeverDefault public static PyObjectGetAttr getUncached() { return PyObjectGetAttrNodeGen.UNCACHED; } /** * Required Fields:
    *
  • {@link Inlined#state_0_} *
  • {@link Inlined#getFixedAttr_cache} *
  • {@link Inlined#getDynamicAttr_cache} *
*/ @NeverDefault public static PyObjectGetAttr inline(@RequiredField(bits = 2, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) { return new PyObjectGetAttrNodeGen.Inlined(target); } @GeneratedBy(PyObjectGetAttr.class) @DenyReplace private static final class Inlined extends PyObjectGetAttr { /** * State Info:
         *   0: SpecializationActive {@link PyObjectGetAttr#getFixedAttr}
         *   1: SpecializationActive {@link PyObjectGetAttr#getDynamicAttr}
         * 
*/ private final StateField state_0_; private final ReferenceField getFixedAttr_cache; private final ReferenceField getDynamicAttr_cache; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link GetClassNode} getClass
         *   Inline method: {@link GetClassNodeGen#inline}
*/ private final GetClassNode getDynamicAttr_getClass_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link IsBuiltinObjectProfile} errorProfile
         *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/ private final IsBuiltinObjectProfile getDynamicAttr_errorProfile_; @SuppressWarnings("unchecked") private Inlined(InlineTarget target) { assert target.getTargetClass().isAssignableFrom(PyObjectGetAttr.class); this.state_0_ = target.getState(0, 2); this.getFixedAttr_cache = target.getReference(1, GetFixedAttrData.class); this.getDynamicAttr_cache = target.getReference(2, GetDynamicAttrData.class); this.getDynamicAttr_getClass_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, GET_DYNAMIC_ATTR__PY_OBJECT_GET_ATTR_GET_DYNAMIC_ATTR_STATE_0_UPDATER.subUpdater(0, 17), ReferenceField.create(GetDynamicAttrData.lookup_(), "getDynamicAttr_getClass__field1_", Node.class))); this.getDynamicAttr_errorProfile_ = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, GET_DYNAMIC_ATTR__PY_OBJECT_GET_ATTR_GET_DYNAMIC_ATTR_STATE_1_UPDATER.subUpdater(0, 20), ReferenceField.create(GetDynamicAttrData.lookup_(), "getDynamicAttr_errorProfile__field1_", Node.class))); } @Override public Object execute(Frame frameValue, Node arg0Value, Object arg1Value, Object arg2Value) { int state_0 = this.state_0_.get(arg0Value); if (state_0 != 0 /* is SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] || SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] */ && arg2Value instanceof TruffleString) { TruffleString arg2Value_ = (TruffleString) arg2Value; GetFixedAttrData s0_ = this.getFixedAttr_cache.get(arg0Value); if (s0_ != null) { if ((arg2Value_ == s0_.cachedName_)) { return PyObjectGetAttr.getFixedAttr((VirtualFrame) frameValue, arg1Value, arg2Value_, s0_.cachedName_, s0_.getAttrNode_); } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */) { GetDynamicAttrData s1_ = this.getDynamicAttr_cache.get(arg0Value); if (s1_ != null) { return PyObjectGetAttr.getDynamicAttr(frameValue, s1_, arg1Value, arg2Value, this.getDynamicAttr_getClass_, s1_.lookupGetattribute_, s1_.lookupGetattr_, s1_.callGetattribute_, s1_.callGetattr_, this.getDynamicAttr_errorProfile_, s1_.codePointLengthNode_, s1_.codePointAtIndexNode_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, arg0Value, arg1Value, arg2Value); } private Object executeAndSpecialize(Frame frameValue, Node arg0Value, Object arg1Value, Object arg2Value) { int state_0 = this.state_0_.get(arg0Value); if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */ && arg2Value instanceof TruffleString) { TruffleString arg2Value_ = (TruffleString) arg2Value; while (true) { int count0_ = 0; GetFixedAttrData s0_ = this.getFixedAttr_cache.getVolatile(arg0Value); GetFixedAttrData s0_original = s0_; while (s0_ != null) { if ((arg2Value_ == s0_.cachedName_)) { break; } count0_++; s0_ = null; break; } if (s0_ == null && count0_ < 1) { // assert (arg2Value_ == s0_.cachedName_); s0_ = arg0Value.insert(new GetFixedAttrData()); s0_.cachedName_ = (arg2Value_); GetFixedAttributeNode getAttrNode__ = s0_.insert((GetFixedAttributeNode.create(arg2Value_))); Objects.requireNonNull(getAttrNode__, "Specialization 'getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)' cache 'getAttrNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s0_.getAttrNode_ = getAttrNode__; if (!this.getFixedAttr_cache.compareAndSet(arg0Value, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] */; this.state_0_.set(arg0Value, state_0); } if (s0_ != null) { return PyObjectGetAttr.getFixedAttr((VirtualFrame) frameValue, arg1Value, arg2Value_, s0_.cachedName_, s0_.getAttrNode_); } break; } } GetDynamicAttrData s1_ = arg0Value.insert(new GetDynamicAttrData()); LookupSpecialMethodSlotNode lookupGetattribute__ = s1_.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.GetAttribute))); Objects.requireNonNull(lookupGetattribute__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'lookupGetattribute' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.lookupGetattribute_ = lookupGetattribute__; LookupSpecialMethodSlotNode lookupGetattr__ = s1_.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.GetAttr))); Objects.requireNonNull(lookupGetattr__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'lookupGetattr' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.lookupGetattr_ = lookupGetattr__; CallBinaryMethodNode callGetattribute__ = s1_.insert((CallBinaryMethodNode.create())); Objects.requireNonNull(callGetattribute__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'callGetattribute' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.callGetattribute_ = callGetattribute__; CallBinaryMethodNode callGetattr__ = s1_.insert((CallBinaryMethodNode.create())); Objects.requireNonNull(callGetattr__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'callGetattr' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.callGetattr_ = callGetattr__; CodePointLengthNode codePointLengthNode__ = s1_.insert((CodePointLengthNode.create())); Objects.requireNonNull(codePointLengthNode__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'codePointLengthNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.codePointLengthNode_ = codePointLengthNode__; CodePointAtIndexNode codePointAtIndexNode__ = s1_.insert((CodePointAtIndexNode.create())); Objects.requireNonNull(codePointAtIndexNode__, "Specialization 'getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)' cache 'codePointAtIndexNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.codePointAtIndexNode_ = codePointAtIndexNode__; VarHandle.storeStoreFence(); this.getDynamicAttr_cache.set(arg0Value, s1_); this.getFixedAttr_cache.set(arg0Value, null); state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[PyObjectGetAttr.getFixedAttr(VirtualFrame, Object, TruffleString, TruffleString, GetFixedAttributeNode)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[PyObjectGetAttr.getDynamicAttr(Frame, Node, Object, Object, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallBinaryMethodNode, CallBinaryMethodNode, IsBuiltinObjectProfile, CodePointLengthNode, CodePointAtIndexNode)] */; this.state_0_.set(arg0Value, state_0); return PyObjectGetAttr.getDynamicAttr(frameValue, s1_, arg1Value, arg2Value, this.getDynamicAttr_getClass_, lookupGetattribute__, lookupGetattr__, callGetattribute__, callGetattr__, this.getDynamicAttr_errorProfile_, codePointLengthNode__, codePointAtIndexNode__); } @Override public boolean isAdoptable() { return false; } } @GeneratedBy(PyObjectGetAttr.class) @DenyReplace private static final class GetFixedAttrData extends Node implements SpecializationDataNode { /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getFixedAttr}
         *   Parameter: {@link TruffleString} cachedName
*/ @CompilationFinal TruffleString cachedName_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getFixedAttr}
         *   Parameter: {@link GetFixedAttributeNode} getAttrNode
*/ @Child GetFixedAttributeNode getAttrNode_; GetFixedAttrData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } } @GeneratedBy(PyObjectGetAttr.class) @DenyReplace private static final class GetDynamicAttrData extends Node implements SpecializationDataNode { /** * State Info:
         *   0-16: InlinedCache
         *        Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *        Parameter: {@link GetClassNode} getClass
         *        Inline method: {@link GetClassNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int getDynamicAttr_state_0_; /** * State Info:
         *   0-19: InlinedCache
         *        Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *        Parameter: {@link IsBuiltinObjectProfile} errorProfile
         *        Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int getDynamicAttr_state_1_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link GetClassNode} getClass
         *   Inline method: {@link GetClassNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getDynamicAttr_getClass__field1_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link LookupSpecialMethodSlotNode} lookupGetattribute
*/ @Child LookupSpecialMethodSlotNode lookupGetattribute_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link LookupSpecialMethodSlotNode} lookupGetattr
*/ @Child LookupSpecialMethodSlotNode lookupGetattr_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link CallBinaryMethodNode} callGetattribute
*/ @Child CallBinaryMethodNode callGetattribute_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link CallBinaryMethodNode} callGetattr
*/ @Child CallBinaryMethodNode callGetattr_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link IsBuiltinObjectProfile} errorProfile
         *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getDynamicAttr_errorProfile__field1_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link CodePointLengthNode} codePointLengthNode
*/ @Child CodePointLengthNode codePointLengthNode_; /** * Source Info:
         *   Specialization: {@link PyObjectGetAttr#getDynamicAttr}
         *   Parameter: {@link CodePointAtIndexNode} codePointAtIndexNode
*/ @Child CodePointAtIndexNode codePointAtIndexNode_; GetDynamicAttrData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } @GeneratedBy(PyObjectGetAttr.class) @DenyReplace private static final class Uncached extends PyObjectGetAttr { @Override public Object execute(Frame frameValue, Node arg0Value, Object arg1Value, Object arg2Value) { CompilerDirectives.transferToInterpreterAndInvalidate(); return PyObjectGetAttr.getDynamicAttr(frameValue, arg0Value, arg1Value, arg2Value, (GetClassNode.getUncached()), (LookupSpecialMethodSlotNode.getUncached(SpecialMethodSlot.GetAttribute)), (LookupSpecialMethodSlotNode.getUncached(SpecialMethodSlot.GetAttr)), (CallBinaryMethodNode.getUncached()), (CallBinaryMethodNode.getUncached()), (IsBuiltinObjectProfile.getUncached()), (CodePointLengthNode.getUncached()), (CodePointAtIndexNode.getUncached())); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy