com.oracle.graal.python.nodes.bytecode.SetupWithNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.bytecode;
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.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.util.Objects;
/**
* Debug Info:
* Specialization {@link SetupWithNode#setup}
* Activation probability: 1.00000
* With/without class size: 44/23 bytes
*
*/
@GeneratedBy(SetupWithNode.class)
@SuppressWarnings("javadoc")
public final class SetupWithNodeGen extends SetupWithNode {
private static final StateField STATE_0_SetupWithNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link SetupWithNode#setup}
* 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_SetupWithNode_UPDATER.subUpdater(1, 17), ReferenceField.create(MethodHandles.lookup(), "getClassNode__field1_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link SetupWithNode#setup}
* 1-17: InlinedCache
* Specialization: {@link SetupWithNode#setup}
* Parameter: {@link GetClassNode} getClassNode
* Inline method: {@link GetClassNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link SetupWithNode#setup}
* Parameter: {@link GetClassNode} getClassNode
* Inline method: {@link GetClassNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getClassNode__field1_;
/**
* Source Info:
* Specialization: {@link SetupWithNode#setup}
* Parameter: {@link LookupSpecialMethodSlotNode} lookupEnter
*/
@Child private LookupSpecialMethodSlotNode lookupEnter_;
/**
* Source Info:
* Specialization: {@link SetupWithNode#setup}
* Parameter: {@link LookupSpecialMethodSlotNode} lookupExit
*/
@Child private LookupSpecialMethodSlotNode lookupExit_;
/**
* Source Info:
* Specialization: {@link SetupWithNode#setup}
* Parameter: {@link CallUnaryMethodNode} callEnter
*/
@Child private CallUnaryMethodNode callEnter_;
/**
* Source Info:
* Specialization: {@link SetupWithNode#setup}
* Parameter: {@link PRaiseNode} raiseNode
*/
@Child private PRaiseNode raiseNode_;
private SetupWithNodeGen() {
}
@Override
public int execute(Frame frameValue, int arg0Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[SetupWithNode.setup(VirtualFrame, int, Node, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallUnaryMethodNode, PRaiseNode)] */) {
{
LookupSpecialMethodSlotNode lookupEnter__ = this.lookupEnter_;
if (lookupEnter__ != null) {
LookupSpecialMethodSlotNode lookupExit__ = this.lookupExit_;
if (lookupExit__ != null) {
CallUnaryMethodNode callEnter__ = this.callEnter_;
if (callEnter__ != null) {
PRaiseNode raiseNode__ = this.raiseNode_;
if (raiseNode__ != null) {
Node inliningTarget__ = (this);
return SetupWithNode.setup((VirtualFrame) frameValue, arg0Value, inliningTarget__, INLINED_GET_CLASS_NODE_, lookupEnter__, lookupExit__, callEnter__, raiseNode__);
}
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(frameValue, arg0Value);
}
private int executeAndSpecialize(Frame frameValue, int arg0Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
LookupSpecialMethodSlotNode lookupEnter__ = this.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.Enter)));
Objects.requireNonNull(lookupEnter__, "Specialization 'setup(VirtualFrame, int, Node, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallUnaryMethodNode, PRaiseNode)' cache 'lookupEnter' 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.lookupEnter_ = lookupEnter__;
LookupSpecialMethodSlotNode lookupExit__ = this.insert((LookupSpecialMethodSlotNode.create(SpecialMethodSlot.Exit)));
Objects.requireNonNull(lookupExit__, "Specialization 'setup(VirtualFrame, int, Node, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallUnaryMethodNode, PRaiseNode)' cache 'lookupExit' 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.lookupExit_ = lookupExit__;
CallUnaryMethodNode callEnter__ = this.insert((CallUnaryMethodNode.create()));
Objects.requireNonNull(callEnter__, "Specialization 'setup(VirtualFrame, int, Node, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallUnaryMethodNode, PRaiseNode)' cache 'callEnter' 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.callEnter_ = callEnter__;
PRaiseNode raiseNode__ = this.insert((PRaiseNode.create()));
Objects.requireNonNull(raiseNode__, "Specialization 'setup(VirtualFrame, int, Node, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallUnaryMethodNode, PRaiseNode)' cache 'raiseNode' 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.raiseNode_ = raiseNode__;
state_0 = state_0 | 0b1 /* add SpecializationActive[SetupWithNode.setup(VirtualFrame, int, Node, GetClassNode, LookupSpecialMethodSlotNode, LookupSpecialMethodSlotNode, CallUnaryMethodNode, PRaiseNode)] */;
this.state_0_ = state_0;
return SetupWithNode.setup((VirtualFrame) frameValue, arg0Value, inliningTarget__, INLINED_GET_CLASS_NODE_, lookupEnter__, lookupExit__, callEnter__, raiseNode__);
}
}
@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 SetupWithNode create() {
return new SetupWithNodeGen();
}
@NeverDefault
public static SetupWithNode getUncached() {
return SetupWithNodeGen.UNCACHED;
}
@GeneratedBy(SetupWithNode.class)
@DenyReplace
private static final class Uncached extends SetupWithNode {
@Override
public int execute(Frame frameValue, int arg0Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return SetupWithNode.setup((VirtualFrame) frameValue, arg0Value, (this), (GetClassNode.getUncached()), (LookupSpecialMethodSlotNode.getUncached(SpecialMethodSlot.Enter)), (LookupSpecialMethodSlotNode.getUncached(SpecialMethodSlot.Exit)), (CallUnaryMethodNode.getUncached()), (PRaiseNode.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy