com.oracle.graal.python.lib.PyLongAsLongNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.lib;
import com.oracle.graal.python.nodes.PRaiseNode.Lazy;
import com.oracle.graal.python.nodes.PRaiseNodeGen.LazyNodeGen;
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.InlineSupport;
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.RequiredField;
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;
/**
* Debug Info:
* Specialization {@link PyLongAsLongNode#doObject}
* Activation probability: 1.00000
* With/without class size: 32/9 bytes
*
*/
@GeneratedBy(PyLongAsLongNode.class)
@SuppressWarnings("javadoc")
public final class PyLongAsLongNodeGen extends PyLongAsLongNode {
private static final StateField STATE_0_PyLongAsLongNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link PyLongAsLongAndOverflowNode} pyLongAsLongAndOverflow
* Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
*/
private static final PyLongAsLongAndOverflowNode INLINED_PY_LONG_AS_LONG_AND_OVERFLOW_ = PyLongAsLongAndOverflowNodeGen.inline(InlineTarget.create(PyLongAsLongAndOverflowNode.class, STATE_0_PyLongAsLongNode_UPDATER.subUpdater(0, 6), ReferenceField.create(MethodHandles.lookup(), "pyLongAsLongAndOverflow__field1_", Node.class)));
/**
* Source Info:
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link Lazy} raiseNode
* Inline method: {@link LazyNodeGen#inline}
*/
private static final Lazy INLINED_RAISE_NODE_ = LazyNodeGen.inline(InlineTarget.create(Lazy.class, STATE_0_PyLongAsLongNode_UPDATER.subUpdater(6, 1), ReferenceField.create(MethodHandles.lookup(), "raiseNode__field1_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0-5: InlinedCache
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link PyLongAsLongAndOverflowNode} pyLongAsLongAndOverflow
* Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
* 6: InlinedCache
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link Lazy} raiseNode
* Inline method: {@link LazyNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link PyLongAsLongAndOverflowNode} pyLongAsLongAndOverflow
* Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node pyLongAsLongAndOverflow__field1_;
/**
* Source Info:
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link Lazy} raiseNode
* Inline method: {@link LazyNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node raiseNode__field1_;
private PyLongAsLongNodeGen() {
}
@Override
public long execute(Frame frameValue, Node arg0Value, Object arg1Value) {
return PyLongAsLongNode.doObject((VirtualFrame) frameValue, this, arg1Value, INLINED_PY_LONG_AS_LONG_AND_OVERFLOW_, INLINED_RAISE_NODE_);
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@NeverDefault
public static PyLongAsLongNode create() {
return new PyLongAsLongNodeGen();
}
@NeverDefault
public static PyLongAsLongNode getUncached() {
return PyLongAsLongNodeGen.UNCACHED;
}
/**
* Required Fields:
* - {@link Inlined#state_0_}
*
- {@link Inlined#pyLongAsLongAndOverflow__field1_}
*
- {@link Inlined#raiseNode__field1_}
*
*/
@NeverDefault
public static PyLongAsLongNode inline(@RequiredField(bits = 7, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) {
return new PyLongAsLongNodeGen.Inlined(target);
}
@GeneratedBy(PyLongAsLongNode.class)
@DenyReplace
private static final class Inlined extends PyLongAsLongNode {
/**
* State Info:
* 0-5: InlinedCache
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link PyLongAsLongAndOverflowNode} pyLongAsLongAndOverflow
* Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
* 6: InlinedCache
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link Lazy} raiseNode
* Inline method: {@link LazyNodeGen#inline}
*
*/
private final StateField state_0_;
private final ReferenceField pyLongAsLongAndOverflow__field1_;
private final ReferenceField raiseNode__field1_;
/**
* Source Info:
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link PyLongAsLongAndOverflowNode} pyLongAsLongAndOverflow
* Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
*/
private final PyLongAsLongAndOverflowNode pyLongAsLongAndOverflow_;
/**
* Source Info:
* Specialization: {@link PyLongAsLongNode#doObject}
* Parameter: {@link Lazy} raiseNode
* Inline method: {@link LazyNodeGen#inline}
*/
private final Lazy raiseNode_;
@SuppressWarnings("unchecked")
private Inlined(InlineTarget target) {
assert target.getTargetClass().isAssignableFrom(PyLongAsLongNode.class);
this.state_0_ = target.getState(0, 7);
this.pyLongAsLongAndOverflow__field1_ = target.getReference(1, Node.class);
this.raiseNode__field1_ = target.getReference(2, Node.class);
this.pyLongAsLongAndOverflow_ = PyLongAsLongAndOverflowNodeGen.inline(InlineTarget.create(PyLongAsLongAndOverflowNode.class, state_0_.subUpdater(0, 6), pyLongAsLongAndOverflow__field1_));
this.raiseNode_ = LazyNodeGen.inline(InlineTarget.create(Lazy.class, state_0_.subUpdater(6, 1), raiseNode__field1_));
}
@Override
public long execute(Frame frameValue, Node arg0Value, Object arg1Value) {
assert InlineSupport.validate(arg0Value, this.state_0_, this.pyLongAsLongAndOverflow__field1_, this.state_0_, this.raiseNode__field1_);
return PyLongAsLongNode.doObject((VirtualFrame) frameValue, arg0Value, arg1Value, this.pyLongAsLongAndOverflow_, this.raiseNode_);
}
@Override
public boolean isAdoptable() {
return false;
}
}
@GeneratedBy(PyLongAsLongNode.class)
@DenyReplace
private static final class Uncached extends PyLongAsLongNode {
@Override
public long execute(Frame frameValue, Node arg0Value, Object arg1Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return PyLongAsLongNode.doObject((VirtualFrame) frameValue, arg0Value, arg1Value, (PyLongAsLongAndOverflowNodeGen.getUncached()), (Lazy.getUncached()));
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy