com.oracle.graal.python.nodes.bytecode.ExitAWithNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.bytecode;
import com.oracle.graal.python.lib.PyObjectIsTrueNode;
import com.oracle.graal.python.lib.PyObjectIsTrueNodeGen;
import com.oracle.graal.python.nodes.PRaiseNode;
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 ExitAWithNode#exit}
* Activation probability: 1.00000
* With/without class size: 48/27 bytes
*
*/
@GeneratedBy(ExitAWithNode.class)
@SuppressWarnings("javadoc")
public final class ExitAWithNodeGen extends ExitAWithNode {
private static final StateField STATE_0_ExitAWithNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
*/
private static final PyObjectIsTrueNode INLINED_IS_TRUE_NODE_ = PyObjectIsTrueNodeGen.inline(InlineTarget.create(PyObjectIsTrueNode.class, STATE_0_ExitAWithNode_UPDATER.subUpdater(1, 19), STATE_0_ExitAWithNode_UPDATER.subUpdater(20, 4), ReferenceField.create(MethodHandles.lookup(), "isTrueNode__field2_", Object.class), ReferenceField.create(MethodHandles.lookup(), "isTrueNode__field3_", Node.class), ReferenceField.create(MethodHandles.lookup(), "isTrueNode__field4_", Node.class), ReferenceField.create(MethodHandles.lookup(), "isTrueNode__field5_", Node.class), ReferenceField.create(MethodHandles.lookup(), "isTrueNode__field6_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0: SpecializationActive {@link ExitAWithNode#exit}
* 1-19: InlinedCache
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
* 20-23: InlinedCache
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
* Inline field: {@link Object} field2
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object isTrueNode__field2_;
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node isTrueNode__field3_;
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
* Inline field: {@link Node} field4
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node isTrueNode__field4_;
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
* Inline field: {@link Node} field5
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node isTrueNode__field5_;
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PyObjectIsTrueNode} isTrueNode
* Inline method: {@link PyObjectIsTrueNodeGen#inline}
* Inline field: {@link Node} field6
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node isTrueNode__field6_;
/**
* Source Info:
* Specialization: {@link ExitAWithNode#exit}
* Parameter: {@link PRaiseNode} raiseNode
*/
@Child private PRaiseNode raiseNode_;
private ExitAWithNodeGen() {
}
@Override
public int execute(Frame frameValue, int arg0Value, boolean arg1Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[ExitAWithNode.exit(VirtualFrame, int, boolean, Node, PyObjectIsTrueNode, PRaiseNode)] */) {
{
PRaiseNode raiseNode__ = this.raiseNode_;
if (raiseNode__ != null) {
Node inliningTarget__ = (this);
return exit((VirtualFrame) frameValue, arg0Value, arg1Value, inliningTarget__, INLINED_IS_TRUE_NODE_, raiseNode__);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(frameValue, arg0Value, arg1Value);
}
private int executeAndSpecialize(Frame frameValue, int arg0Value, boolean arg1Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
PRaiseNode raiseNode__ = this.insert((PRaiseNode.create()));
Objects.requireNonNull(raiseNode__, "Specialization 'exit(VirtualFrame, int, boolean, Node, PyObjectIsTrueNode, 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[ExitAWithNode.exit(VirtualFrame, int, boolean, Node, PyObjectIsTrueNode, PRaiseNode)] */;
this.state_0_ = state_0;
return exit((VirtualFrame) frameValue, arg0Value, arg1Value, inliningTarget__, INLINED_IS_TRUE_NODE_, 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 ExitAWithNode create() {
return new ExitAWithNodeGen();
}
@NeverDefault
public static ExitAWithNode getUncached() {
return ExitAWithNodeGen.UNCACHED;
}
@GeneratedBy(ExitAWithNode.class)
@DenyReplace
private static final class Uncached extends ExitAWithNode {
@Override
public int execute(Frame frameValue, int arg0Value, boolean arg1Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return exit((VirtualFrame) frameValue, arg0Value, arg1Value, (this), (PyObjectIsTrueNode.getUncached()), (PRaiseNode.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy