All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.graal.python.lib.PyTimeFromObjectNodeGen Maven / Gradle / Ivy

There is a newer version: 24.1.1
Show newest version
// 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.graal.python.nodes.truffle.PythonArithmeticTypesGen;
import com.oracle.graal.python.nodes.util.CastToJavaDoubleNode;
import com.oracle.graal.python.nodes.util.CastToJavaDoubleNodeGen;
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.DSLSupport.SpecializationDataNode;
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.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.lang.invoke.MethodHandles.Lookup;

/**
 * Debug Info: 
 *   Specialization {@link PyTimeFromObjectNode#doDouble}
 *     Activation probability: 0.48333
 *     With/without class size: 11/0 bytes
 *   Specialization {@link PyTimeFromObjectNode#doLong}
 *     Activation probability: 0.33333
 *     With/without class size: 9/0 bytes
 *   Specialization {@link PyTimeFromObjectNode#doOther}
 *     Activation probability: 0.18333
 *     With/without class size: 11/23 bytes
 * 
*/ @GeneratedBy(PyTimeFromObjectNode.class) @SuppressWarnings("javadoc") public final class PyTimeFromObjectNodeGen { private static final StateField OTHER__PY_TIME_FROM_OBJECT_NODE_OTHER_STATE_0_UPDATER = StateField.create(OtherData.lookup_(), "other_state_0_"); /** * Required Fields:
    *
  • {@link Inlined#state_0_} *
  • {@link Inlined#raiseNode_field1_} *
  • {@link Inlined#other_cache} *
*/ @NeverDefault public static PyTimeFromObjectNode inline(@RequiredField(bits = 9, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) { return new PyTimeFromObjectNodeGen.Inlined(target); } @GeneratedBy(PyTimeFromObjectNode.class) @DenyReplace private static final class Inlined extends PyTimeFromObjectNode { /** * State Info:
         *   0: SpecializationActive {@link PyTimeFromObjectNode#doDouble}
         *   1: SpecializationActive {@link PyTimeFromObjectNode#doLong}
         *   2: SpecializationActive {@link PyTimeFromObjectNode#doOther}
         *   3-4: ImplicitCast[type=double, index=1]
         *   5-7: ImplicitCast[type=long, index=1]
         *   8: InlinedCache
         *        Specialization: {@link PyTimeFromObjectNode#doDouble}
         *        Parameter: {@link Lazy} raiseNode
         *        Inline method: {@link LazyNodeGen#inline}
         * 
*/ private final StateField state_0_; private final ReferenceField raiseNode_field1_; private final ReferenceField other_cache; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doDouble}
         *   Parameter: {@link Lazy} raiseNode
         *   Inline method: {@link LazyNodeGen#inline}
*/ private final Lazy raiseNode; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link CastToJavaDoubleNode} castToDouble
         *   Inline method: {@link CastToJavaDoubleNodeGen#inline}
*/ private final CastToJavaDoubleNode other_castToDouble_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link Lazy} raiseNode
         *   Inline method: {@link LazyNodeGen#inline}
*/ private final Lazy other_raiseNode_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link PyLongAsLongAndOverflowNode} asLongNode
         *   Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
*/ private final PyLongAsLongAndOverflowNode other_asLongNode_; @SuppressWarnings("unchecked") private Inlined(InlineTarget target) { assert target.getTargetClass().isAssignableFrom(PyTimeFromObjectNode.class); this.state_0_ = target.getState(0, 9); this.raiseNode_field1_ = target.getReference(1, Node.class); this.other_cache = target.getReference(2, OtherData.class); this.raiseNode = LazyNodeGen.inline(InlineTarget.create(Lazy.class, state_0_.subUpdater(8, 1), raiseNode_field1_)); this.other_castToDouble_ = CastToJavaDoubleNodeGen.inline(InlineTarget.create(CastToJavaDoubleNode.class, OTHER__PY_TIME_FROM_OBJECT_NODE_OTHER_STATE_0_UPDATER.subUpdater(0, 17), ReferenceField.create(OtherData.lookup_(), "other_castToDouble__field1_", Node.class), ReferenceField.create(OtherData.lookup_(), "other_castToDouble__field2_", Node.class), ReferenceField.create(OtherData.lookup_(), "other_castToDouble__field3_", Node.class))); this.other_raiseNode_ = LazyNodeGen.inline(InlineTarget.create(Lazy.class, OTHER__PY_TIME_FROM_OBJECT_NODE_OTHER_STATE_0_UPDATER.subUpdater(17, 1), ReferenceField.create(OtherData.lookup_(), "other_raiseNode__field1_", Node.class))); this.other_asLongNode_ = PyLongAsLongAndOverflowNodeGen.inline(InlineTarget.create(PyLongAsLongAndOverflowNode.class, OTHER__PY_TIME_FROM_OBJECT_NODE_OTHER_STATE_0_UPDATER.subUpdater(18, 6), ReferenceField.create(OtherData.lookup_(), "other_asLongNode__field1_", Node.class))); } @Override public long execute(VirtualFrame frameValue, Node arg0Value, Object arg1Value, RoundType arg2Value, long arg3Value) { int state_0 = this.state_0_.get(arg0Value); if ((state_0 & 0b111) != 0 /* is SpecializationActive[PyTimeFromObjectNode.doDouble(Node, double, RoundType, long, Lazy)] || SpecializationActive[PyTimeFromObjectNode.doLong(Node, long, RoundType, long, Lazy)] || SpecializationActive[PyTimeFromObjectNode.doOther(VirtualFrame, Node, Object, RoundType, long, CastToJavaDoubleNode, Lazy, PyLongAsLongAndOverflowNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PyTimeFromObjectNode.doDouble(Node, double, RoundType, long, Lazy)] */ && PythonArithmeticTypesGen.isImplicitDouble((state_0 & 0b11000) >>> 3 /* get-int ImplicitCast[type=double, index=1] */, arg1Value)) { double arg1Value_ = PythonArithmeticTypesGen.asImplicitDouble((state_0 & 0b11000) >>> 3 /* get-int ImplicitCast[type=double, index=1] */, arg1Value); return PyTimeFromObjectNode.doDouble(arg0Value, arg1Value_, arg2Value, arg3Value, this.raiseNode); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PyTimeFromObjectNode.doLong(Node, long, RoundType, long, Lazy)] */ && PythonArithmeticTypesGen.isImplicitLong((state_0 & 0b11100000) >>> 5 /* get-int ImplicitCast[type=long, index=1] */, arg1Value)) { long arg1Value_ = PythonArithmeticTypesGen.asImplicitLong((state_0 & 0b11100000) >>> 5 /* get-int ImplicitCast[type=long, index=1] */, arg1Value); return PyTimeFromObjectNode.doLong(arg0Value, arg1Value_, arg2Value, arg3Value, this.raiseNode); } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PyTimeFromObjectNode.doOther(VirtualFrame, Node, Object, RoundType, long, CastToJavaDoubleNode, Lazy, PyLongAsLongAndOverflowNode)] */) { OtherData s2_ = this.other_cache.get(arg0Value); if (s2_ != null) { return PyTimeFromObjectNode.doOther(frameValue, s2_, arg1Value, arg2Value, arg3Value, this.other_castToDouble_, this.other_raiseNode_, this.other_asLongNode_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, arg0Value, arg1Value, arg2Value, arg3Value); } private long executeAndSpecialize(VirtualFrame frameValue, Node arg0Value, Object arg1Value, RoundType arg2Value, long arg3Value) { int state_0 = this.state_0_.get(arg0Value); { int doubleCast1; if ((doubleCast1 = PythonArithmeticTypesGen.specializeImplicitDouble(arg1Value)) != 0) { double arg1Value_ = PythonArithmeticTypesGen.asImplicitDouble(doubleCast1, arg1Value); state_0 = (state_0 | (doubleCast1 << 3) /* set-int ImplicitCast[type=double, index=1] */); state_0 = state_0 | 0b1 /* add SpecializationActive[PyTimeFromObjectNode.doDouble(Node, double, RoundType, long, Lazy)] */; this.state_0_.set(arg0Value, state_0); return PyTimeFromObjectNode.doDouble(arg0Value, arg1Value_, arg2Value, arg3Value, this.raiseNode); } } { int longCast1; if ((longCast1 = PythonArithmeticTypesGen.specializeImplicitLong(arg1Value)) != 0) { long arg1Value_ = PythonArithmeticTypesGen.asImplicitLong(longCast1, arg1Value); state_0 = (state_0 | (longCast1 << 5) /* set-int ImplicitCast[type=long, index=1] */); state_0 = state_0 | 0b10 /* add SpecializationActive[PyTimeFromObjectNode.doLong(Node, long, RoundType, long, Lazy)] */; this.state_0_.set(arg0Value, state_0); return PyTimeFromObjectNode.doLong(arg0Value, arg1Value_, arg2Value, arg3Value, this.raiseNode); } } OtherData s2_ = arg0Value.insert(new OtherData()); VarHandle.storeStoreFence(); this.other_cache.set(arg0Value, s2_); state_0 = state_0 | 0b100 /* add SpecializationActive[PyTimeFromObjectNode.doOther(VirtualFrame, Node, Object, RoundType, long, CastToJavaDoubleNode, Lazy, PyLongAsLongAndOverflowNode)] */; this.state_0_.set(arg0Value, state_0); return PyTimeFromObjectNode.doOther(frameValue, s2_, arg1Value, arg2Value, arg3Value, this.other_castToDouble_, this.other_raiseNode_, this.other_asLongNode_); } @Override public boolean isAdoptable() { return false; } } @GeneratedBy(PyTimeFromObjectNode.class) @DenyReplace private static final class OtherData extends Node implements SpecializationDataNode { /** * State Info:
         *   0-16: InlinedCache
         *        Specialization: {@link PyTimeFromObjectNode#doOther}
         *        Parameter: {@link CastToJavaDoubleNode} castToDouble
         *        Inline method: {@link CastToJavaDoubleNodeGen#inline}
         *   17: InlinedCache
         *        Specialization: {@link PyTimeFromObjectNode#doOther}
         *        Parameter: {@link Lazy} raiseNode
         *        Inline method: {@link LazyNodeGen#inline}
         *   18-23: InlinedCache
         *        Specialization: {@link PyTimeFromObjectNode#doOther}
         *        Parameter: {@link PyLongAsLongAndOverflowNode} asLongNode
         *        Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int other_state_0_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link CastToJavaDoubleNode} castToDouble
         *   Inline method: {@link CastToJavaDoubleNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node other_castToDouble__field1_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link CastToJavaDoubleNode} castToDouble
         *   Inline method: {@link CastToJavaDoubleNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node other_castToDouble__field2_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link CastToJavaDoubleNode} castToDouble
         *   Inline method: {@link CastToJavaDoubleNodeGen#inline}
         *   Inline field: {@link Node} field3
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node other_castToDouble__field3_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link Lazy} raiseNode
         *   Inline method: {@link LazyNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node other_raiseNode__field1_; /** * Source Info:
         *   Specialization: {@link PyTimeFromObjectNode#doOther}
         *   Parameter: {@link PyLongAsLongAndOverflowNode} asLongNode
         *   Inline method: {@link PyLongAsLongAndOverflowNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node other_asLongNode__field1_; OtherData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy