Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.oracle.graal.python.nodes.bytecode.GetAIterNodeGen Maven / Gradle / Ivy
package com.oracle.graal.python.nodes.bytecode;
import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
import com.oracle.graal.python.builtins.objects.type.TypeNodes.GetNameNode;
import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.GetNameNodeGen;
import com.oracle.graal.python.nodes.PRaiseNode.Lazy;
import com.oracle.graal.python.nodes.PRaiseNodeGen.LazyNodeGen;
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.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;
@GeneratedBy (GetAIterNode.class )
@SuppressWarnings ("javadoc" )
public final class GetAIterNodeGen extends GetAIterNode {
private static final StateField STATE_0_GetAIterNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_" );
private static final StateField STATE_1_GetAIterNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_1_" );
private static final GetClassNode INLINED_GET_ASYNC_ITER_TYPE_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class , STATE_0_GetAIterNode_UPDATER.subUpdater(1 , 17 ), ReferenceField.create(MethodHandles.lookup(), "getAsyncIterType__field1_" , Node.class )));
private static final Lazy INLINED_RAISE_NO_A_ITER_ = LazyNodeGen.inline(InlineTarget.create(Lazy.class , STATE_0_GetAIterNode_UPDATER.subUpdater(18 , 1 ), ReferenceField.create(MethodHandles.lookup(), "raiseNoAIter__field1_" , Node.class )));
private static final GetNameNode INLINED_GET_NAME_ = GetNameNodeGen.inline(InlineTarget.create(GetNameNode.class , STATE_0_GetAIterNode_UPDATER.subUpdater(19 , 4 ), ReferenceField.create(MethodHandles.lookup(), "getName__field1_" , Node.class )));
private static final InlinedBranchProfile INLINED_ERROR_PROFILE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class , STATE_0_GetAIterNode_UPDATER.subUpdater(23 , 1 )));
private static final Dynamic INLINED_LOOKUP_A_NEXT_ = DynamicNodeGen.inline(InlineTarget.create(Dynamic.class , STATE_1_GetAIterNode_UPDATER.subUpdater(0 , 18 ), ReferenceField.create(MethodHandles.lookup(), "lookupANext__field1_" , Node.class ), ReferenceField.create(MethodHandles.lookup(), "lookupANext__field2_" , Node.class )));
private static final Uncached UNCACHED = new Uncached();
@CompilationFinal @UnsafeAccessedField private int state_0_;
@CompilationFinal @UnsafeAccessedField private int state_1_;
@Child private LookupSpecialMethodSlotNode getAIter_;
@Child @UnsafeAccessedField @SuppressWarnings ("unused" ) private Node getAsyncIterType__field1_;
@Child @UnsafeAccessedField @SuppressWarnings ("unused" ) private Node raiseNoAIter__field1_;
@Child @UnsafeAccessedField @SuppressWarnings ("unused" ) private Node getName__field1_;
@Child private CallUnaryMethodNode callAIter_;
@Child @UnsafeAccessedField @SuppressWarnings ("unused" ) private Node lookupANext__field1_;
@Child @UnsafeAccessedField @SuppressWarnings ("unused" ) private Node lookupANext__field2_;
private GetAIterNodeGen() {
}
@Override
public Object execute(Frame frameValue, Object arg0Value) {
int state_0 = this .state_0_;
if ((state_0 & 0b1 ) != 0 ) {
{
LookupSpecialMethodSlotNode getAIter__ = this .getAIter_;
if (getAIter__ != null ) {
CallUnaryMethodNode callAIter__ = this .callAIter_;
if (callAIter__ != null ) {
Node inliningTarget__ = (this );
return doGeneric(frameValue, arg0Value, inliningTarget__, getAIter__, INLINED_GET_ASYNC_ITER_TYPE_, INLINED_RAISE_NO_A_ITER_, INLINED_GET_NAME_, INLINED_ERROR_PROFILE_, callAIter__, INLINED_LOOKUP_A_NEXT_);
}
}
}
}
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 getAIter__ = this .insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.AIter)));
Objects.requireNonNull(getAIter__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, Lazy, GetNameNode, InlinedBranchProfile, CallUnaryMethodNode, Dynamic)' cache 'getAIter' 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 .getAIter_ = getAIter__;
CallUnaryMethodNode callAIter__ = this .insert((CallUnaryMethodNode.create()));
Objects.requireNonNull(callAIter__, "Specialization 'doGeneric(Frame, Object, Node, LookupSpecialMethodSlotNode, GetClassNode, Lazy, GetNameNode, InlinedBranchProfile, CallUnaryMethodNode, Dynamic)' cache 'callAIter' 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 .callAIter_ = callAIter__;
state_0 = state_0 | 0b1 ;
this .state_0_ = state_0;
return doGeneric(frameValue, arg0Value, inliningTarget__, getAIter__, INLINED_GET_ASYNC_ITER_TYPE_, INLINED_RAISE_NO_A_ITER_, INLINED_GET_NAME_, INLINED_ERROR_PROFILE_, callAIter__, INLINED_LOOKUP_A_NEXT_);
}
}
@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 GetAIterNode create() {
return new GetAIterNodeGen();
}
@NeverDefault
public static GetAIterNode getUncached() {
return GetAIterNodeGen.UNCACHED;
}
@GeneratedBy (GetAIterNode.class )
@DenyReplace
private static final class Uncached extends GetAIterNode {
@Override
public Object execute(Frame frameValue, Object arg0Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return doGeneric(frameValue, arg0Value, (this ), (LookupSpecialMethodSlotNode.getUncached(SpecialMethodSlot.AIter)), (GetClassNode.getUncached()), (Lazy.getUncached()), (GetNameNodeGen.getUncached()), (InlinedBranchProfile.getUncached()), (CallUnaryMethodNode.getUncached()), (DynamicNodeGen.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false ;
}
}
}