com.oracle.graal.python.nodes.bytecode.GetTPFlagsNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.bytecode;
import com.oracle.graal.python.builtins.objects.type.TypeNodes.GetTypeFlagsNode;
import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.GetTypeFlagsNodeGen;
import com.oracle.graal.python.nodes.object.GetClassNode;
import com.oracle.graal.python.nodes.object.GetClassNodeGen;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
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.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.util.Objects;
/**
* Debug Info:
* Specialization {@link GetTPFlagsNode#get}
* Activation probability: 1.00000
* With/without class size: 32/11 bytes
*
*/
@GeneratedBy(GetTPFlagsNode.class)
@SuppressWarnings("javadoc")
public final class GetTPFlagsNodeGen extends GetTPFlagsNode {
private static final StateField STATE_0_GetTPFlagsNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link GetTPFlagsNode#get}
* Parameter: {@link GetClassNode} getClassNode
* Inline method: {@link GetClassNodeGen#inline}
*/
private static final GetClassNode INLINED_GET_CLASS_NODE_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, STATE_0_GetTPFlagsNode_UPDATER.subUpdater(1, 17), ReferenceField.create(MethodHandles.lookup(), "getClassNode__field1_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link GetTPFlagsNode#get}
* 1-17: InlinedCache
* Specialization: {@link GetTPFlagsNode#get}
* Parameter: {@link GetClassNode} getClassNode
* Inline method: {@link GetClassNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link GetTPFlagsNode#get}
* Parameter: {@link GetTypeFlagsNode} getTypeFlagsNode
*/
@Child private GetTypeFlagsNode getTypeFlagsNode_;
/**
* Source Info:
* Specialization: {@link GetTPFlagsNode#get}
* Parameter: {@link GetClassNode} getClassNode
* Inline method: {@link GetClassNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getClassNode__field1_;
private GetTPFlagsNodeGen() {
}
@Override
public long execute(Object arg0Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetTPFlagsNode.get(Object, Node, GetTypeFlagsNode, GetClassNode)] */) {
{
GetTypeFlagsNode getTypeFlagsNode__ = this.getTypeFlagsNode_;
if (getTypeFlagsNode__ != null) {
Node inliningTarget__ = (this);
return get(arg0Value, inliningTarget__, getTypeFlagsNode__, INLINED_GET_CLASS_NODE_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value);
}
private long executeAndSpecialize(Object arg0Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
GetTypeFlagsNode getTypeFlagsNode__ = this.insert((GetTypeFlagsNodeGen.create()));
Objects.requireNonNull(getTypeFlagsNode__, "Specialization 'get(Object, Node, GetTypeFlagsNode, GetClassNode)' cache 'getTypeFlagsNode' 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.getTypeFlagsNode_ = getTypeFlagsNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[GetTPFlagsNode.get(Object, Node, GetTypeFlagsNode, GetClassNode)] */;
this.state_0_ = state_0;
return get(arg0Value, inliningTarget__, getTypeFlagsNode__, INLINED_GET_CLASS_NODE_);
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b1) == 0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
@NeverDefault
public static GetTPFlagsNode create() {
return new GetTPFlagsNodeGen();
}
@NeverDefault
public static GetTPFlagsNode getUncached() {
return GetTPFlagsNodeGen.UNCACHED;
}
@GeneratedBy(GetTPFlagsNode.class)
@DenyReplace
private static final class Uncached extends GetTPFlagsNode {
@TruffleBoundary
@Override
public long execute(Object arg0Value) {
return get(arg0Value, (this), (GetTypeFlagsNode.getUncached()), (GetClassNode.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy