1/*[clinic input] 2preserve 3[clinic start generated code]*/ 4 5PyDoc_STRVAR(_opcode_stack_effect__doc__, 6"stack_effect($module, opcode, oparg=None, /, *, jump=None)\n" 7"--\n" 8"\n" 9"Compute the stack effect of the opcode."); 10 11#define _OPCODE_STACK_EFFECT_METHODDEF \ 12 {"stack_effect", _PyCFunction_CAST(_opcode_stack_effect), METH_FASTCALL|METH_KEYWORDS, _opcode_stack_effect__doc__}, 13 14static int 15_opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg, 16 PyObject *jump); 17 18static PyObject * 19_opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 20{ 21 PyObject *return_value = NULL; 22 static const char * const _keywords[] = {"", "", "jump", NULL}; 23 static _PyArg_Parser _parser = {NULL, _keywords, "stack_effect", 0}; 24 PyObject *argsbuf[3]; 25 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; 26 int opcode; 27 PyObject *oparg = Py_None; 28 PyObject *jump = Py_None; 29 int _return_value; 30 31 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); 32 if (!args) { 33 goto exit; 34 } 35 opcode = _PyLong_AsInt(args[0]); 36 if (opcode == -1 && PyErr_Occurred()) { 37 goto exit; 38 } 39 if (nargs < 2) { 40 goto skip_optional_posonly; 41 } 42 noptargs--; 43 oparg = args[1]; 44skip_optional_posonly: 45 if (!noptargs) { 46 goto skip_optional_kwonly; 47 } 48 jump = args[2]; 49skip_optional_kwonly: 50 _return_value = _opcode_stack_effect_impl(module, opcode, oparg, jump); 51 if ((_return_value == -1) && PyErr_Occurred()) { 52 goto exit; 53 } 54 return_value = PyLong_FromLong((long)_return_value); 55 56exit: 57 return return_value; 58} 59 60PyDoc_STRVAR(_opcode_get_specialization_stats__doc__, 61"get_specialization_stats($module, /)\n" 62"--\n" 63"\n" 64"Return the specialization stats"); 65 66#define _OPCODE_GET_SPECIALIZATION_STATS_METHODDEF \ 67 {"get_specialization_stats", (PyCFunction)_opcode_get_specialization_stats, METH_NOARGS, _opcode_get_specialization_stats__doc__}, 68 69static PyObject * 70_opcode_get_specialization_stats_impl(PyObject *module); 71 72static PyObject * 73_opcode_get_specialization_stats(PyObject *module, PyObject *Py_UNUSED(ignored)) 74{ 75 return _opcode_get_specialization_stats_impl(module); 76} 77/*[clinic end generated code: output=b904260bf022f953 input=a9049054013a1b77]*/ 78