com.oracle.graal.python.nodes.bytecode.GetANextNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.bytecode;
import com.oracle.graal.python.builtins.objects.asyncio.GetAwaitableNode;
import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
import com.oracle.graal.python.nodes.PRaiseNode;
import com.oracle.graal.python.nodes.call.special.CallUnaryMethodNode;
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.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.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.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.profiles.InlinedBranchProfile;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link GetANextNode#doGeneric}
* Activation probability: 1.00000
* With/without class size: 48/27 bytes
*
*/
@GeneratedBy(GetANextNode.class)
@SuppressWarnings("javadoc")
public final class GetANextNodeGen extends GetANextNode {
private static final StateField STATE_0_GetANextNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link GetClassNode} getAsyncIterType
* Inline method: {@link GetClassNodeGen#inline}
*/
private static final GetClassNode INLINED_GET_ASYNC_ITER_TYPE_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, STATE_0_GetANextNode_UPDATER.subUpdater(1, 17), ReferenceField.create(MethodHandles.lookup(), "getAsyncIterType__field1_", Node.class)));
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link InlinedBranchProfile} errorProfile
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_ERROR_PROFILE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetANextNode_UPDATER.subUpdater(18, 1)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link GetANextNode#doGeneric}
* 1-17: InlinedCache
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link GetClassNode} getAsyncIterType
* Inline method: {@link GetClassNodeGen#inline}
* 18: InlinedCache
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link InlinedBranchProfile} errorProfile
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link LookupSpecialMethodSlotNode} getANext
*/
@Child private LookupSpecialMethodSlotNode getANext_;
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link GetClassNode} getAsyncIterType
* Inline method: {@link GetClassNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getAsyncIterType__field1_;
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link PRaiseNode} raiseNoANext
*/
@Child private PRaiseNode raiseNoANext_;
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link CallUnaryMethodNode} callANext
*/
@Child private CallUnaryMethodNode callANext_;
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link PRaiseNode} raiseInvalidObject
*/
@Child private PRaiseNode raiseInvalidObject_;
/**
* Source Info:
* Specialization: {@link GetANextNode#doGeneric}
* Parameter: {@link GetAwaitableNode} getAwaitable
*/
@Child private GetAwaitableNode getAwaitable_;
private GetANextNodeGen() {
}
@Override
public Object execute(Frame frameValue, Object arg0Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetANextNode.doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)] */) {
{
LookupSpecialMethodSlotNode getANext__ = this.getANext_;
if (getANext__ != null) {
PRaiseNode raiseNoANext__ = this.raiseNoANext_;
if (raiseNoANext__ != null) {
CallUnaryMethodNode callANext__ = this.callANext_;
if (callANext__ != null) {
PRaiseNode raiseInvalidObject__ = this.raiseInvalidObject_;
if (raiseInvalidObject__ != null) {
GetAwaitableNode getAwaitable__ = this.getAwaitable_;
if (getAwaitable__ != null) {
Node inliningTarget__ = (this);
return doGeneric(frameValue, arg0Value, inliningTarget__, getANext__, INLINED_GET_ASYNC_ITER_TYPE_, raiseNoANext__, INLINED_ERROR_PROFILE_, callANext__, raiseInvalidObject__, getAwaitable__);
}
}
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(frameValue, arg0Value);
}
private Object executeAndSpecialize(Frame frameValue, Object arg0Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
LookupSpecialMethodSlotNode getANext__ = this.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.ANext)));
Objects.requireNonNull(getANext__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)' cache 'getANext' 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.getANext_ = getANext__;
PRaiseNode raiseNoANext__ = this.insert((PRaiseNode.create()));
Objects.requireNonNull(raiseNoANext__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)' cache 'raiseNoANext' 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.raiseNoANext_ = raiseNoANext__;
CallUnaryMethodNode callANext__ = this.insert((CallUnaryMethodNode.create()));
Objects.requireNonNull(callANext__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)' cache 'callANext' 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.callANext_ = callANext__;
PRaiseNode raiseInvalidObject__ = this.insert((PRaiseNode.create()));
Objects.requireNonNull(raiseInvalidObject__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)' cache 'raiseInvalidObject' 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.raiseInvalidObject_ = raiseInvalidObject__;
GetAwaitableNode getAwaitable__ = this.insert((GetAwaitableNode.create()));
Objects.requireNonNull(getAwaitable__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)' cache 'getAwaitable' 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.getAwaitable_ = getAwaitable__;
state_0 = state_0 | 0b1 /* add SpecializationActive[GetANextNode.doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, PRaiseNode, InlinedBranchProfile, CallUnaryMethodNode, PRaiseNode, GetAwaitableNode)] */;
this.state_0_ = state_0;
return doGeneric(frameValue, arg0Value, inliningTarget__, getANext__, INLINED_GET_ASYNC_ITER_TYPE_, raiseNoANext__, INLINED_ERROR_PROFILE_, callANext__, raiseInvalidObject__, getAwaitable__);
}
}
@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 GetANextNode create() {
return new GetANextNodeGen();
}
@NeverDefault
public static GetANextNode getUncached() {
return GetANextNodeGen.UNCACHED;
}
@GeneratedBy(GetANextNode.class)
@DenyReplace
private static final class Uncached extends GetANextNode {
@Override
public Object execute(Frame frameValue, Object arg0Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return doGeneric(frameValue, arg0Value, (this), (LookupSpecialMethodSlotNode.getUncached(SpecialMethodSlot.ANext)), (GetClassNode.getUncached()), (PRaiseNode.getUncached()), (InlinedBranchProfile.getUncached()), (CallUnaryMethodNode.getUncached()), (PRaiseNode.getUncached()), (GetAwaitableNode.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy