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

com.oracle.graal.python.nodes.bytecode.MatchClassNodeGen Maven / Gradle / Ivy

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

import com.oracle.graal.python.builtins.modules.BuiltinFunctions.IsInstanceNode;
import com.oracle.graal.python.builtins.modules.BuiltinFunctionsFactory.IsInstanceNodeFactory;
import com.oracle.graal.python.builtins.objects.str.StringBuiltins.EqNode;
import com.oracle.graal.python.builtins.objects.tuple.TupleBuiltins.GetItemNode;
import com.oracle.graal.python.builtins.objects.tuple.TupleBuiltinsFactory.GetItemNodeFactory;
import com.oracle.graal.python.builtins.objects.type.TypeNodes.GetTypeFlagsNode;
import com.oracle.graal.python.builtins.objects.type.TypeNodes.IsTypeNode;
import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.GetTypeFlagsNodeGen;
import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.IsTypeNodeGen;
import com.oracle.graal.python.lib.PyObjectGetAttr;
import com.oracle.graal.python.lib.PyObjectGetAttrNodeGen;
import com.oracle.graal.python.lib.PyTupleCheckExactNode;
import com.oracle.graal.python.lib.PyTupleCheckExactNodeGen;
import com.oracle.graal.python.lib.PyTupleSizeNode;
import com.oracle.graal.python.lib.PyTupleSizeNodeGen;
import com.oracle.graal.python.lib.PyUnicodeCheckNode;
import com.oracle.graal.python.lib.PyUnicodeCheckNodeGen;
import com.oracle.graal.python.nodes.PRaiseNode;
import com.oracle.graal.python.nodes.object.BuiltinClassProfiles.IsBuiltinObjectProfile;
import com.oracle.graal.python.nodes.object.BuiltinClassProfilesFactory.IsBuiltinObjectProfileNodeGen;
import com.oracle.graal.python.runtime.object.PythonObjectFactory;
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.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.strings.TruffleString;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link MatchClassNode#match}
 *     Activation probability: 1.00000
 *     With/without class size: 88/67 bytes
 * 
*/ @GeneratedBy(MatchClassNode.class) @SuppressWarnings("javadoc") public final class MatchClassNodeGen extends MatchClassNode { private static final StateField STATE_0_MatchClassNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); private static final StateField STATE_1_MatchClassNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_1_"); /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link IsTypeNode} isTypeNode
     *   Inline method: {@link IsTypeNodeGen#inline}
*/ private static final IsTypeNode INLINED_IS_TYPE_NODE_ = IsTypeNodeGen.inline(InlineTarget.create(IsTypeNode.class, STATE_0_MatchClassNode_UPDATER.subUpdater(1, 5), ReferenceField.create(MethodHandles.lookup(), "isTypeNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyObjectGetAttr} getAttr
     *   Inline method: {@link PyObjectGetAttrNodeGen#inline}
*/ private static final PyObjectGetAttr INLINED_GET_ATTR_ = PyObjectGetAttrNodeGen.inline(InlineTarget.create(PyObjectGetAttr.class, STATE_0_MatchClassNode_UPDATER.subUpdater(6, 2), ReferenceField.create(MethodHandles.lookup(), "getAttr__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "getAttr__field2_", Node.class))); /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link IsBuiltinObjectProfile} isClassProfile
     *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/ private static final IsBuiltinObjectProfile INLINED_IS_CLASS_PROFILE_ = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, STATE_0_MatchClassNode_UPDATER.subUpdater(8, 20), ReferenceField.create(MethodHandles.lookup(), "isClassProfile__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyTupleCheckExactNode} tupleCheckExactNode
     *   Inline method: {@link PyTupleCheckExactNodeGen#inline}
*/ private static final PyTupleCheckExactNode INLINED_TUPLE_CHECK_EXACT_NODE_ = PyTupleCheckExactNodeGen.inline(InlineTarget.create(PyTupleCheckExactNode.class, STATE_1_MatchClassNode_UPDATER.subUpdater(0, 20), ReferenceField.create(MethodHandles.lookup(), "tupleCheckExactNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyTupleSizeNode} tupleSizeNode
     *   Inline method: {@link PyTupleSizeNodeGen#inline}
*/ private static final PyTupleSizeNode INLINED_TUPLE_SIZE_NODE_ = PyTupleSizeNodeGen.inline(InlineTarget.create(PyTupleSizeNode.class, STATE_0_MatchClassNode_UPDATER.subUpdater(28, 3), ReferenceField.create(MethodHandles.lookup(), "tupleSizeNode__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "tupleSizeNode__field2_", Node.class))); /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyUnicodeCheckNode} unicodeCheckNode
     *   Inline method: {@link PyUnicodeCheckNodeGen#inline}
*/ private static final PyUnicodeCheckNode INLINED_UNICODE_CHECK_NODE_ = PyUnicodeCheckNodeGen.inline(InlineTarget.create(PyUnicodeCheckNode.class, STATE_1_MatchClassNode_UPDATER.subUpdater(20, 3), ReferenceField.create(MethodHandles.lookup(), "unicodeCheckNode__field1_", Node.class))); /** * State Info:
     *   0: SpecializationActive {@link MatchClassNode#match}
     *   1-5: InlinedCache
     *        Specialization: {@link MatchClassNode#match}
     *        Parameter: {@link IsTypeNode} isTypeNode
     *        Inline method: {@link IsTypeNodeGen#inline}
     *   6-7: InlinedCache
     *        Specialization: {@link MatchClassNode#match}
     *        Parameter: {@link PyObjectGetAttr} getAttr
     *        Inline method: {@link PyObjectGetAttrNodeGen#inline}
     *   8-27: InlinedCache
     *        Specialization: {@link MatchClassNode#match}
     *        Parameter: {@link IsBuiltinObjectProfile} isClassProfile
     *        Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
     *   28-30: InlinedCache
     *        Specialization: {@link MatchClassNode#match}
     *        Parameter: {@link PyTupleSizeNode} tupleSizeNode
     *        Inline method: {@link PyTupleSizeNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * State Info:
     *   0-19: InlinedCache
     *        Specialization: {@link MatchClassNode#match}
     *        Parameter: {@link PyTupleCheckExactNode} tupleCheckExactNode
     *        Inline method: {@link PyTupleCheckExactNodeGen#inline}
     *   20-22: InlinedCache
     *        Specialization: {@link MatchClassNode#match}
     *        Parameter: {@link PyUnicodeCheckNode} unicodeCheckNode
     *        Inline method: {@link PyUnicodeCheckNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link TruffleString} kwArgs
*/ @CompilationFinal(dimensions = 1) private TruffleString[] kwArgs_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link IsTypeNode} isTypeNode
     *   Inline method: {@link IsTypeNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node isTypeNode__field1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link IsInstanceNode} isInstanceNode
*/ @Child private IsInstanceNode isInstanceNode_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyObjectGetAttr} getAttr
     *   Inline method: {@link PyObjectGetAttrNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getAttr__field1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyObjectGetAttr} getAttr
     *   Inline method: {@link PyObjectGetAttrNodeGen#inline}
     *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getAttr__field2_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link GetTypeFlagsNode} getTypeFlagsNode
*/ @Child private GetTypeFlagsNode getTypeFlagsNode_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link IsBuiltinObjectProfile} isClassProfile
     *   Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node isClassProfile__field1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link EqNode} eqStrNode
*/ @Child private EqNode eqStrNode_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyTupleCheckExactNode} tupleCheckExactNode
     *   Inline method: {@link PyTupleCheckExactNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node tupleCheckExactNode__field1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PythonObjectFactory} factory
*/ @Child private PythonObjectFactory factory_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyTupleSizeNode} tupleSizeNode
     *   Inline method: {@link PyTupleSizeNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node tupleSizeNode__field1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyTupleSizeNode} tupleSizeNode
     *   Inline method: {@link PyTupleSizeNodeGen#inline}
     *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node tupleSizeNode__field2_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link GetItemNode} getItemNode
*/ @Child private GetItemNode getItemNode_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PyUnicodeCheckNode} unicodeCheckNode
     *   Inline method: {@link PyUnicodeCheckNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node unicodeCheckNode__field1_; /** * Source Info:
     *   Specialization: {@link MatchClassNode#match}
     *   Parameter: {@link PRaiseNode} raise
*/ @Child private PRaiseNode raise_; private MatchClassNodeGen() { } @Override public Object execute(Frame frameValue, Object arg0Value, Object arg1Value, int arg2Value, TruffleString[] arg3Value) { int state_0 = this.state_0_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[MatchClassNode.match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)] */) { { TruffleString[] kwArgs__ = this.kwArgs_; if (kwArgs__ != null) { IsInstanceNode isInstanceNode__ = this.isInstanceNode_; if (isInstanceNode__ != null) { GetTypeFlagsNode getTypeFlagsNode__ = this.getTypeFlagsNode_; if (getTypeFlagsNode__ != null) { EqNode eqStrNode__ = this.eqStrNode_; if (eqStrNode__ != null) { PythonObjectFactory factory__ = this.factory_; if (factory__ != null) { GetItemNode getItemNode__ = this.getItemNode_; if (getItemNode__ != null) { PRaiseNode raise__ = this.raise_; if (raise__ != null) { Node inliningTarget__ = (this); return match((VirtualFrame) frameValue, arg0Value, arg1Value, arg2Value, arg3Value, inliningTarget__, kwArgs__, INLINED_IS_TYPE_NODE_, isInstanceNode__, INLINED_GET_ATTR_, getTypeFlagsNode__, INLINED_IS_CLASS_PROFILE_, eqStrNode__, INLINED_TUPLE_CHECK_EXACT_NODE_, factory__, INLINED_TUPLE_SIZE_NODE_, getItemNode__, INLINED_UNICODE_CHECK_NODE_, raise__); } } } } } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, arg0Value, arg1Value, arg2Value, arg3Value); } private Object executeAndSpecialize(Frame frameValue, Object arg0Value, Object arg1Value, int arg2Value, TruffleString[] arg3Value) { int state_0 = this.state_0_; { Node inliningTarget__ = null; inliningTarget__ = (this); TruffleString[] kwArgs__ = (arg3Value); Objects.requireNonNull(kwArgs__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'kwArgs' 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.kwArgs_ = kwArgs__; IsInstanceNode isInstanceNode__ = this.insert((IsInstanceNodeFactory.create())); Objects.requireNonNull(isInstanceNode__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'isInstanceNode' 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.isInstanceNode_ = isInstanceNode__; GetTypeFlagsNode getTypeFlagsNode__ = this.insert((GetTypeFlagsNodeGen.create())); Objects.requireNonNull(getTypeFlagsNode__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'getTypeFlagsNode' 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.getTypeFlagsNode_ = getTypeFlagsNode__; EqNode eqStrNode__ = this.insert((EqNode.create())); Objects.requireNonNull(eqStrNode__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'eqStrNode' 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.eqStrNode_ = eqStrNode__; PythonObjectFactory factory__ = this.insert((PythonObjectFactory.create())); Objects.requireNonNull(factory__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'factory' 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.factory_ = factory__; GetItemNode getItemNode__ = this.insert((GetItemNodeFactory.create())); Objects.requireNonNull(getItemNode__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'getItemNode' 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.getItemNode_ = getItemNode__; PRaiseNode raise__ = this.insert((PRaiseNode.create())); Objects.requireNonNull(raise__, "Specialization 'match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)' cache 'raise' 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.raise_ = raise__; state_0 = state_0 | 0b1 /* add SpecializationActive[MatchClassNode.match(VirtualFrame, Object, Object, int, TruffleString[], Node, TruffleString[], IsTypeNode, IsInstanceNode, PyObjectGetAttr, GetTypeFlagsNode, IsBuiltinObjectProfile, EqNode, PyTupleCheckExactNode, PythonObjectFactory, PyTupleSizeNode, GetItemNode, PyUnicodeCheckNode, PRaiseNode)] */; this.state_0_ = state_0; return match((VirtualFrame) frameValue, arg0Value, arg1Value, arg2Value, arg3Value, inliningTarget__, kwArgs__, INLINED_IS_TYPE_NODE_, isInstanceNode__, INLINED_GET_ATTR_, getTypeFlagsNode__, INLINED_IS_CLASS_PROFILE_, eqStrNode__, INLINED_TUPLE_CHECK_EXACT_NODE_, factory__, INLINED_TUPLE_SIZE_NODE_, getItemNode__, INLINED_UNICODE_CHECK_NODE_, raise__); } } @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 MatchClassNode create() { return new MatchClassNodeGen(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy