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

com.oracle.graal.python.nodes.expression.ContainsNodeGen Maven / Gradle / Ivy

There is a newer version: 24.1.1
Show newest version
// CheckStyle: start generated
package com.oracle.graal.python.nodes.expression;

import com.oracle.graal.python.lib.PyObjectGetIter;
import com.oracle.graal.python.lib.PyObjectGetIterNodeGen;
import com.oracle.graal.python.lib.PyObjectRichCompareBool.EqNode;
import com.oracle.graal.python.lib.PyObjectRichCompareBoolFactory.EqNodeGen;
import com.oracle.graal.python.nodes.expression.CoerceToBooleanNode.YesNode;
import com.oracle.graal.python.nodes.expression.CoerceToBooleanNodeFactory.YesNodeGen;
import com.oracle.graal.python.nodes.object.BuiltinClassProfiles.IsBuiltinObjectProfile;
import com.oracle.graal.python.nodes.object.BuiltinClassProfilesFactory.IsBuiltinObjectProfileNodeGen;
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.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import java.lang.invoke.MethodHandles;

/**
 * Debug Info: 
 *   Specialization {@link ContainsNode#doBoolean}
 *     Activation probability: 0.32000
 *     With/without class size: 9/0 bytes
 *   Specialization {@link ContainsNode#doInt}
 *     Activation probability: 0.26000
 *     With/without class size: 8/0 bytes
 *   Specialization {@link ContainsNode#doLong}
 *     Activation probability: 0.20000
 *     With/without class size: 7/0 bytes
 *   Specialization {@link ContainsNode#doDouble}
 *     Activation probability: 0.14000
 *     With/without class size: 6/0 bytes
 *   Specialization {@link ContainsNode#doGeneric}
 *     Activation probability: 0.08000
 *     With/without class size: 5/0 bytes
 * 
*/ @GeneratedBy(ContainsNode.class) @SuppressWarnings("javadoc") public final class ContainsNodeGen extends ContainsNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); private static final StateField STATE_1_UPDATER = StateField.create(MethodHandles.lookup(), "state_1_"); private static final StateField STATE_2_UPDATER = StateField.create(MethodHandles.lookup(), "state_2_"); /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link YesNode} castBool
     *   Inline method: {@link YesNodeGen#inline}
*/ private static final YesNode INLINED_CAST_BOOL = YesNodeGen.inline(InlineTarget.create(YesNode.class, STATE_0_UPDATER.subUpdater(9, 6), ReferenceField.create(MethodHandles.lookup(), "castBool_field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link IsBuiltinObjectProfile} errorProfile
     *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/ private static final IsBuiltinObjectProfile INLINED_ERROR_PROFILE = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, STATE_1_UPDATER.subUpdater(0, 20), ReferenceField.create(MethodHandles.lookup(), "errorProfile_field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link PyObjectGetIter} getIter
     *   Inline method: {@link PyObjectGetIterNodeGen#inline}
*/ private static final PyObjectGetIter INLINED_GET_ITER = PyObjectGetIterNodeGen.inline(InlineTarget.create(PyObjectGetIter.class, STATE_0_UPDATER.subUpdater(15, 2), ReferenceField.create(MethodHandles.lookup(), "getIter_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "getIter_field2_", Node.class))); /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link EqNode} eqNode
     *   Inline method: {@link EqNodeGen#inline}
*/ private static final EqNode INLINED_EQ_NODE = EqNodeGen.inline(InlineTarget.create(EqNode.class, STATE_2_UPDATER.subUpdater(0, 25), ReferenceField.create(MethodHandles.lookup(), "eqNode_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "eqNode_field2_", Node.class))); /** * State Info:
     *   0: SpecializationActive {@link ContainsNode#doBoolean}
     *   1: SpecializationExcluded {@link ContainsNode#doBoolean}
     *   2: SpecializationActive {@link ContainsNode#doInt}
     *   3: SpecializationExcluded {@link ContainsNode#doInt}
     *   4: SpecializationActive {@link ContainsNode#doLong}
     *   5: SpecializationExcluded {@link ContainsNode#doLong}
     *   6: SpecializationActive {@link ContainsNode#doDouble}
     *   7: SpecializationExcluded {@link ContainsNode#doDouble}
     *   8: SpecializationActive {@link ContainsNode#doGeneric}
     *   9-14: InlinedCache
     *        Specialization: {@link ContainsNode#doBoolean}
     *        Parameter: {@link YesNode} castBool
     *        Inline method: {@link YesNodeGen#inline}
     *   15-16: InlinedCache
     *        Specialization: {@link ContainsNode#doBoolean}
     *        Parameter: {@link PyObjectGetIter} getIter
     *        Inline method: {@link PyObjectGetIterNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * State Info:
     *   0-19: InlinedCache
     *        Specialization: {@link ContainsNode#doBoolean}
     *        Parameter: {@link IsBuiltinObjectProfile} errorProfile
     *        Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_1_; /** * State Info:
     *   0-24: InlinedCache
     *        Specialization: {@link ContainsNode#doBoolean}
     *        Parameter: {@link EqNode} eqNode
     *        Inline method: {@link EqNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_2_; /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link YesNode} castBool
     *   Inline method: {@link YesNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node castBool_field1_; /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link IsBuiltinObjectProfile} errorProfile
     *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node errorProfile_field1_; /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link PyObjectGetIter} getIter
     *   Inline method: {@link PyObjectGetIterNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getIter_field1_; /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link PyObjectGetIter} getIter
     *   Inline method: {@link PyObjectGetIterNodeGen#inline}
     *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getIter_field2_; /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link EqNode} eqNode
     *   Inline method: {@link EqNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node eqNode_field1_; /** * Source Info:
     *   Specialization: {@link ContainsNode#doBoolean}
     *   Parameter: {@link EqNode} eqNode
     *   Inline method: {@link EqNodeGen#inline}
     *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node eqNode_field2_; private ContainsNodeGen() { } @Override public Object executeObject(VirtualFrame frameValue, Object arg0Value, Object arg1Value) { int state_0 = this.state_0_; if ((state_0 & 0b101010101) != 0 /* is SpecializationActive[ContainsNode.doBoolean(VirtualFrame, boolean, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] || SpecializationActive[ContainsNode.doInt(VirtualFrame, int, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] || SpecializationActive[ContainsNode.doLong(VirtualFrame, long, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] || SpecializationActive[ContainsNode.doDouble(VirtualFrame, double, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] || SpecializationActive[ContainsNode.doGeneric(VirtualFrame, Object, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[ContainsNode.doBoolean(VirtualFrame, boolean, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */ && arg0Value instanceof Boolean) { boolean arg0Value_ = (boolean) arg0Value; { Node inliningTarget__ = (this); try { return doBoolean(frameValue, arg0Value_, arg1Value, inliningTarget__, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[ContainsNode.doBoolean(VirtualFrame, boolean, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b10 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[ContainsNode.doInt(VirtualFrame, int, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */ && arg0Value instanceof Integer) { int arg0Value_ = (int) arg0Value; { Node inliningTarget__1 = (this); try { return doInt(frameValue, arg0Value_, arg1Value, inliningTarget__1, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[ContainsNode.doInt(VirtualFrame, int, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b1000 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[ContainsNode.doLong(VirtualFrame, long, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */ && arg0Value instanceof Long) { long arg0Value_ = (long) arg0Value; { Node inliningTarget__2 = (this); try { return doLong(frameValue, arg0Value_, arg1Value, inliningTarget__2, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffef /* remove SpecializationActive[ContainsNode.doLong(VirtualFrame, long, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b100000 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[ContainsNode.doDouble(VirtualFrame, double, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */ && arg0Value instanceof Double) { double arg0Value_ = (double) arg0Value; { Node inliningTarget__3 = (this); try { return doDouble(frameValue, arg0Value_, arg1Value, inliningTarget__3, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffbf /* remove SpecializationActive[ContainsNode.doDouble(VirtualFrame, double, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b10000000 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[ContainsNode.doGeneric(VirtualFrame, Object, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */) { { Node inliningTarget__4 = (this); return doGeneric(frameValue, arg0Value, arg1Value, inliningTarget__4, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, arg0Value, arg1Value); } private Object executeAndSpecialize(VirtualFrame frameValue, Object arg0Value, Object arg1Value) { int state_0 = this.state_0_; { Node inliningTarget__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationExcluded */ && arg0Value instanceof Boolean) { boolean arg0Value_ = (boolean) arg0Value; inliningTarget__ = (this); state_0 = state_0 | 0b1 /* add SpecializationActive[ContainsNode.doBoolean(VirtualFrame, boolean, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; this.state_0_ = state_0; try { return doBoolean(frameValue, arg0Value_, arg1Value, inliningTarget__, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[ContainsNode.doBoolean(VirtualFrame, boolean, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b10 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } { Node inliningTarget__1 = null; if (((state_0 & 0b1000)) == 0 /* is-not SpecializationExcluded */ && arg0Value instanceof Integer) { int arg0Value_ = (int) arg0Value; inliningTarget__1 = (this); state_0 = state_0 | 0b100 /* add SpecializationActive[ContainsNode.doInt(VirtualFrame, int, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; this.state_0_ = state_0; try { return doInt(frameValue, arg0Value_, arg1Value, inliningTarget__1, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[ContainsNode.doInt(VirtualFrame, int, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b1000 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } { Node inliningTarget__2 = null; if (((state_0 & 0b100000)) == 0 /* is-not SpecializationExcluded */ && arg0Value instanceof Long) { long arg0Value_ = (long) arg0Value; inliningTarget__2 = (this); state_0 = state_0 | 0b10000 /* add SpecializationActive[ContainsNode.doLong(VirtualFrame, long, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; this.state_0_ = state_0; try { return doLong(frameValue, arg0Value_, arg1Value, inliningTarget__2, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffef /* remove SpecializationActive[ContainsNode.doLong(VirtualFrame, long, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b100000 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } { Node inliningTarget__3 = null; if (((state_0 & 0b10000000)) == 0 /* is-not SpecializationExcluded */ && arg0Value instanceof Double) { double arg0Value_ = (double) arg0Value; inliningTarget__3 = (this); state_0 = state_0 | 0b1000000 /* add SpecializationActive[ContainsNode.doDouble(VirtualFrame, double, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; this.state_0_ = state_0; try { return doDouble(frameValue, arg0Value_, arg1Value, inliningTarget__3, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffbf /* remove SpecializationActive[ContainsNode.doDouble(VirtualFrame, double, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; state_0 = state_0 | 0b10000000 /* add SpecializationExcluded */; this.state_0_ = state_0; return ex.getResult(); } } } { Node inliningTarget__4 = null; inliningTarget__4 = (this); state_0 = state_0 | 0b100000000 /* add SpecializationActive[ContainsNode.doGeneric(VirtualFrame, Object, Object, Node, YesNode, IsBuiltinObjectProfile, PyObjectGetIter, EqNode)] */; this.state_0_ = state_0; return doGeneric(frameValue, arg0Value, arg1Value, inliningTarget__4, INLINED_CAST_BOOL, INLINED_ERROR_PROFILE, INLINED_GET_ITER, INLINED_EQ_NODE); } } @Override public NodeCost getCost() { int state_0 = this.state_0_; if ((state_0 & 0b101010101) == 0) { return NodeCost.UNINITIALIZED; } else { int counter = 0; counter += Integer.bitCount((state_0 & 0b101010101)); if (counter == 1) { return NodeCost.MONOMORPHIC; } } return NodeCost.POLYMORPHIC; } @NeverDefault public static ContainsNode create() { return new ContainsNodeGen(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy