Generated by Cython 0.29.23
Yellow lines hint at Python interaction.
Click on a line that starts with a "+
" to see the C code that Cython generated for it.
Raw output: opcode_metric.c
+01: import types
__pyx_t_1 = __Pyx_Import(__pyx_n_s_types, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
02: from cpython.object cimport PyObject_HasAttr
03: from py_pal.data_collection.metric cimport CallMetric
04: from py_pal.data_collection.arguments cimport unpack_oparg
+05: from py_pal.data_collection.metric import AvgBuiltinFuncComplexity
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_AvgBuiltinFuncComplexity); __Pyx_GIVEREF(__pyx_n_s_AvgBuiltinFuncComplexity); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_AvgBuiltinFuncComplexity); __pyx_t_2 = __Pyx_Import(__pyx_n_s_py_pal_data_collection_metric, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_AvgBuiltinFuncComplexity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_AvgBuiltinFuncComplexity, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
06:
+07: cdef class OpcodeMetric:
struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_OpcodeMetric { Py_ssize_t (*get_value)(struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *, PyFrameObject *); Py_ssize_t (*get_function_opcodes)(struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *, PyObject *, PyObject *, PyObject *); int (*in_complexity_map)(struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *, PyObject *); }; static struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *__pyx_vtabptr_6py_pal_15data_collection_13opcode_metric_OpcodeMetric;
08: """Base opcode metric."""
09:
+10: def __init__(self):
/* Python wrapper */ static int __pyx_pw_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric___init__[] = "`builtin_calls` counts calls to Python builtin functions. `hits` indicates how many builtin calls were\n weighted by a function from :class:`py_pal.data_collection.AvgBuiltinFuncComplexity`.\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric___init__; #endif static int __pyx_pw_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric___init__(((struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric___init__(struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; }
11: """`builtin_calls` counts calls to Python builtin functions. `hits` indicates how many builtin calls were
12: weighted by a function from :class:`py_pal.data_collection.AvgBuiltinFuncComplexity`.
13: """
+14: self.hits = 0
__pyx_v_self->hits = 0;
+15: self.builtin_calls = 0
__pyx_v_self->builtin_calls = 0;
16:
+17: cdef Py_ssize_t get_value(self, FrameType frame) except -1:
static Py_ssize_t __pyx_f_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric_get_value(CYTHON_UNUSED struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *__pyx_v_self, CYTHON_UNUSED PyFrameObject *__pyx_v_frame) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value", 0); /* … */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+18: return 1
__pyx_r = 1; goto __pyx_L0;
19:
+20: cdef bint in_complexity_map(self, function) except -1:
static int __pyx_f_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric_in_complexity_map(CYTHON_UNUSED struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *__pyx_v_self, PyObject *__pyx_v_function) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("in_complexity_map", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("py_pal.data_collection.opcode_metric.OpcodeMetric.in_complexity_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+21: return PyObject_HasAttr(function, '__qualname__') and function.__qualname__ in AvgBuiltinFuncComplexity.mapping
__pyx_t_2 = (PyObject_HasAttr(__pyx_v_function, __pyx_n_s_qualname) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_function, __pyx_n_s_qualname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_AvgBuiltinFuncComplexity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_mapping); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_6; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0;
22:
+23: cdef Py_ssize_t get_function_opcodes(self, object function, object args, object kwargs) except -1:
static Py_ssize_t __pyx_f_6py_pal_15data_collection_13opcode_metric_12OpcodeMetric_get_function_opcodes(struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *__pyx_v_self, PyObject *__pyx_v_function, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { struct __pyx_obj_6py_pal_15data_collection_6metric_CallMetric *__pyx_v_instance = 0; PyObject *__pyx_v_complexity_class = NULL; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_function_opcodes", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("py_pal.data_collection.opcode_metric.OpcodeMetric.get_function_opcodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1L; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_instance); __Pyx_XDECREF(__pyx_v_complexity_class); __Pyx_RefNannyFinishContext(); return __pyx_r; }
24: cdef CallMetric instance
25:
+26: if isinstance(function, types.BuiltinFunctionType):
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BuiltinFunctionType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_function, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* … */ }
27: # Statistics
+28: self.builtin_calls += 1
__pyx_v_self->builtin_calls = (__pyx_v_self->builtin_calls + 1);
+29: if self.in_complexity_map(function):
__pyx_t_4 = ((struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *)__pyx_v_self->__pyx_vtab)->in_complexity_map(__pyx_v_self, __pyx_v_function); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 29, __pyx_L1_error)
__pyx_t_3 = (__pyx_t_4 != 0);
if (__pyx_t_3) {
/* … */
}
+30: self.hits += 1
__pyx_v_self->hits = (__pyx_v_self->hits + 1);
31:
+32: if self.in_complexity_map(function):
__pyx_t_3 = ((struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *)__pyx_v_self->__pyx_vtab)->in_complexity_map(__pyx_v_self, __pyx_v_function); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 32, __pyx_L1_error)
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
/* … */
}
+33: complexity_class = AvgBuiltinFuncComplexity.mapping[function.__qualname__]
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AvgBuiltinFuncComplexity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_function, __pyx_n_s_qualname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_complexity_class = __pyx_t_5; __pyx_t_5 = 0;
+34: instance = complexity_class(args, kwargs)
__Pyx_INCREF(__pyx_v_complexity_class); __pyx_t_2 = __pyx_v_complexity_class; __pyx_t_1 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_args, __pyx_v_kwargs}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_args, __pyx_v_kwargs}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_args); __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_kwargs); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6py_pal_15data_collection_6metric_CallMetric))))) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_v_instance = ((struct __pyx_obj_6py_pal_15data_collection_6metric_CallMetric *)__pyx_t_5); __pyx_t_5 = 0;
+35: return instance.value()
__pyx_t_8 = ((struct __pyx_vtabstruct_6py_pal_15data_collection_6metric_CallMetric *)__pyx_v_instance->__pyx_vtab)->value(__pyx_v_instance); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 35, __pyx_L1_error)
__pyx_r = __pyx_t_8;
goto __pyx_L0;
36:
+37: return 1
__pyx_r = 1; goto __pyx_L0;
38:
+39: cdef class AdvancedOpcodeMetric(OpcodeMetric):
struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_AdvancedOpcodeMetric { struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_OpcodeMetric __pyx_base; }; static struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_AdvancedOpcodeMetric *__pyx_vtabptr_6py_pal_15data_collection_13opcode_metric_AdvancedOpcodeMetric;
40: """Extended opcode metric that assigns a value dependent on the arguments to builtin calls instead of a constant
41: value.
42: """
+43: cdef Py_ssize_t get_value(self, FrameType frame) except -1:
static Py_ssize_t __pyx_f_6py_pal_15data_collection_13opcode_metric_20AdvancedOpcodeMetric_get_value(struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_AdvancedOpcodeMetric *__pyx_v_self, PyFrameObject *__pyx_v_frame) { PyObject *__pyx_v_code = NULL; PyObject *__pyx_v_op = NULL; PyObject *__pyx_v_argc = NULL; PyObject *__pyx_v_valuestack = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v__callable = NULL; PyObject *__pyx_v_kw_names = NULL; PyObject *__pyx_v_kwargs = NULL; PyObject *__pyx_v_name = NULL; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("py_pal.data_collection.opcode_metric.AdvancedOpcodeMetric.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1L; __pyx_L0:; __Pyx_XDECREF(__pyx_v_code); __Pyx_XDECREF(__pyx_v_op); __Pyx_XDECREF(__pyx_v_argc); __Pyx_XDECREF(__pyx_v_valuestack); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v__callable); __Pyx_XDECREF(__pyx_v_kw_names); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_name); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+44: if frame.f_lasti < 0:
__pyx_t_1 = ((__pyx_v_frame->f_lasti < 0) != 0); if (__pyx_t_1) { /* … */ }
+45: return 1
__pyx_r = 1; goto __pyx_L0;
46:
+47: code = frame.f_code.co_code
__pyx_t_2 = __pyx_v_frame->f_code->co_code;
__Pyx_INCREF(__pyx_t_2);
__pyx_v_code = __pyx_t_2;
__pyx_t_2 = 0;
+48: op = code[frame.f_lasti]
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_code, __pyx_v_frame->f_lasti, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_op = __pyx_t_2; __pyx_t_2 = 0;
49:
+50: if op == 131:
__pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_131, 0x83, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* … */ }
51: # CALL_FUNCTION
+52: argc = unpack_oparg(code[frame.f_lasti:])
__pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_code, __pyx_v_frame->f_lasti, 0, NULL, NULL, NULL, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_6py_pal_15data_collection_9arguments_unpack_oparg(__pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_argc = __pyx_t_3; __pyx_t_3 = 0;
+53: valuestack = <list> get_valuestack(<PyFrameObject *> frame, argc + 1)
__pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_argc, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = get_valuestack(((PyFrameObject *)__pyx_v_frame), __pyx_t_4); __pyx_t_3 = ((PyObject *)__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_v_valuestack = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0;
+54: args = valuestack[1:]
if (unlikely(__pyx_v_valuestack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 54, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_v_valuestack, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_args = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0;
+55: _callable = valuestack[0]
if (unlikely(__pyx_v_valuestack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 55, __pyx_L1_error) } __pyx_t_3 = PyList_GET_ITEM(__pyx_v_valuestack, 0); __Pyx_INCREF(__pyx_t_3); __pyx_v__callable = __pyx_t_3; __pyx_t_3 = 0;
56:
+57: return self.get_function_opcodes(_callable, args, {})
__pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = ((struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_AdvancedOpcodeMetric *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_function_opcodes(((struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *)__pyx_v_self), __pyx_v__callable, __pyx_v_args, __pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; goto __pyx_L0;
58:
+59: elif op == 141:
__pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_141, 0x8D, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* … */ }
60: # CALL_FUNCTION_KW
+61: argc = unpack_oparg(code[frame.f_lasti:])
__pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_code, __pyx_v_frame->f_lasti, 0, NULL, NULL, NULL, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6py_pal_15data_collection_9arguments_unpack_oparg(__pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_argc = __pyx_t_2; __pyx_t_2 = 0;
+62: valuestack = <list> get_valuestack(<PyFrameObject *> frame, argc + 2)
__pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_argc, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = get_valuestack(((PyFrameObject *)__pyx_v_frame), __pyx_t_4); __pyx_t_2 = ((PyObject *)__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_v_valuestack = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
63:
+64: _callable = valuestack.pop(0)
if (unlikely(__pyx_v_valuestack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); __PYX_ERR(0, 64, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_PopIndex(__pyx_v_valuestack, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v__callable = __pyx_t_2; __pyx_t_2 = 0;
+65: kw_names = valuestack.pop()
if (unlikely(__pyx_v_valuestack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); __PYX_ERR(0, 65, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_valuestack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_kw_names = __pyx_t_2; __pyx_t_2 = 0;
+66: kwargs = {}
__pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_kwargs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
+67: for name in kw_names:
if (likely(PyList_CheckExact(__pyx_v_kw_names)) || PyTuple_CheckExact(__pyx_v_kw_names)) { __pyx_t_2 = __pyx_v_kw_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_6 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_kw_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 67, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 67, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 67, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+68: kwargs[name] = valuestack.pop()
if (unlikely(__pyx_v_valuestack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); __PYX_ERR(0, 68, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyList_Pop(__pyx_v_valuestack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_3) < 0)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
69:
+70: return self.get_function_opcodes(_callable, valuestack, kwargs)
__pyx_t_4 = ((struct __pyx_vtabstruct_6py_pal_15data_collection_13opcode_metric_AdvancedOpcodeMetric *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_function_opcodes(((struct __pyx_obj_6py_pal_15data_collection_13opcode_metric_OpcodeMetric *)__pyx_v_self), __pyx_v__callable, __pyx_v_valuestack, __pyx_v_kwargs); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 70, __pyx_L1_error)
__pyx_r = __pyx_t_4;
goto __pyx_L0;
71:
+72: return 1
__pyx_r = 1; goto __pyx_L0;