com.oracle.graal.python.nodes.classes.AbstractObjectGetBasesNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.classes;
import com.oracle.graal.python.builtins.objects.tuple.PTuple;
import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
import com.oracle.graal.python.nodes.attributes.LookupInheritedAttributeNode.Dynamic;
import com.oracle.graal.python.nodes.attributes.LookupInheritedAttributeNodeFactory.DynamicNodeGen;
import com.oracle.graal.python.nodes.call.CallNode;
import com.oracle.graal.python.nodes.call.special.LookupAndCallBinaryNode;
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.DSLSupport;
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.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 java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link AbstractObjectGetBasesNode#getBasesCached}
* Activation probability: 0.65000
* With/without class size: 22/11 bytes
* Specialization {@link AbstractObjectGetBasesNode#getBasesUncached}
* Activation probability: 0.35000
* With/without class size: 18/21 bytes
*
*/
@GeneratedBy(AbstractObjectGetBasesNode.class)
@SuppressWarnings("javadoc")
public final class AbstractObjectGetBasesNodeGen extends AbstractObjectGetBasesNode {
private static final StateField STATE_0_AbstractObjectGetBasesNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
private static final StateField GET_BASES_UNCACHED__ABSTRACT_OBJECT_GET_BASES_NODE_GET_BASES_UNCACHED_STATE_0_UPDATER = StateField.create(GetBasesUncachedData.lookup_(), "getBasesUncached_state_0_");
private static final StateField GET_BASES_UNCACHED__ABSTRACT_OBJECT_GET_BASES_NODE_GET_BASES_UNCACHED_STATE_1_UPDATER = StateField.create(GetBasesUncachedData.lookup_(), "getBasesUncached_state_1_");
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesCached}
* Parameter: {@link IsBuiltinObjectProfile} exceptionMaskProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/
private static final IsBuiltinObjectProfile INLINED_GET_BASES_CACHED_EXCEPTION_MASK_PROFILE_ = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, STATE_0_AbstractObjectGetBasesNode_UPDATER.subUpdater(2, 20), ReferenceField.create(MethodHandles.lookup(), "getBasesCached_exceptionMaskProfile__field1_", Node.class)));
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link Dynamic} lookupGetattributeNode
* Inline method: {@link DynamicNodeGen#inline}
*/
private static final Dynamic INLINED_GET_BASES_UNCACHED_LOOKUP_GETATTRIBUTE_NODE_ = DynamicNodeGen.inline(InlineTarget.create(Dynamic.class, GET_BASES_UNCACHED__ABSTRACT_OBJECT_GET_BASES_NODE_GET_BASES_UNCACHED_STATE_0_UPDATER.subUpdater(0, 18), ReferenceField.create(GetBasesUncachedData.lookup_(), "getBasesUncached_lookupGetattributeNode__field1_", Node.class), ReferenceField.create(GetBasesUncachedData.lookup_(), "getBasesUncached_lookupGetattributeNode__field2_", Node.class)));
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link IsBuiltinObjectProfile} exceptionMaskProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/
private static final IsBuiltinObjectProfile INLINED_GET_BASES_UNCACHED_EXCEPTION_MASK_PROFILE_ = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, GET_BASES_UNCACHED__ABSTRACT_OBJECT_GET_BASES_NODE_GET_BASES_UNCACHED_STATE_1_UPDATER.subUpdater(0, 20), ReferenceField.create(GetBasesUncachedData.lookup_(), "getBasesUncached_exceptionMaskProfile__field1_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link AbstractObjectGetBasesNode#getBasesCached}
* 1: SpecializationActive {@link AbstractObjectGetBasesNode#getBasesUncached}
* 2-21: InlinedCache
* Specialization: {@link AbstractObjectGetBasesNode#getBasesCached}
* Parameter: {@link IsBuiltinObjectProfile} exceptionMaskProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesCached}
* Parameter: {@link LookupAndCallBinaryNode} getAttributeNode
*/
@Child private LookupAndCallBinaryNode getBasesCached_getAttributeNode_;
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesCached}
* Parameter: {@link IsBuiltinObjectProfile} exceptionMaskProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getBasesCached_exceptionMaskProfile__field1_;
@Child private GetBasesUncachedData getBasesUncached_cache;
private AbstractObjectGetBasesNodeGen() {
}
@Override
protected PTuple executeInternal(Frame frameValue, Object arg0Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[AbstractObjectGetBasesNode.getBasesCached(VirtualFrame, Object, Node, LookupAndCallBinaryNode, IsBuiltinObjectProfile)] || SpecializationActive[AbstractObjectGetBasesNode.getBasesUncached(VirtualFrame, Object, Node, Dynamic, CallNode, IsBuiltinObjectProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[AbstractObjectGetBasesNode.getBasesCached(VirtualFrame, Object, Node, LookupAndCallBinaryNode, IsBuiltinObjectProfile)] */) {
{
LookupAndCallBinaryNode getAttributeNode__ = this.getBasesCached_getAttributeNode_;
if (getAttributeNode__ != null) {
Node inliningTarget__ = (this);
assert DSLSupport.assertIdempotence((!(isUncached())));
return AbstractObjectGetBasesNode.getBasesCached((VirtualFrame) frameValue, arg0Value, inliningTarget__, getAttributeNode__, INLINED_GET_BASES_CACHED_EXCEPTION_MASK_PROFILE_);
}
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[AbstractObjectGetBasesNode.getBasesUncached(VirtualFrame, Object, Node, Dynamic, CallNode, IsBuiltinObjectProfile)] */) {
GetBasesUncachedData s1_ = this.getBasesUncached_cache;
if (s1_ != null) {
{
Node inliningTarget__1 = (s1_);
return AbstractObjectGetBasesNode.getBasesUncached((VirtualFrame) frameValue, arg0Value, inliningTarget__1, INLINED_GET_BASES_UNCACHED_LOOKUP_GETATTRIBUTE_NODE_, s1_.callGetattributeNode_, INLINED_GET_BASES_UNCACHED_EXCEPTION_MASK_PROFILE_);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(frameValue, arg0Value);
}
private PTuple executeAndSpecialize(Frame frameValue, Object arg0Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[AbstractObjectGetBasesNode.getBasesUncached(VirtualFrame, Object, Node, Dynamic, CallNode, IsBuiltinObjectProfile)] */) {
if ((!(isUncached()))) {
inliningTarget__ = (this);
LookupAndCallBinaryNode getAttributeNode__ = this.insert((LookupAndCallBinaryNode.create(SpecialMethodSlot.GetAttribute)));
Objects.requireNonNull(getAttributeNode__, "Specialization 'getBasesCached(VirtualFrame, Object, Node, LookupAndCallBinaryNode, IsBuiltinObjectProfile)' cache 'getAttributeNode' 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'.");
VarHandle.storeStoreFence();
this.getBasesCached_getAttributeNode_ = getAttributeNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[AbstractObjectGetBasesNode.getBasesCached(VirtualFrame, Object, Node, LookupAndCallBinaryNode, IsBuiltinObjectProfile)] */;
this.state_0_ = state_0;
return AbstractObjectGetBasesNode.getBasesCached((VirtualFrame) frameValue, arg0Value, inliningTarget__, getAttributeNode__, INLINED_GET_BASES_CACHED_EXCEPTION_MASK_PROFILE_);
}
}
}
{
Node inliningTarget__1 = null;
GetBasesUncachedData s1_ = this.insert(new GetBasesUncachedData());
inliningTarget__1 = (s1_);
CallNode callGetattributeNode__ = s1_.insert((CallNode.create()));
Objects.requireNonNull(callGetattributeNode__, "Specialization 'getBasesUncached(VirtualFrame, Object, Node, Dynamic, CallNode, IsBuiltinObjectProfile)' cache 'callGetattributeNode' 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_.callGetattributeNode_ = callGetattributeNode__;
VarHandle.storeStoreFence();
this.getBasesUncached_cache = s1_;
this.getBasesCached_getAttributeNode_ = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[AbstractObjectGetBasesNode.getBasesCached(VirtualFrame, Object, Node, LookupAndCallBinaryNode, IsBuiltinObjectProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[AbstractObjectGetBasesNode.getBasesUncached(VirtualFrame, Object, Node, Dynamic, CallNode, IsBuiltinObjectProfile)] */;
this.state_0_ = state_0;
return AbstractObjectGetBasesNode.getBasesUncached((VirtualFrame) frameValue, arg0Value, inliningTarget__1, INLINED_GET_BASES_UNCACHED_LOOKUP_GETATTRIBUTE_NODE_, callGetattributeNode__, INLINED_GET_BASES_UNCACHED_EXCEPTION_MASK_PROFILE_);
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AbstractObjectGetBasesNode create() {
return new AbstractObjectGetBasesNodeGen();
}
@NeverDefault
public static AbstractObjectGetBasesNode getUncached() {
return AbstractObjectGetBasesNodeGen.UNCACHED;
}
@GeneratedBy(AbstractObjectGetBasesNode.class)
@DenyReplace
private static final class GetBasesUncachedData extends Node implements SpecializationDataNode {
/**
* State Info:
* 0-17: InlinedCache
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link Dynamic} lookupGetattributeNode
* Inline method: {@link DynamicNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int getBasesUncached_state_0_;
/**
* State Info:
* 0-19: InlinedCache
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link IsBuiltinObjectProfile} exceptionMaskProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int getBasesUncached_state_1_;
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link Dynamic} lookupGetattributeNode
* Inline method: {@link DynamicNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getBasesUncached_lookupGetattributeNode__field1_;
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link Dynamic} lookupGetattributeNode
* Inline method: {@link DynamicNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getBasesUncached_lookupGetattributeNode__field2_;
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link CallNode} callGetattributeNode
*/
@Child CallNode callGetattributeNode_;
/**
* Source Info:
* Specialization: {@link AbstractObjectGetBasesNode#getBasesUncached}
* Parameter: {@link IsBuiltinObjectProfile} exceptionMaskProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getBasesUncached_exceptionMaskProfile__field1_;
GetBasesUncachedData() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(AbstractObjectGetBasesNode.class)
@DenyReplace
private static final class Uncached extends AbstractObjectGetBasesNode {
@Override
protected PTuple executeInternal(Frame frameValue, Object arg0Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return AbstractObjectGetBasesNode.getBasesUncached((VirtualFrame) frameValue, arg0Value, (this), (DynamicNodeGen.getUncached()), (CallNode.getUncached()), (IsBuiltinObjectProfile.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy