diff --git "a/medomni/models.build/module.models.cpp" "b/medomni/models.build/module.models.cpp" deleted file mode 100644--- "a/medomni/models.build/module.models.cpp" +++ /dev/null @@ -1,10884 +0,0 @@ -/* Generated code for Python module 'models' - * created by Nuitka version 0.6.16 - * - * This code is in part copyright 2021 Kay Hayen. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nuitka/prelude.h" - -#include "nuitka/unfreezing.h" - -#include "__helpers.h" - -/* The "module_models" is a Python object pointer of module type. - * - * Note: For full compatibility with CPython, every module variable access - * needs to go through it except for cases where the module cannot possibly - * have changed in the mean time. - */ - -PyObject *module_models; -PyDictObject *moduledict_models; - -/* The declarations of module constants used, if any. */ -static PyObject *mod_consts[147]; - -static PyObject *module_filename_obj = NULL; - -/* Indicator if this modules private constants were created yet. */ -static bool constants_created = false; - -/* Function to create module private constants. */ -static void createModuleConstants(void) { - if (constants_created == false) { - loadConstantsBlob(&mod_consts[0], UNTRANSLATE("models")); - constants_created = true; - } -} - -/* For multiprocessing, we want to be able to initialize the __main__ constants. */ -#if (_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED || _NUITKA_PLUGIN_TRACEBACK_ENCRYPTION_ENABLED) && 0 -void createMainModuleConstants(void) { - createModuleConstants(); -} -#endif - -/* Function to verify module private constants for non-corruption. */ -#ifndef __NUITKA_NO_ASSERT__ -void checkModuleConstants_models(void) { - // The module may not have been used at all, then ignore this. - if (constants_created == false) return; - - checkConstantsBlob(&mod_consts[0], "models"); -} -#endif - -// The module code objects. -static PyCodeObject *codeobj_4777da0a37fa73ff6635d4eaff77d3fc; -static PyCodeObject *codeobj_b1db33e43955f87a8a2ee720ed8431ae; -static PyCodeObject *codeobj_363d192a44937f32417f15029b021df5; -static PyCodeObject *codeobj_72d33f092ce284e25ff5e5267423439e; -static PyCodeObject *codeobj_da5fc521af8681666a04d7c4becfd4f6; -static PyCodeObject *codeobj_0f2082830916959456ffaf17ca3f97c9; -static PyCodeObject *codeobj_c3c82eb0bf120804275f4f91d2bd99c7; -static PyCodeObject *codeobj_345f9b676b7c503fdf12b10e713239a4; -static PyCodeObject *codeobj_a1ff221c4fb1e4ec4f516f82b218dca5; -static PyCodeObject *codeobj_26067f56e445e8be2364d8b047b0369a; -static PyCodeObject *codeobj_fe2cd4692aef62e7724c5cfc72c4c128; -static PyCodeObject *codeobj_8e01d5b362d6df18e9f336fc94ed971c; -static PyCodeObject *codeobj_28d96cf50f456a1141613d0f55135c5a; - -static void createModuleCodeObjects(void) { - module_filename_obj = MAKE_RELATIVE_PATH(mod_consts[134]); CHECK_OBJECT(module_filename_obj); - codeobj_4777da0a37fa73ff6635d4eaff77d3fc = MAKE_CODEOBJECT(module_filename_obj, 173, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[135], mod_consts[136], NULL, 1, 0, 0); - codeobj_b1db33e43955f87a8a2ee720ed8431ae = MAKE_CODEOBJECT(module_filename_obj, 186, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[137], mod_consts[138], NULL, 1, 0, 0); - codeobj_363d192a44937f32417f15029b021df5 = MAKE_CODEOBJECT(module_filename_obj, 197, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[137], mod_consts[139], NULL, 1, 0, 0); - codeobj_72d33f092ce284e25ff5e5267423439e = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[140], NULL, NULL, 0, 0, 0); - codeobj_da5fc521af8681666a04d7c4becfd4f6 = MAKE_CODEOBJECT(module_filename_obj, 161, CO_NOFREE, mod_consts[122], mod_consts[141], NULL, 0, 0, 0); - codeobj_0f2082830916959456ffaf17ca3f97c9 = MAKE_CODEOBJECT(module_filename_obj, 172, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[125], mod_consts[142], NULL, 1, 0, 0); - codeobj_c3c82eb0bf120804275f4f91d2bd99c7 = MAKE_CODEOBJECT(module_filename_obj, 193, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[142], NULL, 1, 0, 0); - codeobj_345f9b676b7c503fdf12b10e713239a4 = MAKE_CODEOBJECT(module_filename_obj, 196, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[132], mod_consts[142], NULL, 1, 0, 0); - codeobj_a1ff221c4fb1e4ec4f516f82b218dca5 = MAKE_CODEOBJECT(module_filename_obj, 178, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[129], mod_consts[142], NULL, 1, 0, 0); - codeobj_26067f56e445e8be2364d8b047b0369a = MAKE_CODEOBJECT(module_filename_obj, 77, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[29], mod_consts[143], NULL, 1, 0, 0); - codeobj_fe2cd4692aef62e7724c5cfc72c4c128 = MAKE_CODEOBJECT(module_filename_obj, 27, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[111], mod_consts[144], NULL, 5, 0, 0); - codeobj_8e01d5b362d6df18e9f336fc94ed971c = MAKE_CODEOBJECT(module_filename_obj, 113, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[113], mod_consts[145], NULL, 4, 0, 0); - codeobj_28d96cf50f456a1141613d0f55135c5a = MAKE_CODEOBJECT(module_filename_obj, 61, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[53], mod_consts[146], NULL, 1, 0, 0); -} - -// The module function declarations. -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__1__mro_entries_conversion(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__8_complex_call_helper_star_dict(PyObject **python_pars); - - -NUITKA_LOCAL_MODULE PyObject *impl_models$$$function__3_get_callable_name_desc(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__5_complex_call_helper_keywords_star_dict(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__9_complex_call_helper_pos_star_dict(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__7_complex_call_helper_pos_keywords_star_dict(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__2_complex_call_helper_star_list(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__4__unpack_list(PyObject **python_pars); - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__6__unpack_dict(PyObject **python_pars); - - -static PyObject *MAKE_FUNCTION_models$$$function__1_load_model(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$$$function__2_load_preprocess(); - - -static PyObject *MAKE_FUNCTION_models$$$function__2_load_preprocess$$$function__1__build_proc_from_cfg(); - - -static PyObject *MAKE_FUNCTION_models$$$function__3_load_model_and_preprocess(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$$$function__4___init__(PyObject *annotations); - - -static PyObject *MAKE_FUNCTION_models$$$function__5___str__(PyObject *annotations); - - -static PyObject *MAKE_FUNCTION_models$$$function__6___iter__(); - - -static PyObject *MAKE_FUNCTION_models$$$function__7___len__(); - - -// The module function definitions. -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__1__mro_entries_conversion(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_bases = python_pars[0]; - PyObject *tmp_base = NULL; - PyObject *tmp_iter = NULL; - PyObject *tmp_list = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - bool tmp_result; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(par_bases); - tmp_iter_arg_1 = par_bases; - tmp_assign_source_1 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_iter == NULL); - tmp_iter = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyList_New(0); - assert(tmp_list == NULL); - tmp_list = tmp_assign_source_2; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_3; - CHECK_OBJECT(tmp_iter); - tmp_next_source_1 = tmp_iter; - tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_3 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_base; - tmp_base = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_issubclass_cls_1; - CHECK_OBJECT(tmp_base); - tmp_issubclass_cls_1 = tmp_base; - tmp_res = PyType_Check(tmp_issubclass_cls_1); - tmp_condition_result_1 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_append_list_1; - PyObject *tmp_append_value_1; - CHECK_OBJECT(tmp_list); - tmp_append_list_1 = tmp_list; - CHECK_OBJECT(tmp_base); - tmp_append_value_1 = tmp_base; - assert(PyList_Check(tmp_append_list_1)); - tmp_result = LIST_APPEND0(tmp_append_list_1, tmp_append_value_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - goto branch_end_1; - branch_no_1:; - { - nuitka_bool tmp_condition_result_2; - PyObject *tmp_expression_name_1; - CHECK_OBJECT(tmp_base); - tmp_expression_name_1 = tmp_base; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_1, mod_consts[0]); - tmp_condition_result_2 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_list_arg_name_1; - PyObject *tmp_value_name_1; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_args_element_name_1; - NUITKA_MAY_BE_UNUSED PyObject *tmp_list_extend_result_1; - CHECK_OBJECT(tmp_list); - tmp_list_arg_name_1 = tmp_list; - CHECK_OBJECT(tmp_base); - tmp_expression_name_2 = tmp_base; - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[0]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - if (par_bases == NULL) { - Py_DECREF(tmp_called_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[1]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_args_element_name_1 = par_bases; - tmp_value_name_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - Py_DECREF(tmp_called_name_1); - if (tmp_value_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(PyList_Check(tmp_list_arg_name_1)); - tmp_result = LIST_EXTEND(tmp_list_arg_name_1, tmp_value_name_1); - Py_DECREF(tmp_value_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_list_extend_result_1 = Py_None; - } - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_append_list_2; - PyObject *tmp_append_value_2; - CHECK_OBJECT(tmp_list); - tmp_append_list_2 = tmp_list; - CHECK_OBJECT(tmp_base); - tmp_append_value_2 = tmp_base; - assert(PyList_Check(tmp_append_list_2)); - tmp_result = LIST_APPEND0(tmp_append_list_2, tmp_append_value_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - branch_end_2:; - branch_end_1:; - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - { - PyObject *tmp_tuple_arg_1; - CHECK_OBJECT(tmp_list); - tmp_tuple_arg_1 = tmp_list; - tmp_return_value = PySequence_Tuple(tmp_tuple_arg_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto try_return_handler_1; - } - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(tmp_list); - Py_DECREF(tmp_list); - tmp_list = NULL; - Py_XDECREF(tmp_iter); - tmp_iter = NULL; - Py_XDECREF(tmp_base); - tmp_base = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_list); - tmp_list = NULL; - Py_XDECREF(tmp_iter); - tmp_iter = NULL; - Py_XDECREF(tmp_base); - tmp_base = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_bases); - Py_DECREF(par_bases); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_bases); - Py_DECREF(par_bases); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__8_complex_call_helper_star_dict(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_called = python_pars[0]; - PyObject *par_star_arg_dict = python_pars[1]; - PyObject *tmp_mapping_1__dict = NULL; - PyObject *tmp_mapping_1__iter = NULL; - PyObject *tmp_mapping_1__key = NULL; - PyObject *tmp_mapping_1__keys = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - int tmp_res; - bool tmp_result; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *tmp_return_value = NULL; - - // Actual function body. - // Tried code: - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_type_arg_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_type_arg_1 = par_star_arg_dict; - tmp_compexpr_left_1 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_compexpr_left_1 == NULL)); - tmp_compexpr_right_1 = (PyObject *)&PyDict_Type; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - Py_DECREF(tmp_compexpr_left_1); - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_called_instance_1 = par_star_arg_dict; - tmp_assign_source_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[2]); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_2; - } - assert(tmp_mapping_1__keys == NULL); - tmp_mapping_1__keys = tmp_assign_source_1; - } - goto try_end_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - tmp_compexpr_left_2 = exception_keeper_type_1; - tmp_compexpr_right_2 = PyExc_AttributeError; - tmp_res = EXCEPTION_MATCH_BOOL(tmp_compexpr_left_2, tmp_compexpr_right_2); - assert(!(tmp_res == -1)); - tmp_condition_result_2 = (tmp_res != 0) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_dircall_arg1_1; - tmp_left_name_1 = mod_consts[3]; - CHECK_OBJECT(par_called); - tmp_dircall_arg1_1 = par_called; - Py_INCREF(tmp_dircall_arg1_1); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_1}; - tmp_tuple_element_1 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_1 == NULL)); - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_2; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - if (par_star_arg_dict == NULL) { - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - ADD_EXCEPTION_CONTEXT(&exception_keeper_type_1, &exception_keeper_value_1); - - - - goto tuple_build_exception_1; - } - - tmp_type_arg_2 = par_star_arg_dict; - tmp_expression_name_1 = BUILTIN_TYPE1(tmp_type_arg_2); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[5]); - Py_DECREF(tmp_expression_name_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - goto try_except_handler_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_make_exception_arg_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto try_except_handler_1; - } - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - goto branch_end_2; - branch_no_2:; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_1; - branch_end_2:; - // End of try: - try_end_1:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(tmp_mapping_1__keys); - tmp_iter_arg_1 = tmp_mapping_1__keys; - tmp_assign_source_2 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_mapping_1__iter == NULL); - tmp_mapping_1__iter = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = PyDict_New(); - assert(tmp_mapping_1__dict == NULL); - tmp_mapping_1__dict = tmp_assign_source_3; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_4; - CHECK_OBJECT(tmp_mapping_1__iter); - tmp_next_source_1 = tmp_mapping_1__iter; - tmp_assign_source_4 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_4 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_mapping_1__key; - tmp_mapping_1__key = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - CHECK_OBJECT(tmp_mapping_1__key); - tmp_compexpr_left_3 = tmp_mapping_1__key; - if (tmp_mapping_1__dict == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[6]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_compexpr_right_3 = tmp_mapping_1__dict; - tmp_res = PySequence_Contains(tmp_compexpr_right_3, tmp_compexpr_left_3); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_3 = (tmp_res == 1) ? true : false; - if (tmp_condition_result_3 != false) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_raise_type_2; - PyObject *tmp_make_exception_arg_2; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_dircall_arg1_2; - tmp_left_name_2 = mod_consts[7]; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_dircall_arg1_2 = par_called; - Py_INCREF(tmp_dircall_arg1_2); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_2}; - tmp_tuple_element_2 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_2 == NULL)); - tmp_right_name_2 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_right_name_2, 0, tmp_tuple_element_2); - CHECK_OBJECT(tmp_mapping_1__key); - tmp_tuple_element_2 = tmp_mapping_1__key; - PyTuple_SET_ITEM0(tmp_right_name_2, 1, tmp_tuple_element_2); - tmp_make_exception_arg_2 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_2, tmp_right_name_2); - Py_DECREF(tmp_right_name_2); - if (tmp_make_exception_arg_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_raise_type_2 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_2); - Py_DECREF(tmp_make_exception_arg_2); - assert(!(tmp_raise_type_2 == NULL)); - exception_type = tmp_raise_type_2; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_3:; - { - PyObject *tmp_ass_subvalue_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - PyObject *tmp_ass_subscribed_1; - PyObject *tmp_ass_subscript_1; - if (par_star_arg_dict == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_expression_name_2 = par_star_arg_dict; - CHECK_OBJECT(tmp_mapping_1__key); - tmp_subscript_name_1 = tmp_mapping_1__key; - tmp_ass_subvalue_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_2, tmp_subscript_name_1); - if (tmp_ass_subvalue_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - CHECK_OBJECT(tmp_mapping_1__dict); - tmp_ass_subscribed_1 = tmp_mapping_1__dict; - CHECK_OBJECT(tmp_mapping_1__key); - tmp_ass_subscript_1 = tmp_mapping_1__key; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1); - Py_DECREF(tmp_ass_subvalue_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - { - PyObject *tmp_assign_source_5; - CHECK_OBJECT(tmp_mapping_1__dict); - tmp_assign_source_5 = tmp_mapping_1__dict; - { - PyObject *old = par_star_arg_dict; - par_star_arg_dict = tmp_assign_source_5; - Py_INCREF(par_star_arg_dict); - Py_XDECREF(old); - } - - } - branch_no_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_mapping_1__dict); - tmp_mapping_1__dict = NULL; - Py_XDECREF(tmp_mapping_1__iter); - tmp_mapping_1__iter = NULL; - Py_XDECREF(tmp_mapping_1__keys); - tmp_mapping_1__keys = NULL; - Py_XDECREF(tmp_mapping_1__key); - tmp_mapping_1__key = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto function_exception_exit; - // End of try: - try_end_2:; - Py_XDECREF(tmp_mapping_1__dict); - tmp_mapping_1__dict = NULL; - Py_XDECREF(tmp_mapping_1__iter); - tmp_mapping_1__iter = NULL; - Py_XDECREF(tmp_mapping_1__keys); - tmp_mapping_1__keys = NULL; - Py_XDECREF(tmp_mapping_1__key); - tmp_mapping_1__key = NULL; - { - PyObject *tmp_called_name_1; - PyObject *tmp_kwargs_name_1; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_called_name_1 = par_called; - CHECK_OBJECT(par_star_arg_dict); - tmp_kwargs_name_1 = par_star_arg_dict; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - goto function_return_exit; - } - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_LOCAL_MODULE PyObject *impl_models$$$function__3_get_callable_name_desc(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_called = python_pars[0]; - PyObject *tmp_return_value = NULL; - - // Actual function body. - { - PyObject *tmp_func_arg_1; - CHECK_OBJECT(par_called); - tmp_func_arg_1 = par_called; - tmp_return_value = _PyObject_FunctionStr(tmp_func_arg_1); - assert(!(tmp_return_value == NULL)); - goto function_return_exit; - } - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__5_complex_call_helper_keywords_star_dict(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_called = python_pars[0]; - PyObject *par_kw = python_pars[1]; - PyObject *par_star_arg_dict = python_pars[2]; - PyObject *tmp_dict_1__dict = NULL; - PyObject *tmp_dict_1__iter = NULL; - PyObject *tmp_dict_1__key_xxx = NULL; - PyObject *tmp_dict_1__keys = NULL; - PyObject *tmp_dict_2__item = NULL; - PyObject *tmp_dict_2__iter = NULL; - PyObject *tmp_dict_2__key = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - int tmp_res; - bool tmp_result; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *tmp_return_value = NULL; - - // Actual function body. - // Tried code: - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_type_arg_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_type_arg_1 = par_star_arg_dict; - tmp_compexpr_left_1 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_compexpr_left_1 == NULL)); - tmp_compexpr_right_1 = (PyObject *)&PyDict_Type; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - Py_DECREF(tmp_compexpr_left_1); - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_called_instance_1 = par_star_arg_dict; - tmp_assign_source_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[2]); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_2; - } - assert(tmp_dict_1__keys == NULL); - tmp_dict_1__keys = tmp_assign_source_1; - } - goto try_end_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - tmp_compexpr_left_2 = exception_keeper_type_1; - tmp_compexpr_right_2 = PyExc_AttributeError; - tmp_res = EXCEPTION_MATCH_BOOL(tmp_compexpr_left_2, tmp_compexpr_right_2); - assert(!(tmp_res == -1)); - tmp_condition_result_2 = (tmp_res != 0) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_dircall_arg1_1; - tmp_left_name_1 = mod_consts[3]; - CHECK_OBJECT(par_called); - tmp_dircall_arg1_1 = par_called; - Py_INCREF(tmp_dircall_arg1_1); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_1}; - tmp_tuple_element_1 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_1 == NULL)); - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_2; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - if (par_star_arg_dict == NULL) { - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - ADD_EXCEPTION_CONTEXT(&exception_keeper_type_1, &exception_keeper_value_1); - - - - goto tuple_build_exception_1; - } - - tmp_type_arg_2 = par_star_arg_dict; - tmp_expression_name_1 = BUILTIN_TYPE1(tmp_type_arg_2); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[5]); - Py_DECREF(tmp_expression_name_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - goto try_except_handler_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_make_exception_arg_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto try_except_handler_1; - } - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - goto branch_end_2; - branch_no_2:; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_1; - branch_end_2:; - // End of try: - try_end_1:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(tmp_dict_1__keys); - tmp_iter_arg_1 = tmp_dict_1__keys; - tmp_assign_source_2 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_dict_1__iter == NULL); - tmp_dict_1__iter = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = PyDict_New(); - assert(tmp_dict_1__dict == NULL); - tmp_dict_1__dict = tmp_assign_source_3; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_4; - CHECK_OBJECT(tmp_dict_1__iter); - tmp_next_source_1 = tmp_dict_1__iter; - tmp_assign_source_4 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_4 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_dict_1__key_xxx; - tmp_dict_1__key_xxx = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_compexpr_left_3 = tmp_dict_1__key_xxx; - if (par_kw == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_compexpr_right_3 = par_kw; - tmp_res = PySequence_Contains(tmp_compexpr_right_3, tmp_compexpr_left_3); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_3 = (tmp_res == 1) ? true : false; - if (tmp_condition_result_3 != false) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_raise_type_2; - PyObject *tmp_make_exception_arg_2; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_dircall_arg1_2; - tmp_left_name_2 = mod_consts[7]; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_dircall_arg1_2 = par_called; - Py_INCREF(tmp_dircall_arg1_2); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_2}; - tmp_tuple_element_2 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_2 == NULL)); - tmp_right_name_2 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_right_name_2, 0, tmp_tuple_element_2); - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_tuple_element_2 = tmp_dict_1__key_xxx; - PyTuple_SET_ITEM0(tmp_right_name_2, 1, tmp_tuple_element_2); - tmp_make_exception_arg_2 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_2, tmp_right_name_2); - Py_DECREF(tmp_right_name_2); - if (tmp_make_exception_arg_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_raise_type_2 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_2); - Py_DECREF(tmp_make_exception_arg_2); - assert(!(tmp_raise_type_2 == NULL)); - exception_type = tmp_raise_type_2; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_3:; - { - PyObject *tmp_ass_subvalue_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - PyObject *tmp_ass_subscribed_1; - PyObject *tmp_ass_subscript_1; - if (par_star_arg_dict == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_expression_name_2 = par_star_arg_dict; - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_subscript_name_1 = tmp_dict_1__key_xxx; - tmp_ass_subvalue_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_2, tmp_subscript_name_1); - if (tmp_ass_subvalue_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - if (par_kw == NULL) { - Py_DECREF(tmp_ass_subvalue_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_ass_subscribed_1 = par_kw; - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_ass_subscript_1 = tmp_dict_1__key_xxx; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1); - Py_DECREF(tmp_ass_subvalue_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - goto branch_end_1; - branch_no_1:; - { - nuitka_bool tmp_condition_result_4; - int tmp_truth_name_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_truth_name_1 = CHECK_IF_TRUE(par_star_arg_dict); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_4 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_4 == NUITKA_BOOL_TRUE) { - goto branch_yes_4; - } else { - goto branch_no_4; - } - } - branch_yes_4:; - { - PyObject *tmp_assign_source_5; - PyObject *tmp_dict_seq_1; - CHECK_OBJECT(par_kw); - tmp_dict_seq_1 = par_kw; - tmp_assign_source_5 = TO_DICT(tmp_dict_seq_1, NULL); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - { - PyObject *old = par_kw; - assert(old != NULL); - par_kw = tmp_assign_source_5; - Py_DECREF(old); - } - - } - { - PyObject *tmp_assign_source_6; - PyObject *tmp_iter_arg_2; - PyObject *tmp_called_instance_2; - CHECK_OBJECT(par_star_arg_dict); - tmp_called_instance_2 = par_star_arg_dict; - tmp_iter_arg_2 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[10]); - if (tmp_iter_arg_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_assign_source_6 = MAKE_ITERATOR(tmp_iter_arg_2); - Py_DECREF(tmp_iter_arg_2); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_dict_2__iter == NULL); - tmp_dict_2__iter = tmp_assign_source_6; - } - loop_start_2:; - { - PyObject *tmp_next_source_2; - PyObject *tmp_assign_source_7; - CHECK_OBJECT(tmp_dict_2__iter); - tmp_next_source_2 = tmp_dict_2__iter; - tmp_assign_source_7 = ITERATOR_NEXT(tmp_next_source_2); - if (tmp_assign_source_7 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_2; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_dict_2__item; - tmp_dict_2__item = tmp_assign_source_7; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_8; - PyObject *tmp_expression_name_3; - PyObject *tmp_subscript_name_2; - CHECK_OBJECT(tmp_dict_2__item); - tmp_expression_name_3 = tmp_dict_2__item; - tmp_subscript_name_2 = mod_consts[11]; - tmp_assign_source_8 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_3, tmp_subscript_name_2, 0); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - { - PyObject *old = tmp_dict_2__key; - tmp_dict_2__key = tmp_assign_source_8; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_5; - PyObject *tmp_compexpr_left_4; - PyObject *tmp_compexpr_right_4; - CHECK_OBJECT(tmp_dict_2__key); - tmp_compexpr_left_4 = tmp_dict_2__key; - if (par_kw == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_compexpr_right_4 = par_kw; - tmp_res = PySequence_Contains(tmp_compexpr_right_4, tmp_compexpr_left_4); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_5 = (tmp_res == 1) ? true : false; - if (tmp_condition_result_5 != false) { - goto branch_yes_5; - } else { - goto branch_no_5; - } - } - branch_yes_5:; - { - PyObject *tmp_raise_type_3; - PyObject *tmp_make_exception_arg_3; - PyObject *tmp_left_name_3; - PyObject *tmp_right_name_3; - PyObject *tmp_tuple_element_3; - PyObject *tmp_dircall_arg1_3; - tmp_left_name_3 = mod_consts[7]; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_dircall_arg1_3 = par_called; - Py_INCREF(tmp_dircall_arg1_3); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_3}; - tmp_tuple_element_3 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_3 == NULL)); - tmp_right_name_3 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_right_name_3, 0, tmp_tuple_element_3); - CHECK_OBJECT(tmp_dict_2__key); - tmp_tuple_element_3 = tmp_dict_2__key; - PyTuple_SET_ITEM0(tmp_right_name_3, 1, tmp_tuple_element_3); - tmp_make_exception_arg_3 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_3, tmp_right_name_3); - Py_DECREF(tmp_right_name_3); - if (tmp_make_exception_arg_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_raise_type_3 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_3); - Py_DECREF(tmp_make_exception_arg_3); - assert(!(tmp_raise_type_3 == NULL)); - exception_type = tmp_raise_type_3; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_5:; - { - PyObject *tmp_ass_subvalue_2; - PyObject *tmp_expression_name_4; - PyObject *tmp_subscript_name_3; - PyObject *tmp_ass_subscribed_2; - PyObject *tmp_ass_subscript_2; - CHECK_OBJECT(tmp_dict_2__item); - tmp_expression_name_4 = tmp_dict_2__item; - tmp_subscript_name_3 = mod_consts[12]; - tmp_ass_subvalue_2 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_4, tmp_subscript_name_3, 1); - if (tmp_ass_subvalue_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - if (par_kw == NULL) { - Py_DECREF(tmp_ass_subvalue_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_ass_subscribed_2 = par_kw; - CHECK_OBJECT(tmp_dict_2__key); - tmp_ass_subscript_2 = tmp_dict_2__key; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2); - Py_DECREF(tmp_ass_subvalue_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_2; - loop_end_2:; - branch_no_4:; - branch_end_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_dict_1__dict); - tmp_dict_1__dict = NULL; - Py_XDECREF(tmp_dict_1__iter); - tmp_dict_1__iter = NULL; - Py_XDECREF(tmp_dict_1__keys); - tmp_dict_1__keys = NULL; - Py_XDECREF(tmp_dict_1__key_xxx); - tmp_dict_1__key_xxx = NULL; - Py_XDECREF(tmp_dict_2__iter); - tmp_dict_2__iter = NULL; - Py_XDECREF(tmp_dict_2__item); - tmp_dict_2__item = NULL; - Py_XDECREF(tmp_dict_2__key); - tmp_dict_2__key = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto function_exception_exit; - // End of try: - try_end_2:; - Py_XDECREF(tmp_dict_1__dict); - tmp_dict_1__dict = NULL; - Py_XDECREF(tmp_dict_1__iter); - tmp_dict_1__iter = NULL; - Py_XDECREF(tmp_dict_1__keys); - tmp_dict_1__keys = NULL; - Py_XDECREF(tmp_dict_1__key_xxx); - tmp_dict_1__key_xxx = NULL; - Py_XDECREF(tmp_dict_2__iter); - tmp_dict_2__iter = NULL; - Py_XDECREF(tmp_dict_2__item); - tmp_dict_2__item = NULL; - Py_XDECREF(tmp_dict_2__key); - tmp_dict_2__key = NULL; - { - PyObject *tmp_called_name_1; - PyObject *tmp_kwargs_name_1; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_called_name_1 = par_called; - if (par_kw == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_kwargs_name_1 = par_kw; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - goto function_return_exit; - } - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_kw); - Py_DECREF(par_kw); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_kw); - Py_DECREF(par_kw); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__9_complex_call_helper_pos_star_dict(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_called = python_pars[0]; - PyObject *par_args = python_pars[1]; - PyObject *par_star_arg_dict = python_pars[2]; - PyObject *tmp_mapping_1__dict = NULL; - PyObject *tmp_mapping_1__iter = NULL; - PyObject *tmp_mapping_1__key = NULL; - PyObject *tmp_mapping_1__keys = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - int tmp_res; - bool tmp_result; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *tmp_return_value = NULL; - - // Actual function body. - // Tried code: - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_type_arg_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_type_arg_1 = par_star_arg_dict; - tmp_compexpr_left_1 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_compexpr_left_1 == NULL)); - tmp_compexpr_right_1 = (PyObject *)&PyDict_Type; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - Py_DECREF(tmp_compexpr_left_1); - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_called_instance_1 = par_star_arg_dict; - tmp_assign_source_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[2]); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_2; - } - assert(tmp_mapping_1__keys == NULL); - tmp_mapping_1__keys = tmp_assign_source_1; - } - goto try_end_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - tmp_compexpr_left_2 = exception_keeper_type_1; - tmp_compexpr_right_2 = PyExc_AttributeError; - tmp_res = EXCEPTION_MATCH_BOOL(tmp_compexpr_left_2, tmp_compexpr_right_2); - assert(!(tmp_res == -1)); - tmp_condition_result_2 = (tmp_res != 0) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_dircall_arg1_1; - tmp_left_name_1 = mod_consts[3]; - CHECK_OBJECT(par_called); - tmp_dircall_arg1_1 = par_called; - Py_INCREF(tmp_dircall_arg1_1); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_1}; - tmp_tuple_element_1 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_1 == NULL)); - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_2; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - if (par_star_arg_dict == NULL) { - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - ADD_EXCEPTION_CONTEXT(&exception_keeper_type_1, &exception_keeper_value_1); - - - - goto tuple_build_exception_1; - } - - tmp_type_arg_2 = par_star_arg_dict; - tmp_expression_name_1 = BUILTIN_TYPE1(tmp_type_arg_2); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[5]); - Py_DECREF(tmp_expression_name_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - goto try_except_handler_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_make_exception_arg_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto try_except_handler_1; - } - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - goto branch_end_2; - branch_no_2:; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_1; - branch_end_2:; - // End of try: - try_end_1:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(tmp_mapping_1__keys); - tmp_iter_arg_1 = tmp_mapping_1__keys; - tmp_assign_source_2 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_mapping_1__iter == NULL); - tmp_mapping_1__iter = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = PyDict_New(); - assert(tmp_mapping_1__dict == NULL); - tmp_mapping_1__dict = tmp_assign_source_3; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_4; - CHECK_OBJECT(tmp_mapping_1__iter); - tmp_next_source_1 = tmp_mapping_1__iter; - tmp_assign_source_4 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_4 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_mapping_1__key; - tmp_mapping_1__key = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - CHECK_OBJECT(tmp_mapping_1__key); - tmp_compexpr_left_3 = tmp_mapping_1__key; - if (tmp_mapping_1__dict == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[6]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_compexpr_right_3 = tmp_mapping_1__dict; - tmp_res = PySequence_Contains(tmp_compexpr_right_3, tmp_compexpr_left_3); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_3 = (tmp_res == 1) ? true : false; - if (tmp_condition_result_3 != false) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_raise_type_2; - PyObject *tmp_make_exception_arg_2; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_dircall_arg1_2; - tmp_left_name_2 = mod_consts[7]; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_dircall_arg1_2 = par_called; - Py_INCREF(tmp_dircall_arg1_2); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_2}; - tmp_tuple_element_2 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_2 == NULL)); - tmp_right_name_2 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_right_name_2, 0, tmp_tuple_element_2); - CHECK_OBJECT(tmp_mapping_1__key); - tmp_tuple_element_2 = tmp_mapping_1__key; - PyTuple_SET_ITEM0(tmp_right_name_2, 1, tmp_tuple_element_2); - tmp_make_exception_arg_2 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_2, tmp_right_name_2); - Py_DECREF(tmp_right_name_2); - if (tmp_make_exception_arg_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_raise_type_2 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_2); - Py_DECREF(tmp_make_exception_arg_2); - assert(!(tmp_raise_type_2 == NULL)); - exception_type = tmp_raise_type_2; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_3:; - { - PyObject *tmp_ass_subvalue_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - PyObject *tmp_ass_subscribed_1; - PyObject *tmp_ass_subscript_1; - if (par_star_arg_dict == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_expression_name_2 = par_star_arg_dict; - CHECK_OBJECT(tmp_mapping_1__key); - tmp_subscript_name_1 = tmp_mapping_1__key; - tmp_ass_subvalue_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_2, tmp_subscript_name_1); - if (tmp_ass_subvalue_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - CHECK_OBJECT(tmp_mapping_1__dict); - tmp_ass_subscribed_1 = tmp_mapping_1__dict; - CHECK_OBJECT(tmp_mapping_1__key); - tmp_ass_subscript_1 = tmp_mapping_1__key; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1); - Py_DECREF(tmp_ass_subvalue_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - { - PyObject *tmp_assign_source_5; - CHECK_OBJECT(tmp_mapping_1__dict); - tmp_assign_source_5 = tmp_mapping_1__dict; - { - PyObject *old = par_star_arg_dict; - par_star_arg_dict = tmp_assign_source_5; - Py_INCREF(par_star_arg_dict); - Py_XDECREF(old); - } - - } - branch_no_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_mapping_1__dict); - tmp_mapping_1__dict = NULL; - Py_XDECREF(tmp_mapping_1__iter); - tmp_mapping_1__iter = NULL; - Py_XDECREF(tmp_mapping_1__keys); - tmp_mapping_1__keys = NULL; - Py_XDECREF(tmp_mapping_1__key); - tmp_mapping_1__key = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto function_exception_exit; - // End of try: - try_end_2:; - Py_XDECREF(tmp_mapping_1__dict); - tmp_mapping_1__dict = NULL; - Py_XDECREF(tmp_mapping_1__iter); - tmp_mapping_1__iter = NULL; - Py_XDECREF(tmp_mapping_1__keys); - tmp_mapping_1__keys = NULL; - Py_XDECREF(tmp_mapping_1__key); - tmp_mapping_1__key = NULL; - { - PyObject *tmp_called_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_kwargs_name_1; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_called_name_1 = par_called; - CHECK_OBJECT(par_args); - tmp_args_name_1 = par_args; - CHECK_OBJECT(par_star_arg_dict); - tmp_kwargs_name_1 = par_star_arg_dict; - tmp_return_value = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - goto function_return_exit; - } - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_args); - Py_DECREF(par_args); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_args); - Py_DECREF(par_args); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__7_complex_call_helper_pos_keywords_star_dict(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_called = python_pars[0]; - PyObject *par_args = python_pars[1]; - PyObject *par_kw = python_pars[2]; - PyObject *par_star_arg_dict = python_pars[3]; - PyObject *tmp_dict_1__dict = NULL; - PyObject *tmp_dict_1__iter = NULL; - PyObject *tmp_dict_1__key_xxx = NULL; - PyObject *tmp_dict_1__keys = NULL; - PyObject *tmp_dict_2__item = NULL; - PyObject *tmp_dict_2__iter = NULL; - PyObject *tmp_dict_2__key = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - int tmp_res; - bool tmp_result; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *tmp_return_value = NULL; - - // Actual function body. - // Tried code: - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_type_arg_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_type_arg_1 = par_star_arg_dict; - tmp_compexpr_left_1 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_compexpr_left_1 == NULL)); - tmp_compexpr_right_1 = (PyObject *)&PyDict_Type; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - Py_DECREF(tmp_compexpr_left_1); - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_called_instance_1 = par_star_arg_dict; - tmp_assign_source_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[2]); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_2; - } - assert(tmp_dict_1__keys == NULL); - tmp_dict_1__keys = tmp_assign_source_1; - } - goto try_end_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - tmp_compexpr_left_2 = exception_keeper_type_1; - tmp_compexpr_right_2 = PyExc_AttributeError; - tmp_res = EXCEPTION_MATCH_BOOL(tmp_compexpr_left_2, tmp_compexpr_right_2); - assert(!(tmp_res == -1)); - tmp_condition_result_2 = (tmp_res != 0) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_dircall_arg1_1; - tmp_left_name_1 = mod_consts[3]; - CHECK_OBJECT(par_called); - tmp_dircall_arg1_1 = par_called; - Py_INCREF(tmp_dircall_arg1_1); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_1}; - tmp_tuple_element_1 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_1 == NULL)); - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_2; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - if (par_star_arg_dict == NULL) { - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - ADD_EXCEPTION_CONTEXT(&exception_keeper_type_1, &exception_keeper_value_1); - - - - goto tuple_build_exception_1; - } - - tmp_type_arg_2 = par_star_arg_dict; - tmp_expression_name_1 = BUILTIN_TYPE1(tmp_type_arg_2); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[5]); - Py_DECREF(tmp_expression_name_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - goto try_except_handler_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_make_exception_arg_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto try_except_handler_1; - } - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - goto branch_end_2; - branch_no_2:; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_1; - branch_end_2:; - // End of try: - try_end_1:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(tmp_dict_1__keys); - tmp_iter_arg_1 = tmp_dict_1__keys; - tmp_assign_source_2 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_dict_1__iter == NULL); - tmp_dict_1__iter = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = PyDict_New(); - assert(tmp_dict_1__dict == NULL); - tmp_dict_1__dict = tmp_assign_source_3; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_4; - CHECK_OBJECT(tmp_dict_1__iter); - tmp_next_source_1 = tmp_dict_1__iter; - tmp_assign_source_4 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_4 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_dict_1__key_xxx; - tmp_dict_1__key_xxx = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_compexpr_left_3 = tmp_dict_1__key_xxx; - if (par_kw == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_compexpr_right_3 = par_kw; - tmp_res = PySequence_Contains(tmp_compexpr_right_3, tmp_compexpr_left_3); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_3 = (tmp_res == 1) ? true : false; - if (tmp_condition_result_3 != false) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_raise_type_2; - PyObject *tmp_make_exception_arg_2; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_dircall_arg1_2; - tmp_left_name_2 = mod_consts[7]; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_dircall_arg1_2 = par_called; - Py_INCREF(tmp_dircall_arg1_2); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_2}; - tmp_tuple_element_2 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_2 == NULL)); - tmp_right_name_2 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_right_name_2, 0, tmp_tuple_element_2); - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_tuple_element_2 = tmp_dict_1__key_xxx; - PyTuple_SET_ITEM0(tmp_right_name_2, 1, tmp_tuple_element_2); - tmp_make_exception_arg_2 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_2, tmp_right_name_2); - Py_DECREF(tmp_right_name_2); - if (tmp_make_exception_arg_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_raise_type_2 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_2); - Py_DECREF(tmp_make_exception_arg_2); - assert(!(tmp_raise_type_2 == NULL)); - exception_type = tmp_raise_type_2; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_3:; - { - PyObject *tmp_ass_subvalue_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - PyObject *tmp_ass_subscribed_1; - PyObject *tmp_ass_subscript_1; - if (par_star_arg_dict == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_expression_name_2 = par_star_arg_dict; - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_subscript_name_1 = tmp_dict_1__key_xxx; - tmp_ass_subvalue_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_2, tmp_subscript_name_1); - if (tmp_ass_subvalue_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - if (par_kw == NULL) { - Py_DECREF(tmp_ass_subvalue_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_ass_subscribed_1 = par_kw; - CHECK_OBJECT(tmp_dict_1__key_xxx); - tmp_ass_subscript_1 = tmp_dict_1__key_xxx; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1); - Py_DECREF(tmp_ass_subvalue_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - goto branch_end_1; - branch_no_1:; - { - nuitka_bool tmp_condition_result_4; - int tmp_truth_name_1; - CHECK_OBJECT(par_star_arg_dict); - tmp_truth_name_1 = CHECK_IF_TRUE(par_star_arg_dict); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_4 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_4 == NUITKA_BOOL_TRUE) { - goto branch_yes_4; - } else { - goto branch_no_4; - } - } - branch_yes_4:; - { - PyObject *tmp_assign_source_5; - PyObject *tmp_dict_seq_1; - CHECK_OBJECT(par_kw); - tmp_dict_seq_1 = par_kw; - tmp_assign_source_5 = TO_DICT(tmp_dict_seq_1, NULL); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - { - PyObject *old = par_kw; - assert(old != NULL); - par_kw = tmp_assign_source_5; - Py_DECREF(old); - } - - } - { - PyObject *tmp_assign_source_6; - PyObject *tmp_iter_arg_2; - PyObject *tmp_called_instance_2; - CHECK_OBJECT(par_star_arg_dict); - tmp_called_instance_2 = par_star_arg_dict; - tmp_iter_arg_2 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[10]); - if (tmp_iter_arg_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_assign_source_6 = MAKE_ITERATOR(tmp_iter_arg_2); - Py_DECREF(tmp_iter_arg_2); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_dict_2__iter == NULL); - tmp_dict_2__iter = tmp_assign_source_6; - } - loop_start_2:; - { - PyObject *tmp_next_source_2; - PyObject *tmp_assign_source_7; - CHECK_OBJECT(tmp_dict_2__iter); - tmp_next_source_2 = tmp_dict_2__iter; - tmp_assign_source_7 = ITERATOR_NEXT(tmp_next_source_2); - if (tmp_assign_source_7 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_2; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_dict_2__item; - tmp_dict_2__item = tmp_assign_source_7; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_8; - PyObject *tmp_expression_name_3; - PyObject *tmp_subscript_name_2; - CHECK_OBJECT(tmp_dict_2__item); - tmp_expression_name_3 = tmp_dict_2__item; - tmp_subscript_name_2 = mod_consts[11]; - tmp_assign_source_8 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_3, tmp_subscript_name_2, 0); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - { - PyObject *old = tmp_dict_2__key; - tmp_dict_2__key = tmp_assign_source_8; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_5; - PyObject *tmp_compexpr_left_4; - PyObject *tmp_compexpr_right_4; - CHECK_OBJECT(tmp_dict_2__key); - tmp_compexpr_left_4 = tmp_dict_2__key; - if (par_kw == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_compexpr_right_4 = par_kw; - tmp_res = PySequence_Contains(tmp_compexpr_right_4, tmp_compexpr_left_4); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_condition_result_5 = (tmp_res == 1) ? true : false; - if (tmp_condition_result_5 != false) { - goto branch_yes_5; - } else { - goto branch_no_5; - } - } - branch_yes_5:; - { - PyObject *tmp_raise_type_3; - PyObject *tmp_make_exception_arg_3; - PyObject *tmp_left_name_3; - PyObject *tmp_right_name_3; - PyObject *tmp_tuple_element_3; - PyObject *tmp_dircall_arg1_3; - tmp_left_name_3 = mod_consts[7]; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_dircall_arg1_3 = par_called; - Py_INCREF(tmp_dircall_arg1_3); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_3}; - tmp_tuple_element_3 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_3 == NULL)); - tmp_right_name_3 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_right_name_3, 0, tmp_tuple_element_3); - CHECK_OBJECT(tmp_dict_2__key); - tmp_tuple_element_3 = tmp_dict_2__key; - PyTuple_SET_ITEM0(tmp_right_name_3, 1, tmp_tuple_element_3); - tmp_make_exception_arg_3 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_3, tmp_right_name_3); - Py_DECREF(tmp_right_name_3); - if (tmp_make_exception_arg_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_raise_type_3 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_3); - Py_DECREF(tmp_make_exception_arg_3); - assert(!(tmp_raise_type_3 == NULL)); - exception_type = tmp_raise_type_3; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_5:; - { - PyObject *tmp_ass_subvalue_2; - PyObject *tmp_expression_name_4; - PyObject *tmp_subscript_name_3; - PyObject *tmp_ass_subscribed_2; - PyObject *tmp_ass_subscript_2; - CHECK_OBJECT(tmp_dict_2__item); - tmp_expression_name_4 = tmp_dict_2__item; - tmp_subscript_name_3 = mod_consts[12]; - tmp_ass_subvalue_2 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_4, tmp_subscript_name_3, 1); - if (tmp_ass_subvalue_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - if (par_kw == NULL) { - Py_DECREF(tmp_ass_subvalue_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto try_except_handler_1; - } - - tmp_ass_subscribed_2 = par_kw; - CHECK_OBJECT(tmp_dict_2__key); - tmp_ass_subscript_2 = tmp_dict_2__key; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2); - Py_DECREF(tmp_ass_subvalue_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_2; - loop_end_2:; - branch_no_4:; - branch_end_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_dict_1__dict); - tmp_dict_1__dict = NULL; - Py_XDECREF(tmp_dict_1__iter); - tmp_dict_1__iter = NULL; - Py_XDECREF(tmp_dict_1__keys); - tmp_dict_1__keys = NULL; - Py_XDECREF(tmp_dict_1__key_xxx); - tmp_dict_1__key_xxx = NULL; - Py_XDECREF(tmp_dict_2__iter); - tmp_dict_2__iter = NULL; - Py_XDECREF(tmp_dict_2__item); - tmp_dict_2__item = NULL; - Py_XDECREF(tmp_dict_2__key); - tmp_dict_2__key = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto function_exception_exit; - // End of try: - try_end_2:; - Py_XDECREF(tmp_dict_1__dict); - tmp_dict_1__dict = NULL; - Py_XDECREF(tmp_dict_1__iter); - tmp_dict_1__iter = NULL; - Py_XDECREF(tmp_dict_1__keys); - tmp_dict_1__keys = NULL; - Py_XDECREF(tmp_dict_1__key_xxx); - tmp_dict_1__key_xxx = NULL; - Py_XDECREF(tmp_dict_2__iter); - tmp_dict_2__iter = NULL; - Py_XDECREF(tmp_dict_2__item); - tmp_dict_2__item = NULL; - Py_XDECREF(tmp_dict_2__key); - tmp_dict_2__key = NULL; - { - PyObject *tmp_called_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_kwargs_name_1; - if (par_called == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[8]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_called_name_1 = par_called; - CHECK_OBJECT(par_args); - tmp_args_name_1 = par_args; - if (par_kw == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[9]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_kwargs_name_1 = par_kw; - tmp_return_value = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - goto function_return_exit; - } - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_args); - Py_DECREF(par_args); - CHECK_OBJECT(par_kw); - Py_DECREF(par_kw); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_args); - Py_DECREF(par_args); - CHECK_OBJECT(par_kw); - Py_DECREF(par_kw); - CHECK_OBJECT(par_star_arg_dict); - Py_DECREF(par_star_arg_dict); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__2_complex_call_helper_star_list(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_called = python_pars[0]; - PyObject *par_star_arg_list = python_pars[1]; - bool tmp_result; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_return_value = NULL; - - // Actual function body. - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_type_arg_1; - CHECK_OBJECT(par_star_arg_list); - tmp_type_arg_1 = par_star_arg_list; - tmp_compexpr_left_1 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_compexpr_left_1 == NULL)); - tmp_compexpr_right_1 = (PyObject *)&PyTuple_Type; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - Py_DECREF(tmp_compexpr_left_1); - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - nuitka_bool tmp_condition_result_2; - int tmp_or_left_truth_1; - nuitka_bool tmp_or_left_value_1; - nuitka_bool tmp_or_right_value_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_expression_name_2; - CHECK_OBJECT(par_star_arg_list); - tmp_expression_name_1 = par_star_arg_list; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_1, mod_consts[13]); - tmp_or_left_value_1 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - tmp_or_left_truth_1 = tmp_or_left_value_1 == NUITKA_BOOL_TRUE ? 1 : 0; - if (tmp_or_left_truth_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - if (tmp_or_left_truth_1 == 1) { - goto or_left_1; - } else { - goto or_right_1; - } - or_right_1:; - CHECK_OBJECT(par_star_arg_list); - tmp_expression_name_2 = par_star_arg_list; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_2, mod_consts[14]); - tmp_or_right_value_1 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - tmp_condition_result_2 = tmp_or_right_value_1; - goto or_end_1; - or_left_1:; - tmp_condition_result_2 = tmp_or_left_value_1; - or_end_1:; - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_tuple_arg_1; - CHECK_OBJECT(par_star_arg_list); - tmp_tuple_arg_1 = par_star_arg_list; - tmp_assign_source_1 = PySequence_Tuple(tmp_tuple_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - { - PyObject *old = par_star_arg_list; - assert(old != NULL); - par_star_arg_list = tmp_assign_source_1; - Py_DECREF(old); - } - - } - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_dircall_arg1_1; - tmp_left_name_1 = mod_consts[15]; - CHECK_OBJECT(par_called); - tmp_dircall_arg1_1 = par_called; - Py_INCREF(tmp_dircall_arg1_1); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_1}; - tmp_tuple_element_1 = impl_models$$$function__3_get_callable_name_desc(dir_call_args); - } - assert(!(tmp_tuple_element_1 == NULL)); - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_3; - PyObject *tmp_type_arg_2; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - CHECK_OBJECT(par_star_arg_list); - tmp_type_arg_2 = par_star_arg_list; - tmp_expression_name_3 = BUILTIN_TYPE1(tmp_type_arg_2); - assert(!(tmp_expression_name_3 == NULL)); - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[5]); - Py_DECREF(tmp_expression_name_3); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - goto function_exception_exit; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_make_exception_arg_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto function_exception_exit; - } - branch_end_2:; - branch_no_1:; - { - PyObject *tmp_called_name_1; - PyObject *tmp_args_name_1; - CHECK_OBJECT(par_called); - tmp_called_name_1 = par_called; - if (par_star_arg_list == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[16]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - - - goto function_exception_exit; - } - - tmp_args_name_1 = par_star_arg_list; - tmp_return_value = CALL_FUNCTION_WITH_POSARGS(tmp_called_name_1, tmp_args_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto function_exception_exit; - } - goto function_return_exit; - } - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_star_arg_list); - Py_DECREF(par_star_arg_list); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_called); - Py_DECREF(par_called); - CHECK_OBJECT(par_star_arg_list); - Py_DECREF(par_star_arg_list); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__4__unpack_list(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_args = python_pars[0]; - PyObject *tmp_iter = NULL; - PyObject *tmp_keys = NULL; - PyObject *tmp_list = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - bool tmp_result; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(par_args); - tmp_iter_arg_1 = par_args; - tmp_assign_source_1 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_iter == NULL); - tmp_iter = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyList_New(0); - assert(tmp_list == NULL); - tmp_list = tmp_assign_source_2; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_3; - CHECK_OBJECT(tmp_iter); - tmp_next_source_1 = tmp_iter; - tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_3 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_keys; - tmp_keys = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_list_arg_name_1; - PyObject *tmp_value_name_1; - NUITKA_MAY_BE_UNUSED PyObject *tmp_list_extend_result_1; - CHECK_OBJECT(tmp_list); - tmp_list_arg_name_1 = tmp_list; - CHECK_OBJECT(tmp_keys); - tmp_value_name_1 = tmp_keys; - assert(PyList_Check(tmp_list_arg_name_1)); - tmp_result = LIST_EXTEND_FOR_UNPACK(tmp_list_arg_name_1, tmp_value_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - tmp_list_extend_result_1 = Py_None; - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - CHECK_OBJECT(tmp_list); - tmp_return_value = tmp_list; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(tmp_list); - Py_DECREF(tmp_list); - tmp_list = NULL; - Py_XDECREF(tmp_iter); - tmp_iter = NULL; - Py_XDECREF(tmp_keys); - tmp_keys = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_list); - tmp_list = NULL; - Py_XDECREF(tmp_iter); - tmp_iter = NULL; - Py_XDECREF(tmp_keys); - tmp_keys = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_args); - Py_DECREF(par_args); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_args); - Py_DECREF(par_args); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__6__unpack_dict(PyObject **python_pars) { -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); - assert(!had_error); // Do not enter inlined functions with error set. -#endif - - // Local variable declarations. - PyObject *par_args = python_pars[0]; - PyObject *tmp_dict = NULL; - PyObject *tmp_iter = NULL; - PyObject *tmp_keys = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_dictupdate_value; - PyObject *tmp_dictupdate_dict; - int tmp_res; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - - // Actual function body. - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_iter_arg_1; - CHECK_OBJECT(par_args); - tmp_iter_arg_1 = par_args; - tmp_assign_source_1 = MAKE_ITERATOR(tmp_iter_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - assert(tmp_iter == NULL); - tmp_iter = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyDict_New(); - assert(tmp_dict == NULL); - tmp_dict = tmp_assign_source_2; - } - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_3; - CHECK_OBJECT(tmp_iter); - tmp_next_source_1 = tmp_iter; - tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_3 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - goto try_except_handler_1; - } - } - - { - PyObject *old = tmp_keys; - tmp_keys = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - // Tried code: - CHECK_OBJECT(tmp_keys); - tmp_dictupdate_value = tmp_keys; - CHECK_OBJECT(tmp_dict); - tmp_dictupdate_dict = tmp_dict; - assert(PyDict_Check(tmp_dictupdate_dict)); - tmp_res = PyDict_Update(tmp_dictupdate_dict, tmp_dictupdate_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_2; - } - goto try_end_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - tmp_compexpr_left_1 = exception_keeper_type_1; - tmp_compexpr_right_1 = PyExc_AttributeError; - tmp_res = EXCEPTION_MATCH_BOOL(tmp_compexpr_left_1, tmp_compexpr_right_1); - assert(!(tmp_res == -1)); - tmp_condition_result_1 = (tmp_res != 0) ? true : false; - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_1; - tmp_left_name_1 = mod_consts[17]; - CHECK_OBJECT(tmp_keys); - tmp_type_arg_1 = tmp_keys; - tmp_expression_name_1 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_expression_name_1 == NULL)); - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[5]); - Py_DECREF(tmp_expression_name_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto try_except_handler_1; - } - tmp_right_name_1 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - tmp_make_exception_arg_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - Py_DECREF(exception_keeper_type_1); - Py_XDECREF(exception_keeper_value_1); - Py_XDECREF(exception_keeper_tb_1); - - - - goto try_except_handler_1; - } - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_TypeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - goto branch_end_1; - branch_no_1:; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_1; - branch_end_1:; - // End of try: - try_end_1:; - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - - - goto try_except_handler_1; - } - goto loop_start_1; - loop_end_1:; - CHECK_OBJECT(tmp_dict); - tmp_return_value = tmp_dict; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(tmp_dict); - Py_DECREF(tmp_dict); - tmp_dict = NULL; - Py_XDECREF(tmp_iter); - tmp_iter = NULL; - Py_XDECREF(tmp_keys); - tmp_keys = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_dict); - tmp_dict = NULL; - Py_XDECREF(tmp_iter); - tmp_iter = NULL; - Py_XDECREF(tmp_keys); - tmp_keys = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - CHECK_OBJECT(par_args); - Py_DECREF(par_args); assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - CHECK_OBJECT(par_args); - Py_DECREF(par_args); - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__1_load_model(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_name = python_pars[0]; - PyObject *par_model_type = python_pars[1]; - PyObject *par_is_eval = python_pars[2]; - PyObject *par_device = python_pars[3]; - PyObject *par_checkpoint = python_pars[4]; - PyObject *var_model = NULL; - struct Nuitka_FrameObject *frame_fe2cd4692aef62e7724c5cfc72c4c128; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_fe2cd4692aef62e7724c5cfc72c4c128 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_fe2cd4692aef62e7724c5cfc72c4c128)) { - Py_XDECREF(cache_frame_fe2cd4692aef62e7724c5cfc72c4c128); - -#if _DEBUG_REFCOUNTS - if (cache_frame_fe2cd4692aef62e7724c5cfc72c4c128 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_fe2cd4692aef62e7724c5cfc72c4c128 = MAKE_FUNCTION_FRAME(codeobj_fe2cd4692aef62e7724c5cfc72c4c128, module_models, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_fe2cd4692aef62e7724c5cfc72c4c128->m_type_description == NULL); - frame_fe2cd4692aef62e7724c5cfc72c4c128 = cache_frame_fe2cd4692aef62e7724c5cfc72c4c128; - - // Push the new frame as the currently active one. - pushFrameStack(frame_fe2cd4692aef62e7724c5cfc72c4c128); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_fe2cd4692aef62e7724c5cfc72c4c128) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_args_element_name_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - tmp_called_instance_1 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[18]); - - if (unlikely(tmp_called_instance_1 == NULL)) { - tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[18]); - } - - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 47; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_name); - tmp_args_element_name_1 = par_name; - frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame.f_lineno = 47; - tmp_expression_name_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_1, mod_consts[19], tmp_args_element_name_1); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 47; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[20]); - Py_DECREF(tmp_expression_name_1); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 47; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_1 = mod_consts[21]; - CHECK_OBJECT(par_model_type); - tmp_dict_value_1 = par_model_type; - tmp_kwargs_name_1 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame.f_lineno = 47; - tmp_assign_source_1 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 47; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - assert(var_model == NULL); - var_model = tmp_assign_source_1; - } - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - CHECK_OBJECT(par_checkpoint); - tmp_compexpr_left_1 = par_checkpoint; - tmp_compexpr_right_1 = Py_None; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_called_instance_2; - PyObject *tmp_call_result_1; - PyObject *tmp_args_element_name_2; - CHECK_OBJECT(var_model); - tmp_called_instance_2 = var_model; - CHECK_OBJECT(par_checkpoint); - tmp_args_element_name_2 = par_checkpoint; - frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame.f_lineno = 50; - tmp_call_result_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_2, mod_consts[22], tmp_args_element_name_2); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 50; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - branch_no_1:; - { - nuitka_bool tmp_condition_result_2; - int tmp_truth_name_1; - CHECK_OBJECT(par_is_eval); - tmp_truth_name_1 = CHECK_IF_TRUE(par_is_eval); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 52; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_2 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_called_instance_3; - PyObject *tmp_call_result_2; - if (var_model == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[23]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 53; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_3 = var_model; - frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame.f_lineno = 53; - tmp_call_result_2 = CALL_METHOD_NO_ARGS(tmp_called_instance_3, mod_consts[24]); - if (tmp_call_result_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 53; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_2); - } - branch_no_2:; - { - nuitka_bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_tmp_condition_result_3_object_1; - int tmp_truth_name_2; - CHECK_OBJECT(par_device); - tmp_compexpr_left_2 = par_device; - tmp_compexpr_right_2 = mod_consts[25]; - tmp_tmp_condition_result_3_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_2, tmp_compexpr_right_2); - if (tmp_tmp_condition_result_3_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 55; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_2 = CHECK_IF_TRUE(tmp_tmp_condition_result_3_object_1); - if (tmp_truth_name_2 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_3_object_1); - - exception_lineno = 55; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_3 = tmp_truth_name_2 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_3_object_1); - if (tmp_condition_result_3 == NUITKA_BOOL_TRUE) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_instance_4; - if (var_model == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[23]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 56; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_4 = var_model; - frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame.f_lineno = 56; - tmp_assign_source_2 = CALL_METHOD_NO_ARGS(tmp_called_instance_4, mod_consts[26]); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 56; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_model; - var_model = tmp_assign_source_2; - Py_XDECREF(old); - } - - } - branch_no_3:; - { - PyObject *tmp_called_instance_5; - PyObject *tmp_args_element_name_3; - if (var_model == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[23]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 58; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_5 = var_model; - CHECK_OBJECT(par_device); - tmp_args_element_name_3 = par_device; - frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame.f_lineno = 58; - tmp_return_value = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_5, mod_consts[27], tmp_args_element_name_3); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 58; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_fe2cd4692aef62e7724c5cfc72c4c128); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_fe2cd4692aef62e7724c5cfc72c4c128); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_fe2cd4692aef62e7724c5cfc72c4c128); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_fe2cd4692aef62e7724c5cfc72c4c128, exception_lineno); - } else if (exception_tb->tb_frame != &frame_fe2cd4692aef62e7724c5cfc72c4c128->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_fe2cd4692aef62e7724c5cfc72c4c128, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_fe2cd4692aef62e7724c5cfc72c4c128, - type_description_1, - par_name, - par_model_type, - par_is_eval, - par_device, - par_checkpoint, - var_model - ); - - - // Release cached frame if used for exception. - if (frame_fe2cd4692aef62e7724c5cfc72c4c128 == cache_frame_fe2cd4692aef62e7724c5cfc72c4c128) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_fe2cd4692aef62e7724c5cfc72c4c128); - cache_frame_fe2cd4692aef62e7724c5cfc72c4c128 = NULL; - } - - assertFrameObject(frame_fe2cd4692aef62e7724c5cfc72c4c128); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_name); - par_name = NULL; - Py_XDECREF(par_model_type); - par_model_type = NULL; - CHECK_OBJECT(par_is_eval); - Py_DECREF(par_is_eval); - par_is_eval = NULL; - Py_XDECREF(par_device); - par_device = NULL; - Py_XDECREF(par_checkpoint); - par_checkpoint = NULL; - Py_XDECREF(var_model); - var_model = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_name); - par_name = NULL; - Py_XDECREF(par_model_type); - par_model_type = NULL; - CHECK_OBJECT(par_is_eval); - Py_DECREF(par_is_eval); - par_is_eval = NULL; - Py_XDECREF(par_device); - par_device = NULL; - Py_XDECREF(par_checkpoint); - par_checkpoint = NULL; - Py_XDECREF(var_model); - var_model = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__2_load_preprocess(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_config = python_pars[0]; - PyObject *var__build_proc_from_cfg = NULL; - PyObject *var_vis_processors = NULL; - PyObject *var_txt_processors = NULL; - PyObject *var_vis_proc_cfg = NULL; - PyObject *var_txt_proc_cfg = NULL; - PyObject *var_vis_train_cfg = NULL; - PyObject *var_vis_eval_cfg = NULL; - PyObject *var_txt_train_cfg = NULL; - PyObject *var_txt_eval_cfg = NULL; - struct Nuitka_FrameObject *frame_28d96cf50f456a1141613d0f55135c5a; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_dictset_value; - PyObject *tmp_dictset_dict; - PyObject *tmp_dictset_key; - int tmp_res; - bool tmp_result; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_28d96cf50f456a1141613d0f55135c5a = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - { - PyObject *tmp_assign_source_1; - - - tmp_assign_source_1 = MAKE_FUNCTION_models$$$function__2_load_preprocess$$$function__1__build_proc_from_cfg(); - - assert(var__build_proc_from_cfg == NULL); - var__build_proc_from_cfg = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyDict_New(); - assert(var_vis_processors == NULL); - var_vis_processors = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = PyDict_New(); - assert(var_txt_processors == NULL); - var_txt_processors = tmp_assign_source_3; - } - // Tried code: - if (isFrameUnusable(cache_frame_28d96cf50f456a1141613d0f55135c5a)) { - Py_XDECREF(cache_frame_28d96cf50f456a1141613d0f55135c5a); - -#if _DEBUG_REFCOUNTS - if (cache_frame_28d96cf50f456a1141613d0f55135c5a == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_28d96cf50f456a1141613d0f55135c5a = MAKE_FUNCTION_FRAME(codeobj_28d96cf50f456a1141613d0f55135c5a, module_models, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_28d96cf50f456a1141613d0f55135c5a->m_type_description == NULL); - frame_28d96cf50f456a1141613d0f55135c5a = cache_frame_28d96cf50f456a1141613d0f55135c5a; - - // Push the new frame as the currently active one. - pushFrameStack(frame_28d96cf50f456a1141613d0f55135c5a); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_28d96cf50f456a1141613d0f55135c5a) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_4; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_config); - tmp_called_instance_1 = par_config; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 87; - tmp_assign_source_4 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_1, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[32], 0) - ); - - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 87; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_vis_proc_cfg == NULL); - var_vis_proc_cfg = tmp_assign_source_4; - } - { - PyObject *tmp_assign_source_5; - PyObject *tmp_called_instance_2; - if (par_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[33]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 88; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = par_config; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 88; - tmp_assign_source_5 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_2, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[34], 0) - ); - - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 88; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_txt_proc_cfg == NULL); - var_txt_proc_cfg = tmp_assign_source_5; - } - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - CHECK_OBJECT(var_vis_proc_cfg); - tmp_compexpr_left_1 = var_vis_proc_cfg; - tmp_compexpr_right_1 = Py_None; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_assign_source_6; - PyObject *tmp_called_instance_3; - CHECK_OBJECT(var_vis_proc_cfg); - tmp_called_instance_3 = var_vis_proc_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 91; - tmp_assign_source_6 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_3, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[35], 0) - ); - - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 91; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_vis_train_cfg == NULL); - var_vis_train_cfg = tmp_assign_source_6; - } - { - PyObject *tmp_assign_source_7; - PyObject *tmp_called_instance_4; - if (var_vis_proc_cfg == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[36]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 92; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_4 = var_vis_proc_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 92; - tmp_assign_source_7 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_4, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[37], 0) - ); - - if (tmp_assign_source_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 92; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_vis_eval_cfg == NULL); - var_vis_eval_cfg = tmp_assign_source_7; - } - goto branch_end_1; - branch_no_1:; - { - PyObject *tmp_assign_source_8; - tmp_assign_source_8 = Py_None; - assert(var_vis_train_cfg == NULL); - Py_INCREF(tmp_assign_source_8); - var_vis_train_cfg = tmp_assign_source_8; - } - { - PyObject *tmp_assign_source_9; - tmp_assign_source_9 = Py_None; - assert(var_vis_eval_cfg == NULL); - Py_INCREF(tmp_assign_source_9); - var_vis_eval_cfg = tmp_assign_source_9; - } - branch_end_1:; - { - PyObject *tmp_called_name_1; - PyObject *tmp_args_element_name_1; - CHECK_OBJECT(var__build_proc_from_cfg); - tmp_called_name_1 = var__build_proc_from_cfg; - CHECK_OBJECT(var_vis_train_cfg); - tmp_args_element_name_1 = var_vis_train_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 97; - tmp_dictset_value = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - if (tmp_dictset_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 97; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_vis_processors); - tmp_dictset_dict = var_vis_processors; - tmp_dictset_key = mod_consts[38]; - tmp_res = PyDict_SetItem(tmp_dictset_dict, tmp_dictset_key, tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - assert(!(tmp_res != 0)); - } - { - PyObject *tmp_ass_subvalue_1; - PyObject *tmp_called_name_2; - PyObject *tmp_args_element_name_2; - PyObject *tmp_ass_subscribed_1; - PyObject *tmp_ass_subscript_1; - CHECK_OBJECT(var__build_proc_from_cfg); - tmp_called_name_2 = var__build_proc_from_cfg; - CHECK_OBJECT(var_vis_eval_cfg); - tmp_args_element_name_2 = var_vis_eval_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 98; - tmp_ass_subvalue_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_2); - if (tmp_ass_subvalue_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 98; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - if (var_vis_processors == NULL) { - Py_DECREF(tmp_ass_subvalue_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[39]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 98; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_ass_subscribed_1 = var_vis_processors; - tmp_ass_subscript_1 = mod_consts[24]; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1); - Py_DECREF(tmp_ass_subvalue_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 98; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - } - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - CHECK_OBJECT(var_txt_proc_cfg); - tmp_compexpr_left_2 = var_txt_proc_cfg; - tmp_compexpr_right_2 = Py_None; - tmp_condition_result_2 = (tmp_compexpr_left_2 != tmp_compexpr_right_2) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_10; - PyObject *tmp_called_instance_5; - CHECK_OBJECT(var_txt_proc_cfg); - tmp_called_instance_5 = var_txt_proc_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 101; - tmp_assign_source_10 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_5, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[35], 0) - ); - - if (tmp_assign_source_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 101; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_txt_train_cfg == NULL); - var_txt_train_cfg = tmp_assign_source_10; - } - { - PyObject *tmp_assign_source_11; - PyObject *tmp_called_instance_6; - if (var_txt_proc_cfg == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[40]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 102; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_6 = var_txt_proc_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 102; - tmp_assign_source_11 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_6, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[37], 0) - ); - - if (tmp_assign_source_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 102; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_txt_eval_cfg == NULL); - var_txt_eval_cfg = tmp_assign_source_11; - } - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_assign_source_12; - tmp_assign_source_12 = Py_None; - assert(var_txt_train_cfg == NULL); - Py_INCREF(tmp_assign_source_12); - var_txt_train_cfg = tmp_assign_source_12; - } - { - PyObject *tmp_assign_source_13; - tmp_assign_source_13 = Py_None; - assert(var_txt_eval_cfg == NULL); - Py_INCREF(tmp_assign_source_13); - var_txt_eval_cfg = tmp_assign_source_13; - } - branch_end_2:; - { - PyObject *tmp_called_name_3; - PyObject *tmp_args_element_name_3; - CHECK_OBJECT(var__build_proc_from_cfg); - tmp_called_name_3 = var__build_proc_from_cfg; - CHECK_OBJECT(var_txt_train_cfg); - tmp_args_element_name_3 = var_txt_train_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 107; - tmp_dictset_value = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_3, tmp_args_element_name_3); - if (tmp_dictset_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 107; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_txt_processors); - tmp_dictset_dict = var_txt_processors; - tmp_dictset_key = mod_consts[38]; - tmp_res = PyDict_SetItem(tmp_dictset_dict, tmp_dictset_key, tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - assert(!(tmp_res != 0)); - } - { - PyObject *tmp_ass_subvalue_2; - PyObject *tmp_called_name_4; - PyObject *tmp_args_element_name_4; - PyObject *tmp_ass_subscribed_2; - PyObject *tmp_ass_subscript_2; - CHECK_OBJECT(var__build_proc_from_cfg); - tmp_called_name_4 = var__build_proc_from_cfg; - CHECK_OBJECT(var_txt_eval_cfg); - tmp_args_element_name_4 = var_txt_eval_cfg; - frame_28d96cf50f456a1141613d0f55135c5a->m_frame.f_lineno = 108; - tmp_ass_subvalue_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_4, tmp_args_element_name_4); - if (tmp_ass_subvalue_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 108; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - if (var_txt_processors == NULL) { - Py_DECREF(tmp_ass_subvalue_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[41]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 108; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_ass_subscribed_2 = var_txt_processors; - tmp_ass_subscript_2 = mod_consts[24]; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_2, tmp_ass_subscript_2, tmp_ass_subvalue_2); - Py_DECREF(tmp_ass_subvalue_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 108; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_tuple_element_1; - if (var_vis_processors == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[39]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 110; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_tuple_element_1 = var_vis_processors; - tmp_return_value = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_return_value, 0, tmp_tuple_element_1); - if (var_txt_processors == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[41]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 110; - type_description_1 = "oooooooooo"; - goto tuple_build_exception_1; - } - - tmp_tuple_element_1 = var_txt_processors; - PyTuple_SET_ITEM0(tmp_return_value, 1, tmp_tuple_element_1); - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_return_value); - goto frame_exception_exit_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_28d96cf50f456a1141613d0f55135c5a); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_28d96cf50f456a1141613d0f55135c5a); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_28d96cf50f456a1141613d0f55135c5a); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_28d96cf50f456a1141613d0f55135c5a, exception_lineno); - } else if (exception_tb->tb_frame != &frame_28d96cf50f456a1141613d0f55135c5a->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_28d96cf50f456a1141613d0f55135c5a, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_28d96cf50f456a1141613d0f55135c5a, - type_description_1, - par_config, - var__build_proc_from_cfg, - var_vis_processors, - var_txt_processors, - var_vis_proc_cfg, - var_txt_proc_cfg, - var_vis_train_cfg, - var_vis_eval_cfg, - var_txt_train_cfg, - var_txt_eval_cfg - ); - - - // Release cached frame if used for exception. - if (frame_28d96cf50f456a1141613d0f55135c5a == cache_frame_28d96cf50f456a1141613d0f55135c5a) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_28d96cf50f456a1141613d0f55135c5a); - cache_frame_28d96cf50f456a1141613d0f55135c5a = NULL; - } - - assertFrameObject(frame_28d96cf50f456a1141613d0f55135c5a); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_config); - par_config = NULL; - CHECK_OBJECT(var__build_proc_from_cfg); - Py_DECREF(var__build_proc_from_cfg); - var__build_proc_from_cfg = NULL; - Py_XDECREF(var_vis_processors); - var_vis_processors = NULL; - Py_XDECREF(var_txt_processors); - var_txt_processors = NULL; - Py_XDECREF(var_vis_proc_cfg); - var_vis_proc_cfg = NULL; - Py_XDECREF(var_txt_proc_cfg); - var_txt_proc_cfg = NULL; - CHECK_OBJECT(var_vis_train_cfg); - Py_DECREF(var_vis_train_cfg); - var_vis_train_cfg = NULL; - CHECK_OBJECT(var_vis_eval_cfg); - Py_DECREF(var_vis_eval_cfg); - var_vis_eval_cfg = NULL; - CHECK_OBJECT(var_txt_train_cfg); - Py_DECREF(var_txt_train_cfg); - var_txt_train_cfg = NULL; - CHECK_OBJECT(var_txt_eval_cfg); - Py_DECREF(var_txt_eval_cfg); - var_txt_eval_cfg = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_config); - par_config = NULL; - CHECK_OBJECT(var__build_proc_from_cfg); - Py_DECREF(var__build_proc_from_cfg); - var__build_proc_from_cfg = NULL; - Py_XDECREF(var_vis_processors); - var_vis_processors = NULL; - Py_XDECREF(var_txt_processors); - var_txt_processors = NULL; - Py_XDECREF(var_vis_proc_cfg); - var_vis_proc_cfg = NULL; - Py_XDECREF(var_txt_proc_cfg); - var_txt_proc_cfg = NULL; - Py_XDECREF(var_vis_train_cfg); - var_vis_train_cfg = NULL; - Py_XDECREF(var_vis_eval_cfg); - var_vis_eval_cfg = NULL; - Py_XDECREF(var_txt_train_cfg); - var_txt_train_cfg = NULL; - Py_XDECREF(var_txt_eval_cfg); - var_txt_eval_cfg = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__2_load_preprocess$$$function__1__build_proc_from_cfg(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_cfg = python_pars[0]; - struct Nuitka_FrameObject *frame_26067f56e445e8be2364d8b047b0369a; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - static struct Nuitka_FrameObject *cache_frame_26067f56e445e8be2364d8b047b0369a = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_26067f56e445e8be2364d8b047b0369a)) { - Py_XDECREF(cache_frame_26067f56e445e8be2364d8b047b0369a); - -#if _DEBUG_REFCOUNTS - if (cache_frame_26067f56e445e8be2364d8b047b0369a == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_26067f56e445e8be2364d8b047b0369a = MAKE_FUNCTION_FRAME(codeobj_26067f56e445e8be2364d8b047b0369a, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_26067f56e445e8be2364d8b047b0369a->m_type_description == NULL); - frame_26067f56e445e8be2364d8b047b0369a = cache_frame_26067f56e445e8be2364d8b047b0369a; - - // Push the new frame as the currently active one. - pushFrameStack(frame_26067f56e445e8be2364d8b047b0369a); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_26067f56e445e8be2364d8b047b0369a) == 2); // Frame stack - - // Framed code: - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_called_name_2; - PyObject *tmp_expression_name_2; - PyObject *tmp_args_element_name_1; - PyObject *tmp_expression_name_3; - PyObject *tmp_args_element_name_2; - PyObject *tmp_called_name_3; - CHECK_OBJECT(par_cfg); - tmp_compexpr_left_1 = par_cfg; - tmp_compexpr_right_1 = Py_None; - tmp_condition_result_1 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - if (tmp_condition_result_1 != false) { - goto condexpr_true_1; - } else { - goto condexpr_false_1; - } - condexpr_true_1:; - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[18]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[18]); - } - - if (tmp_expression_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - tmp_called_name_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[43]); - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_cfg); - tmp_expression_name_3 = par_cfg; - tmp_args_element_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[44]); - if (tmp_args_element_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_2); - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - frame_26067f56e445e8be2364d8b047b0369a->m_frame.f_lineno = 79; - tmp_expression_name_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_1); - Py_DECREF(tmp_called_name_2); - Py_DECREF(tmp_args_element_name_1); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[45]); - Py_DECREF(tmp_expression_name_1); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - if (par_cfg == NULL) { - Py_DECREF(tmp_called_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[46]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_2 = par_cfg; - frame_26067f56e445e8be2364d8b047b0369a->m_frame.f_lineno = 79; - tmp_return_value = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_2); - Py_DECREF(tmp_called_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 79; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - goto condexpr_end_1; - condexpr_false_1:; - tmp_called_name_3 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[47]); - - if (unlikely(tmp_called_name_3 == NULL)) { - tmp_called_name_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[47]); - } - - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 81; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - frame_26067f56e445e8be2364d8b047b0369a->m_frame.f_lineno = 81; - tmp_return_value = CALL_FUNCTION_NO_ARGS(tmp_called_name_3); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 81; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - condexpr_end_1:; - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_26067f56e445e8be2364d8b047b0369a); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_26067f56e445e8be2364d8b047b0369a); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_26067f56e445e8be2364d8b047b0369a); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_26067f56e445e8be2364d8b047b0369a, exception_lineno); - } else if (exception_tb->tb_frame != &frame_26067f56e445e8be2364d8b047b0369a->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_26067f56e445e8be2364d8b047b0369a, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_26067f56e445e8be2364d8b047b0369a, - type_description_1, - par_cfg - ); - - - // Release cached frame if used for exception. - if (frame_26067f56e445e8be2364d8b047b0369a == cache_frame_26067f56e445e8be2364d8b047b0369a) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_26067f56e445e8be2364d8b047b0369a); - cache_frame_26067f56e445e8be2364d8b047b0369a = NULL; - } - - assertFrameObject(frame_26067f56e445e8be2364d8b047b0369a); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_cfg); - par_cfg = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_cfg); - par_cfg = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__3_load_model_and_preprocess(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_name = python_pars[0]; - PyObject *par_model_type = python_pars[1]; - PyObject *par_is_eval = python_pars[2]; - PyObject *par_device = python_pars[3]; - PyObject *var_model_cls = NULL; - PyObject *var_model = NULL; - PyObject *var_cfg = NULL; - PyObject *var_preprocess_cfg = NULL; - PyObject *var_vis_processors = NULL; - PyObject *var_txt_processors = NULL; - PyObject *tmp_tuple_unpack_1__element_1 = NULL; - PyObject *tmp_tuple_unpack_1__element_2 = NULL; - PyObject *tmp_tuple_unpack_1__source_iter = NULL; - PyObject *tmp_tuple_unpack_2__element_1 = NULL; - PyObject *tmp_tuple_unpack_2__element_2 = NULL; - PyObject *tmp_tuple_unpack_2__source_iter = NULL; - struct Nuitka_FrameObject *frame_8e01d5b362d6df18e9f336fc94ed971c; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *tmp_iterator_attempt; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *exception_keeper_type_3; - PyObject *exception_keeper_value_3; - PyTracebackObject *exception_keeper_tb_3; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; - PyObject *exception_keeper_type_4; - PyObject *exception_keeper_value_4; - PyTracebackObject *exception_keeper_tb_4; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_8e01d5b362d6df18e9f336fc94ed971c = NULL; - PyObject *exception_keeper_type_5; - PyObject *exception_keeper_value_5; - PyTracebackObject *exception_keeper_tb_5; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_8e01d5b362d6df18e9f336fc94ed971c)) { - Py_XDECREF(cache_frame_8e01d5b362d6df18e9f336fc94ed971c); - -#if _DEBUG_REFCOUNTS - if (cache_frame_8e01d5b362d6df18e9f336fc94ed971c == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_8e01d5b362d6df18e9f336fc94ed971c = MAKE_FUNCTION_FRAME(codeobj_8e01d5b362d6df18e9f336fc94ed971c, module_models, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_8e01d5b362d6df18e9f336fc94ed971c->m_type_description == NULL); - frame_8e01d5b362d6df18e9f336fc94ed971c = cache_frame_8e01d5b362d6df18e9f336fc94ed971c; - - // Push the new frame as the currently active one. - pushFrameStack(frame_8e01d5b362d6df18e9f336fc94ed971c); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_8e01d5b362d6df18e9f336fc94ed971c) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_args_element_name_1; - tmp_called_instance_1 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[18]); - - if (unlikely(tmp_called_instance_1 == NULL)) { - tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[18]); - } - - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 132; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_name); - tmp_args_element_name_1 = par_name; - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 132; - tmp_assign_source_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_1, mod_consts[19], tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 132; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_model_cls == NULL); - var_model_cls = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - CHECK_OBJECT(var_model_cls); - tmp_expression_name_1 = var_model_cls; - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[20]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 135; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_1 = mod_consts[21]; - CHECK_OBJECT(par_model_type); - tmp_dict_value_1 = par_model_type; - tmp_kwargs_name_1 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 135; - tmp_assign_source_2 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 135; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_model == NULL); - var_model = tmp_assign_source_2; - } - { - nuitka_bool tmp_condition_result_1; - int tmp_truth_name_1; - CHECK_OBJECT(par_is_eval); - tmp_truth_name_1 = CHECK_IF_TRUE(par_is_eval); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 137; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_called_instance_2; - PyObject *tmp_call_result_1; - CHECK_OBJECT(var_model); - tmp_called_instance_2 = var_model; - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 138; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[24]); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 138; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - branch_no_1:; - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_name_2; - PyObject *tmp_expression_name_2; - PyObject *tmp_args_element_name_2; - PyObject *tmp_called_name_3; - PyObject *tmp_expression_name_3; - PyObject *tmp_args_element_name_3; - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[48]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[48]); - } - - if (tmp_expression_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[49]); - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - if (var_model_cls == NULL) { - Py_DECREF(tmp_called_name_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[50]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_3 = var_model_cls; - tmp_called_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[51]); - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_2); - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - if (par_model_type == NULL) { - Py_DECREF(tmp_called_name_2); - Py_DECREF(tmp_called_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_3 = par_model_type; - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 141; - tmp_args_element_name_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_3, tmp_args_element_name_3); - Py_DECREF(tmp_called_name_3); - if (tmp_args_element_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_2); - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 141; - tmp_assign_source_3 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_2); - Py_DECREF(tmp_called_name_2); - Py_DECREF(tmp_args_element_name_2); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 141; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_cfg == NULL); - var_cfg = tmp_assign_source_3; - } - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - CHECK_OBJECT(var_cfg); - tmp_compexpr_left_1 = var_cfg; - tmp_compexpr_right_1 = Py_None; - tmp_condition_result_2 = (tmp_compexpr_left_1 != tmp_compexpr_right_1) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_4; - PyObject *tmp_expression_name_4; - CHECK_OBJECT(var_cfg); - tmp_expression_name_4 = var_cfg; - tmp_assign_source_4 = LOOKUP_ATTRIBUTE(tmp_expression_name_4, mod_consts[52]); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 143; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - assert(var_preprocess_cfg == NULL); - var_preprocess_cfg = tmp_assign_source_4; - } - // Tried code: - { - PyObject *tmp_assign_source_5; - PyObject *tmp_iter_arg_1; - PyObject *tmp_called_name_4; - PyObject *tmp_args_element_name_4; - tmp_called_name_4 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[53]); - - if (unlikely(tmp_called_name_4 == NULL)) { - tmp_called_name_4 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[53]); - } - - if (tmp_called_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 145; - type_description_1 = "oooooooooo"; - goto try_except_handler_2; - } - CHECK_OBJECT(var_preprocess_cfg); - tmp_args_element_name_4 = var_preprocess_cfg; - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 145; - tmp_iter_arg_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_4, tmp_args_element_name_4); - if (tmp_iter_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 145; - type_description_1 = "oooooooooo"; - goto try_except_handler_2; - } - tmp_assign_source_5 = MAKE_UNPACK_ITERATOR(tmp_iter_arg_1); - Py_DECREF(tmp_iter_arg_1); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 145; - type_description_1 = "oooooooooo"; - goto try_except_handler_2; - } - assert(tmp_tuple_unpack_1__source_iter == NULL); - tmp_tuple_unpack_1__source_iter = tmp_assign_source_5; - } - // Tried code: - { - PyObject *tmp_assign_source_6; - PyObject *tmp_unpack_1; - CHECK_OBJECT(tmp_tuple_unpack_1__source_iter); - tmp_unpack_1 = tmp_tuple_unpack_1__source_iter; - tmp_assign_source_6 = UNPACK_NEXT(tmp_unpack_1, 0, 2); - if (tmp_assign_source_6 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_1 = "oooooooooo"; - exception_lineno = 145; - goto try_except_handler_3; - } - assert(tmp_tuple_unpack_1__element_1 == NULL); - tmp_tuple_unpack_1__element_1 = tmp_assign_source_6; - } - { - PyObject *tmp_assign_source_7; - PyObject *tmp_unpack_2; - CHECK_OBJECT(tmp_tuple_unpack_1__source_iter); - tmp_unpack_2 = tmp_tuple_unpack_1__source_iter; - tmp_assign_source_7 = UNPACK_NEXT(tmp_unpack_2, 1, 2); - if (tmp_assign_source_7 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_1 = "oooooooooo"; - exception_lineno = 145; - goto try_except_handler_3; - } - assert(tmp_tuple_unpack_1__element_2 == NULL); - tmp_tuple_unpack_1__element_2 = tmp_assign_source_7; - } - { - PyObject *tmp_iterator_name_1; - CHECK_OBJECT(tmp_tuple_unpack_1__source_iter); - tmp_iterator_name_1 = tmp_tuple_unpack_1__source_iter; - // Check if iterator has left-over elements. - CHECK_OBJECT(tmp_iterator_name_1); assert(HAS_ITERNEXT(tmp_iterator_name_1)); - - tmp_iterator_attempt = (*Py_TYPE(tmp_iterator_name_1)->tp_iternext)(tmp_iterator_name_1); - - if (likely(tmp_iterator_attempt == NULL)) { - PyObject *error = GET_ERROR_OCCURRED(); - - if (error != NULL) { - if (EXCEPTION_MATCH_BOOL_SINGLE(error, PyExc_StopIteration)) { - CLEAR_ERROR_OCCURRED(); - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - type_description_1 = "oooooooooo"; - exception_lineno = 145; - goto try_except_handler_3; - } - } - } else { - Py_DECREF(tmp_iterator_attempt); - - exception_type = PyExc_ValueError; - Py_INCREF(PyExc_ValueError); - exception_value = mod_consts[54]; - Py_INCREF(exception_value); - exception_tb = NULL; - - type_description_1 = "oooooooooo"; - exception_lineno = 145; - goto try_except_handler_3; - } - } - goto try_end_1; - // Exception handler code: - try_except_handler_3:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_tuple_unpack_1__source_iter); - tmp_tuple_unpack_1__source_iter = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_2; - // End of try: - try_end_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_tuple_unpack_1__element_1); - tmp_tuple_unpack_1__element_1 = NULL; - Py_XDECREF(tmp_tuple_unpack_1__element_2); - tmp_tuple_unpack_1__element_2 = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto frame_exception_exit_1; - // End of try: - try_end_2:; - Py_XDECREF(tmp_tuple_unpack_1__source_iter); - tmp_tuple_unpack_1__source_iter = NULL; - { - PyObject *tmp_assign_source_8; - CHECK_OBJECT(tmp_tuple_unpack_1__element_1); - tmp_assign_source_8 = tmp_tuple_unpack_1__element_1; - assert(var_vis_processors == NULL); - Py_INCREF(tmp_assign_source_8); - var_vis_processors = tmp_assign_source_8; - } - Py_XDECREF(tmp_tuple_unpack_1__element_1); - tmp_tuple_unpack_1__element_1 = NULL; - - { - PyObject *tmp_assign_source_9; - CHECK_OBJECT(tmp_tuple_unpack_1__element_2); - tmp_assign_source_9 = tmp_tuple_unpack_1__element_2; - assert(var_txt_processors == NULL); - Py_INCREF(tmp_assign_source_9); - var_txt_processors = tmp_assign_source_9; - } - Py_XDECREF(tmp_tuple_unpack_1__element_2); - tmp_tuple_unpack_1__element_2 = NULL; - - Py_XDECREF(tmp_tuple_unpack_1__element_1); - tmp_tuple_unpack_1__element_1 = NULL; - Py_XDECREF(tmp_tuple_unpack_1__element_2); - tmp_tuple_unpack_1__element_2 = NULL; - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_assign_source_10; - PyObject *tmp_iter_arg_2; - tmp_iter_arg_2 = mod_consts[55]; - tmp_assign_source_10 = MAKE_ITERATOR_INFALLIBLE(tmp_iter_arg_2); - assert(!(tmp_assign_source_10 == NULL)); - assert(tmp_tuple_unpack_2__source_iter == NULL); - tmp_tuple_unpack_2__source_iter = tmp_assign_source_10; - } - { - PyObject *tmp_assign_source_11; - PyObject *tmp_unpack_3; - CHECK_OBJECT(tmp_tuple_unpack_2__source_iter); - tmp_unpack_3 = tmp_tuple_unpack_2__source_iter; - tmp_assign_source_11 = UNPACK_NEXT_INFALLIBLE(tmp_unpack_3); - assert(!(tmp_assign_source_11 == NULL)); - assert(tmp_tuple_unpack_2__element_1 == NULL); - tmp_tuple_unpack_2__element_1 = tmp_assign_source_11; - } - // Tried code: - // Tried code: - { - PyObject *tmp_assign_source_12; - PyObject *tmp_unpack_4; - CHECK_OBJECT(tmp_tuple_unpack_2__source_iter); - tmp_unpack_4 = tmp_tuple_unpack_2__source_iter; - tmp_assign_source_12 = UNPACK_NEXT(tmp_unpack_4, 1, 2); - if (tmp_assign_source_12 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_1 = "oooooooooo"; - exception_lineno = 147; - goto try_except_handler_5; - } - assert(tmp_tuple_unpack_2__element_2 == NULL); - tmp_tuple_unpack_2__element_2 = tmp_assign_source_12; - } - { - PyObject *tmp_iterator_name_2; - CHECK_OBJECT(tmp_tuple_unpack_2__source_iter); - tmp_iterator_name_2 = tmp_tuple_unpack_2__source_iter; - // Check if iterator has left-over elements. - CHECK_OBJECT(tmp_iterator_name_2); assert(HAS_ITERNEXT(tmp_iterator_name_2)); - - tmp_iterator_attempt = (*Py_TYPE(tmp_iterator_name_2)->tp_iternext)(tmp_iterator_name_2); - - if (likely(tmp_iterator_attempt == NULL)) { - PyObject *error = GET_ERROR_OCCURRED(); - - if (error != NULL) { - if (EXCEPTION_MATCH_BOOL_SINGLE(error, PyExc_StopIteration)) { - CLEAR_ERROR_OCCURRED(); - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - type_description_1 = "oooooooooo"; - exception_lineno = 147; - goto try_except_handler_5; - } - } - } else { - Py_DECREF(tmp_iterator_attempt); - - exception_type = PyExc_ValueError; - Py_INCREF(PyExc_ValueError); - exception_value = mod_consts[54]; - Py_INCREF(exception_value); - exception_tb = NULL; - - type_description_1 = "oooooooooo"; - exception_lineno = 147; - goto try_except_handler_5; - } - } - goto try_end_3; - // Exception handler code: - try_except_handler_5:; - exception_keeper_type_3 = exception_type; - exception_keeper_value_3 = exception_value; - exception_keeper_tb_3 = exception_tb; - exception_keeper_lineno_3 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_tuple_unpack_2__source_iter); - tmp_tuple_unpack_2__source_iter = NULL; - // Re-raise. - exception_type = exception_keeper_type_3; - exception_value = exception_keeper_value_3; - exception_tb = exception_keeper_tb_3; - exception_lineno = exception_keeper_lineno_3; - - goto try_except_handler_4; - // End of try: - try_end_3:; - goto try_end_4; - // Exception handler code: - try_except_handler_4:; - exception_keeper_type_4 = exception_type; - exception_keeper_value_4 = exception_value; - exception_keeper_tb_4 = exception_tb; - exception_keeper_lineno_4 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(tmp_tuple_unpack_2__element_1); - Py_DECREF(tmp_tuple_unpack_2__element_1); - tmp_tuple_unpack_2__element_1 = NULL; - Py_XDECREF(tmp_tuple_unpack_2__element_2); - tmp_tuple_unpack_2__element_2 = NULL; - // Re-raise. - exception_type = exception_keeper_type_4; - exception_value = exception_keeper_value_4; - exception_tb = exception_keeper_tb_4; - exception_lineno = exception_keeper_lineno_4; - - goto frame_exception_exit_1; - // End of try: - try_end_4:; - Py_XDECREF(tmp_tuple_unpack_2__source_iter); - tmp_tuple_unpack_2__source_iter = NULL; - { - PyObject *tmp_assign_source_13; - CHECK_OBJECT(tmp_tuple_unpack_2__element_1); - tmp_assign_source_13 = tmp_tuple_unpack_2__element_1; - assert(var_vis_processors == NULL); - Py_INCREF(tmp_assign_source_13); - var_vis_processors = tmp_assign_source_13; - } - Py_XDECREF(tmp_tuple_unpack_2__element_1); - tmp_tuple_unpack_2__element_1 = NULL; - - { - PyObject *tmp_assign_source_14; - CHECK_OBJECT(tmp_tuple_unpack_2__element_2); - tmp_assign_source_14 = tmp_tuple_unpack_2__element_2; - assert(var_txt_processors == NULL); - Py_INCREF(tmp_assign_source_14); - var_txt_processors = tmp_assign_source_14; - } - Py_XDECREF(tmp_tuple_unpack_2__element_2); - tmp_tuple_unpack_2__element_2 = NULL; - - Py_XDECREF(tmp_tuple_unpack_2__element_1); - tmp_tuple_unpack_2__element_1 = NULL; - Py_XDECREF(tmp_tuple_unpack_2__element_2); - tmp_tuple_unpack_2__element_2 = NULL; - { - PyObject *tmp_called_name_5; - PyObject *tmp_expression_name_5; - PyObject *tmp_call_result_2; - PyObject *tmp_args_element_name_5; - PyObject *tmp_string_concat_values_1; - PyObject *tmp_tuple_element_1; - tmp_expression_name_5 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[56]); - - if (unlikely(tmp_expression_name_5 == NULL)) { - tmp_expression_name_5 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[56]); - } - - if (tmp_expression_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 148; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_5 = LOOKUP_ATTRIBUTE(tmp_expression_name_5, mod_consts[57]); - if (tmp_called_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 148; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_tuple_element_1 = mod_consts[58]; - tmp_string_concat_values_1 = PyTuple_New(5); - { - PyObject *tmp_format_value_1; - PyObject *tmp_format_spec_1; - PyObject *tmp_format_value_2; - PyObject *tmp_format_spec_2; - PyTuple_SET_ITEM0(tmp_string_concat_values_1, 0, tmp_tuple_element_1); - if (par_name == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[44]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 149; - type_description_1 = "oooooooooo"; - goto tuple_build_exception_1; - } - - tmp_format_value_1 = par_name; - tmp_format_spec_1 = mod_consts[59]; - tmp_tuple_element_1 = BUILTIN_FORMAT(tmp_format_value_1, tmp_format_spec_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 149; - type_description_1 = "oooooooooo"; - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_string_concat_values_1, 1, tmp_tuple_element_1); - tmp_tuple_element_1 = mod_consts[60]; - PyTuple_SET_ITEM0(tmp_string_concat_values_1, 2, tmp_tuple_element_1); - if (par_model_type == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 149; - type_description_1 = "oooooooooo"; - goto tuple_build_exception_1; - } - - tmp_format_value_2 = par_model_type; - tmp_format_spec_2 = mod_consts[59]; - tmp_tuple_element_1 = BUILTIN_FORMAT(tmp_format_value_2, tmp_format_spec_2); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 149; - type_description_1 = "oooooooooo"; - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_string_concat_values_1, 3, tmp_tuple_element_1); - tmp_tuple_element_1 = mod_consts[61]; - PyTuple_SET_ITEM0(tmp_string_concat_values_1, 4, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_called_name_5); - Py_DECREF(tmp_string_concat_values_1); - goto frame_exception_exit_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_args_element_name_5 = PyUnicode_Join(mod_consts[59], tmp_string_concat_values_1); - Py_DECREF(tmp_string_concat_values_1); - if (tmp_args_element_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_5); - - exception_lineno = 149; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 148; - tmp_call_result_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_5, tmp_args_element_name_5); - Py_DECREF(tmp_called_name_5); - Py_DECREF(tmp_args_element_name_5); - if (tmp_call_result_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 148; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_2); - } - branch_end_2:; - { - nuitka_bool tmp_condition_result_3; - int tmp_or_left_truth_1; - nuitka_bool tmp_or_left_value_1; - nuitka_bool tmp_or_right_value_1; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_tmp_or_left_value_1_object_1; - int tmp_truth_name_2; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - PyObject *tmp_called_instance_3; - CHECK_OBJECT(par_device); - tmp_compexpr_left_2 = par_device; - tmp_compexpr_right_2 = mod_consts[25]; - tmp_tmp_or_left_value_1_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_2, tmp_compexpr_right_2); - if (tmp_tmp_or_left_value_1_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 155; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_2 = CHECK_IF_TRUE(tmp_tmp_or_left_value_1_object_1); - if (tmp_truth_name_2 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_or_left_value_1_object_1); - - exception_lineno = 155; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_or_left_value_1 = tmp_truth_name_2 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_or_left_value_1_object_1); - tmp_or_left_truth_1 = tmp_or_left_value_1 == NUITKA_BOOL_TRUE ? 1 : 0; - if (tmp_or_left_truth_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 155; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - if (tmp_or_left_truth_1 == 1) { - goto or_left_1; - } else { - goto or_right_1; - } - or_right_1:; - CHECK_OBJECT(par_device); - tmp_compexpr_left_3 = par_device; - tmp_called_instance_3 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[62]); - - if (unlikely(tmp_called_instance_3 == NULL)) { - tmp_called_instance_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[62]); - } - - if (tmp_called_instance_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 155; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 155; - tmp_compexpr_right_3 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_3, - mod_consts[63], - &PyTuple_GET_ITEM(mod_consts[64], 0) - ); - - if (tmp_compexpr_right_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 155; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_or_right_value_1 = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(tmp_compexpr_left_3, tmp_compexpr_right_3); - Py_DECREF(tmp_compexpr_right_3); - if (tmp_or_right_value_1 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 155; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_3 = tmp_or_right_value_1; - goto or_end_1; - or_left_1:; - tmp_condition_result_3 = tmp_or_left_value_1; - or_end_1:; - if (tmp_condition_result_3 == NUITKA_BOOL_TRUE) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - assert(tmp_condition_result_3 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_3:; - { - PyObject *tmp_assign_source_15; - PyObject *tmp_called_instance_4; - if (var_model == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[23]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 156; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_4 = var_model; - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 156; - tmp_assign_source_15 = CALL_METHOD_NO_ARGS(tmp_called_instance_4, mod_consts[26]); - if (tmp_assign_source_15 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 156; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_model; - var_model = tmp_assign_source_15; - Py_XDECREF(old); - } - - } - branch_no_3:; - { - PyObject *tmp_tuple_element_2; - PyObject *tmp_called_instance_5; - PyObject *tmp_args_element_name_6; - if (var_model == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[23]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 158; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_5 = var_model; - CHECK_OBJECT(par_device); - tmp_args_element_name_6 = par_device; - frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame.f_lineno = 158; - tmp_tuple_element_2 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_5, mod_consts[27], tmp_args_element_name_6); - if (tmp_tuple_element_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 158; - type_description_1 = "oooooooooo"; - goto frame_exception_exit_1; - } - tmp_return_value = PyTuple_New(3); - PyTuple_SET_ITEM(tmp_return_value, 0, tmp_tuple_element_2); - CHECK_OBJECT(var_vis_processors); - tmp_tuple_element_2 = var_vis_processors; - PyTuple_SET_ITEM0(tmp_return_value, 1, tmp_tuple_element_2); - CHECK_OBJECT(var_txt_processors); - tmp_tuple_element_2 = var_txt_processors; - PyTuple_SET_ITEM0(tmp_return_value, 2, tmp_tuple_element_2); - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_8e01d5b362d6df18e9f336fc94ed971c); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_8e01d5b362d6df18e9f336fc94ed971c); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_8e01d5b362d6df18e9f336fc94ed971c); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_8e01d5b362d6df18e9f336fc94ed971c, exception_lineno); - } else if (exception_tb->tb_frame != &frame_8e01d5b362d6df18e9f336fc94ed971c->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_8e01d5b362d6df18e9f336fc94ed971c, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_8e01d5b362d6df18e9f336fc94ed971c, - type_description_1, - par_name, - par_model_type, - par_is_eval, - par_device, - var_model_cls, - var_model, - var_cfg, - var_preprocess_cfg, - var_vis_processors, - var_txt_processors - ); - - - // Release cached frame if used for exception. - if (frame_8e01d5b362d6df18e9f336fc94ed971c == cache_frame_8e01d5b362d6df18e9f336fc94ed971c) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_8e01d5b362d6df18e9f336fc94ed971c); - cache_frame_8e01d5b362d6df18e9f336fc94ed971c = NULL; - } - - assertFrameObject(frame_8e01d5b362d6df18e9f336fc94ed971c); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_name); - par_name = NULL; - Py_XDECREF(par_model_type); - par_model_type = NULL; - CHECK_OBJECT(par_is_eval); - Py_DECREF(par_is_eval); - par_is_eval = NULL; - Py_XDECREF(par_device); - par_device = NULL; - Py_XDECREF(var_model_cls); - var_model_cls = NULL; - Py_XDECREF(var_model); - var_model = NULL; - Py_XDECREF(var_cfg); - var_cfg = NULL; - Py_XDECREF(var_preprocess_cfg); - var_preprocess_cfg = NULL; - CHECK_OBJECT(var_vis_processors); - Py_DECREF(var_vis_processors); - var_vis_processors = NULL; - CHECK_OBJECT(var_txt_processors); - Py_DECREF(var_txt_processors); - var_txt_processors = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_5 = exception_type; - exception_keeper_value_5 = exception_value; - exception_keeper_tb_5 = exception_tb; - exception_keeper_lineno_5 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_name); - par_name = NULL; - Py_XDECREF(par_model_type); - par_model_type = NULL; - CHECK_OBJECT(par_is_eval); - Py_DECREF(par_is_eval); - par_is_eval = NULL; - Py_XDECREF(par_device); - par_device = NULL; - Py_XDECREF(var_model_cls); - var_model_cls = NULL; - Py_XDECREF(var_model); - var_model = NULL; - Py_XDECREF(var_cfg); - var_cfg = NULL; - Py_XDECREF(var_preprocess_cfg); - var_preprocess_cfg = NULL; - Py_XDECREF(var_vis_processors); - var_vis_processors = NULL; - Py_XDECREF(var_txt_processors); - var_txt_processors = NULL; - // Re-raise. - exception_type = exception_keeper_type_5; - exception_value = exception_keeper_value_5; - exception_tb = exception_keeper_tb_5; - exception_lineno = exception_keeper_lineno_5; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__4___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *outline_0_var_k = NULL; - PyObject *outline_0_var_v = NULL; - PyObject *tmp_dictcontraction$tuple_unpack_1__element_1 = NULL; - PyObject *tmp_dictcontraction$tuple_unpack_1__element_2 = NULL; - PyObject *tmp_dictcontraction$tuple_unpack_1__source_iter = NULL; - PyObject *tmp_dictcontraction_1__$0 = NULL; - PyObject *tmp_dictcontraction_1__contraction = NULL; - PyObject *tmp_dictcontraction_1__iter_value_0 = NULL; - struct Nuitka_FrameObject *frame_0f2082830916959456ffaf17ca3f97c9; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - struct Nuitka_FrameObject *frame_4777da0a37fa73ff6635d4eaff77d3fc_2; - NUITKA_MAY_BE_UNUSED char const *type_description_2 = NULL; - PyObject *tmp_iterator_attempt; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - int tmp_res; - PyObject *exception_keeper_type_3; - PyObject *exception_keeper_value_3; - PyTracebackObject *exception_keeper_tb_3; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; - static struct Nuitka_FrameObject *cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2 = NULL; - PyObject *exception_keeper_type_4; - PyObject *exception_keeper_value_4; - PyTracebackObject *exception_keeper_tb_4; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_0f2082830916959456ffaf17ca3f97c9 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_5; - PyObject *exception_keeper_value_5; - PyTracebackObject *exception_keeper_tb_5; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_0f2082830916959456ffaf17ca3f97c9)) { - Py_XDECREF(cache_frame_0f2082830916959456ffaf17ca3f97c9); - -#if _DEBUG_REFCOUNTS - if (cache_frame_0f2082830916959456ffaf17ca3f97c9 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_0f2082830916959456ffaf17ca3f97c9 = MAKE_FUNCTION_FRAME(codeobj_0f2082830916959456ffaf17ca3f97c9, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_0f2082830916959456ffaf17ca3f97c9->m_type_description == NULL); - frame_0f2082830916959456ffaf17ca3f97c9 = cache_frame_0f2082830916959456ffaf17ca3f97c9; - - // Push the new frame as the currently active one. - pushFrameStack(frame_0f2082830916959456ffaf17ca3f97c9); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_0f2082830916959456ffaf17ca3f97c9) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_iter_arg_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[18]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[18]); - } - - if (tmp_expression_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 175; - type_description_1 = "o"; - goto try_except_handler_2; - } - tmp_expression_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[66]); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 175; - type_description_1 = "o"; - goto try_except_handler_2; - } - tmp_subscript_name_1 = mod_consts[67]; - tmp_called_instance_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_1, tmp_subscript_name_1); - Py_DECREF(tmp_expression_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 175; - type_description_1 = "o"; - goto try_except_handler_2; - } - frame_0f2082830916959456ffaf17ca3f97c9->m_frame.f_lineno = 175; - tmp_iter_arg_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[10]); - Py_DECREF(tmp_called_instance_1); - if (tmp_iter_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 175; - type_description_1 = "o"; - goto try_except_handler_2; - } - tmp_assign_source_1 = MAKE_ITERATOR(tmp_iter_arg_1); - Py_DECREF(tmp_iter_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 173; - type_description_1 = "o"; - goto try_except_handler_2; - } - assert(tmp_dictcontraction_1__$0 == NULL); - tmp_dictcontraction_1__$0 = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyDict_New(); - assert(tmp_dictcontraction_1__contraction == NULL); - tmp_dictcontraction_1__contraction = tmp_assign_source_2; - } - if (isFrameUnusable(cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2)) { - Py_XDECREF(cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2); - -#if _DEBUG_REFCOUNTS - if (cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2 = MAKE_FUNCTION_FRAME(codeobj_4777da0a37fa73ff6635d4eaff77d3fc, module_models, sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2->m_type_description == NULL); - frame_4777da0a37fa73ff6635d4eaff77d3fc_2 = cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2; - - // Push the new frame as the currently active one. - pushFrameStack(frame_4777da0a37fa73ff6635d4eaff77d3fc_2); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_4777da0a37fa73ff6635d4eaff77d3fc_2) == 2); // Frame stack - - // Framed code: - // Tried code: - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_3; - CHECK_OBJECT(tmp_dictcontraction_1__$0); - tmp_next_source_1 = tmp_dictcontraction_1__$0; - tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_3 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - type_description_2 = "oo"; - exception_lineno = 173; - goto try_except_handler_3; - } - } - - { - PyObject *old = tmp_dictcontraction_1__iter_value_0; - tmp_dictcontraction_1__iter_value_0 = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - // Tried code: - { - PyObject *tmp_assign_source_4; - PyObject *tmp_iter_arg_2; - CHECK_OBJECT(tmp_dictcontraction_1__iter_value_0); - tmp_iter_arg_2 = tmp_dictcontraction_1__iter_value_0; - tmp_assign_source_4 = MAKE_UNPACK_ITERATOR(tmp_iter_arg_2); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 173; - type_description_2 = "oo"; - goto try_except_handler_4; - } - { - PyObject *old = tmp_dictcontraction$tuple_unpack_1__source_iter; - tmp_dictcontraction$tuple_unpack_1__source_iter = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - // Tried code: - { - PyObject *tmp_assign_source_5; - PyObject *tmp_unpack_1; - CHECK_OBJECT(tmp_dictcontraction$tuple_unpack_1__source_iter); - tmp_unpack_1 = tmp_dictcontraction$tuple_unpack_1__source_iter; - tmp_assign_source_5 = UNPACK_NEXT(tmp_unpack_1, 0, 2); - if (tmp_assign_source_5 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_2 = "oo"; - exception_lineno = 173; - goto try_except_handler_5; - } - { - PyObject *old = tmp_dictcontraction$tuple_unpack_1__element_1; - tmp_dictcontraction$tuple_unpack_1__element_1 = tmp_assign_source_5; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_6; - PyObject *tmp_unpack_2; - CHECK_OBJECT(tmp_dictcontraction$tuple_unpack_1__source_iter); - tmp_unpack_2 = tmp_dictcontraction$tuple_unpack_1__source_iter; - tmp_assign_source_6 = UNPACK_NEXT(tmp_unpack_2, 1, 2); - if (tmp_assign_source_6 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_2 = "oo"; - exception_lineno = 173; - goto try_except_handler_5; - } - { - PyObject *old = tmp_dictcontraction$tuple_unpack_1__element_2; - tmp_dictcontraction$tuple_unpack_1__element_2 = tmp_assign_source_6; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_iterator_name_1; - CHECK_OBJECT(tmp_dictcontraction$tuple_unpack_1__source_iter); - tmp_iterator_name_1 = tmp_dictcontraction$tuple_unpack_1__source_iter; - // Check if iterator has left-over elements. - CHECK_OBJECT(tmp_iterator_name_1); assert(HAS_ITERNEXT(tmp_iterator_name_1)); - - tmp_iterator_attempt = (*Py_TYPE(tmp_iterator_name_1)->tp_iternext)(tmp_iterator_name_1); - - if (likely(tmp_iterator_attempt == NULL)) { - PyObject *error = GET_ERROR_OCCURRED(); - - if (error != NULL) { - if (EXCEPTION_MATCH_BOOL_SINGLE(error, PyExc_StopIteration)) { - CLEAR_ERROR_OCCURRED(); - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - type_description_2 = "oo"; - exception_lineno = 173; - goto try_except_handler_5; - } - } - } else { - Py_DECREF(tmp_iterator_attempt); - - exception_type = PyExc_ValueError; - Py_INCREF(PyExc_ValueError); - exception_value = mod_consts[54]; - Py_INCREF(exception_value); - exception_tb = NULL; - - type_description_2 = "oo"; - exception_lineno = 173; - goto try_except_handler_5; - } - } - goto try_end_1; - // Exception handler code: - try_except_handler_5:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__source_iter); - tmp_dictcontraction$tuple_unpack_1__source_iter = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_4; - // End of try: - try_end_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_4:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__element_1); - tmp_dictcontraction$tuple_unpack_1__element_1 = NULL; - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__element_2); - tmp_dictcontraction$tuple_unpack_1__element_2 = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto try_except_handler_3; - // End of try: - try_end_2:; - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__source_iter); - tmp_dictcontraction$tuple_unpack_1__source_iter = NULL; - { - PyObject *tmp_assign_source_7; - CHECK_OBJECT(tmp_dictcontraction$tuple_unpack_1__element_1); - tmp_assign_source_7 = tmp_dictcontraction$tuple_unpack_1__element_1; - { - PyObject *old = outline_0_var_k; - outline_0_var_k = tmp_assign_source_7; - Py_INCREF(outline_0_var_k); - Py_XDECREF(old); - } - - } - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__element_1); - tmp_dictcontraction$tuple_unpack_1__element_1 = NULL; - - { - PyObject *tmp_assign_source_8; - CHECK_OBJECT(tmp_dictcontraction$tuple_unpack_1__element_2); - tmp_assign_source_8 = tmp_dictcontraction$tuple_unpack_1__element_2; - { - PyObject *old = outline_0_var_v; - outline_0_var_v = tmp_assign_source_8; - Py_INCREF(outline_0_var_v); - Py_XDECREF(old); - } - - } - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__element_2); - tmp_dictcontraction$tuple_unpack_1__element_2 = NULL; - - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__element_1); - tmp_dictcontraction$tuple_unpack_1__element_1 = NULL; - Py_XDECREF(tmp_dictcontraction$tuple_unpack_1__element_2); - tmp_dictcontraction$tuple_unpack_1__element_2 = NULL; - { - PyObject *tmp_dictset38_key_1; - PyObject *tmp_dictset38_value_1; - PyObject *tmp_list_arg_1; - PyObject *tmp_called_instance_2; - PyObject *tmp_expression_name_3; - PyObject *tmp_dictset38_dict_1; - CHECK_OBJECT(outline_0_var_k); - tmp_dictset38_key_1 = outline_0_var_k; - CHECK_OBJECT(outline_0_var_v); - tmp_expression_name_3 = outline_0_var_v; - tmp_called_instance_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[68]); - if (tmp_called_instance_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 174; - type_description_2 = "oo"; - goto try_except_handler_3; - } - frame_4777da0a37fa73ff6635d4eaff77d3fc_2->m_frame.f_lineno = 174; - tmp_list_arg_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[2]); - Py_DECREF(tmp_called_instance_2); - if (tmp_list_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 174; - type_description_2 = "oo"; - goto try_except_handler_3; - } - tmp_dictset38_value_1 = MAKE_LIST(tmp_list_arg_1); - Py_DECREF(tmp_list_arg_1); - if (tmp_dictset38_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 174; - type_description_2 = "oo"; - goto try_except_handler_3; - } - CHECK_OBJECT(tmp_dictcontraction_1__contraction); - tmp_dictset38_dict_1 = tmp_dictcontraction_1__contraction; - tmp_res = PyDict_SetItem(tmp_dictset38_dict_1, tmp_dictset38_key_1, tmp_dictset38_value_1); - Py_DECREF(tmp_dictset38_value_1); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 173; - type_description_2 = "oo"; - goto try_except_handler_3; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 173; - type_description_2 = "oo"; - goto try_except_handler_3; - } - goto loop_start_1; - loop_end_1:; - CHECK_OBJECT(tmp_dictcontraction_1__contraction); - tmp_assattr_name_1 = tmp_dictcontraction_1__contraction; - Py_INCREF(tmp_assattr_name_1); - goto try_return_handler_3; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_3:; - Py_XDECREF(tmp_dictcontraction_1__$0); - tmp_dictcontraction_1__$0 = NULL; - CHECK_OBJECT(tmp_dictcontraction_1__contraction); - Py_DECREF(tmp_dictcontraction_1__contraction); - tmp_dictcontraction_1__contraction = NULL; - Py_XDECREF(tmp_dictcontraction_1__iter_value_0); - tmp_dictcontraction_1__iter_value_0 = NULL; - goto frame_return_exit_1; - // Exception handler code: - try_except_handler_3:; - exception_keeper_type_3 = exception_type; - exception_keeper_value_3 = exception_value; - exception_keeper_tb_3 = exception_tb; - exception_keeper_lineno_3 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_dictcontraction_1__$0); - tmp_dictcontraction_1__$0 = NULL; - CHECK_OBJECT(tmp_dictcontraction_1__contraction); - Py_DECREF(tmp_dictcontraction_1__contraction); - tmp_dictcontraction_1__contraction = NULL; - Py_XDECREF(tmp_dictcontraction_1__iter_value_0); - tmp_dictcontraction_1__iter_value_0 = NULL; - // Re-raise. - exception_type = exception_keeper_type_3; - exception_value = exception_keeper_value_3; - exception_tb = exception_keeper_tb_3; - exception_lineno = exception_keeper_lineno_3; - - goto frame_exception_exit_2; - // End of try: - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4777da0a37fa73ff6635d4eaff77d3fc_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4777da0a37fa73ff6635d4eaff77d3fc_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_2; - - frame_exception_exit_2:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4777da0a37fa73ff6635d4eaff77d3fc_2); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_4777da0a37fa73ff6635d4eaff77d3fc_2, exception_lineno); - } else if (exception_tb->tb_frame != &frame_4777da0a37fa73ff6635d4eaff77d3fc_2->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_4777da0a37fa73ff6635d4eaff77d3fc_2, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_4777da0a37fa73ff6635d4eaff77d3fc_2, - type_description_2, - outline_0_var_k, - outline_0_var_v - ); - - - // Release cached frame if used for exception. - if (frame_4777da0a37fa73ff6635d4eaff77d3fc_2 == cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2); - cache_frame_4777da0a37fa73ff6635d4eaff77d3fc_2 = NULL; - } - - assertFrameObject(frame_4777da0a37fa73ff6635d4eaff77d3fc_2); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_1; - - frame_no_exception_1:; - goto skip_nested_handling_1; - nested_frame_exit_1:; - type_description_1 = "o"; - goto try_except_handler_2; - skip_nested_handling_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_2:; - Py_XDECREF(outline_0_var_k); - outline_0_var_k = NULL; - Py_XDECREF(outline_0_var_v); - outline_0_var_v = NULL; - goto outline_result_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_4 = exception_type; - exception_keeper_value_4 = exception_value; - exception_keeper_tb_4 = exception_tb; - exception_keeper_lineno_4 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(outline_0_var_k); - outline_0_var_k = NULL; - Py_XDECREF(outline_0_var_v); - outline_0_var_v = NULL; - // Re-raise. - exception_type = exception_keeper_type_4; - exception_value = exception_keeper_value_4; - exception_tb = exception_keeper_tb_4; - exception_lineno = exception_keeper_lineno_4; - - goto outline_exception_1; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_1:; - exception_lineno = 173; - goto frame_exception_exit_1; - outline_result_1:; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[69], tmp_assattr_name_1); - Py_DECREF(tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 173; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0f2082830916959456ffaf17ca3f97c9); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_2; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0f2082830916959456ffaf17ca3f97c9); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_0f2082830916959456ffaf17ca3f97c9, exception_lineno); - } else if (exception_tb->tb_frame != &frame_0f2082830916959456ffaf17ca3f97c9->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_0f2082830916959456ffaf17ca3f97c9, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_0f2082830916959456ffaf17ca3f97c9, - type_description_1, - par_self - ); - - - // Release cached frame if used for exception. - if (frame_0f2082830916959456ffaf17ca3f97c9 == cache_frame_0f2082830916959456ffaf17ca3f97c9) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_0f2082830916959456ffaf17ca3f97c9); - cache_frame_0f2082830916959456ffaf17ca3f97c9 = NULL; - } - - assertFrameObject(frame_0f2082830916959456ffaf17ca3f97c9); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_2:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_5 = exception_type; - exception_keeper_value_5 = exception_value; - exception_keeper_tb_5 = exception_tb; - exception_keeper_lineno_5 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - // Re-raise. - exception_type = exception_keeper_type_5; - exception_value = exception_keeper_value_5; - exception_tb = exception_keeper_tb_5; - exception_lineno = exception_keeper_lineno_5; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__5___str__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *outline_0_var_name = NULL; - PyObject *outline_0_var_types = NULL; - PyObject *tmp_listcomp$tuple_unpack_1__element_1 = NULL; - PyObject *tmp_listcomp$tuple_unpack_1__element_2 = NULL; - PyObject *tmp_listcomp$tuple_unpack_1__source_iter = NULL; - PyObject *tmp_listcomp_1__$0 = NULL; - PyObject *tmp_listcomp_1__contraction = NULL; - PyObject *tmp_listcomp_1__iter_value_0 = NULL; - struct Nuitka_FrameObject *frame_a1ff221c4fb1e4ec4f516f82b218dca5; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - struct Nuitka_FrameObject *frame_b1db33e43955f87a8a2ee720ed8431ae_2; - NUITKA_MAY_BE_UNUSED char const *type_description_2 = NULL; - PyObject *tmp_iterator_attempt; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - bool tmp_result; - PyObject *exception_keeper_type_3; - PyObject *exception_keeper_value_3; - PyTracebackObject *exception_keeper_tb_3; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; - static struct Nuitka_FrameObject *cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2 = NULL; - PyObject *exception_keeper_type_4; - PyObject *exception_keeper_value_4; - PyTracebackObject *exception_keeper_tb_4; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4; - static struct Nuitka_FrameObject *cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5 = NULL; - PyObject *exception_keeper_type_5; - PyObject *exception_keeper_value_5; - PyTracebackObject *exception_keeper_tb_5; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5)) { - Py_XDECREF(cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5); - -#if _DEBUG_REFCOUNTS - if (cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5 = MAKE_FUNCTION_FRAME(codeobj_a1ff221c4fb1e4ec4f516f82b218dca5, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5->m_type_description == NULL); - frame_a1ff221c4fb1e4ec4f516f82b218dca5 = cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5; - - // Push the new frame as the currently active one. - pushFrameStack(frame_a1ff221c4fb1e4ec4f516f82b218dca5); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_a1ff221c4fb1e4ec4f516f82b218dca5) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_left_name_1; - PyObject *tmp_left_name_2; - PyObject *tmp_left_name_3; - PyObject *tmp_left_name_4; - PyObject *tmp_right_name_1; - PyObject *tmp_string_concat_values_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_format_value_1; - PyObject *tmp_format_spec_1; - PyObject *tmp_right_name_2; - PyObject *tmp_right_name_3; - PyObject *tmp_right_name_4; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_args_element_name_1; - tmp_left_name_4 = mod_consts[70]; - tmp_format_value_1 = mod_consts[71]; - tmp_format_spec_1 = mod_consts[72]; - tmp_tuple_element_1 = BUILTIN_FORMAT(tmp_format_value_1, tmp_format_spec_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - tmp_string_concat_values_1 = PyTuple_New(2); - PyTuple_SET_ITEM(tmp_string_concat_values_1, 0, tmp_tuple_element_1); - tmp_tuple_element_1 = mod_consts[73]; - PyTuple_SET_ITEM0(tmp_string_concat_values_1, 1, tmp_tuple_element_1); - tmp_right_name_1 = PyUnicode_Join(mod_consts[59], tmp_string_concat_values_1); - Py_DECREF(tmp_string_concat_values_1); - if (tmp_right_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - tmp_left_name_3 = BINARY_OPERATION_ADD_OBJECT_UNICODE_UNICODE(tmp_left_name_4, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - assert(!(tmp_left_name_3 == NULL)); - tmp_right_name_2 = mod_consts[74]; - tmp_left_name_2 = BINARY_OPERATION_ADD_OBJECT_UNICODE_UNICODE(tmp_left_name_3, tmp_right_name_2); - Py_DECREF(tmp_left_name_3); - assert(!(tmp_left_name_2 == NULL)); - tmp_right_name_3 = mod_consts[75]; - tmp_left_name_1 = BINARY_OPERATION_ADD_OBJECT_UNICODE_UNICODE(tmp_left_name_2, tmp_right_name_3); - Py_DECREF(tmp_left_name_2); - assert(!(tmp_left_name_1 == NULL)); - tmp_expression_name_1 = mod_consts[75]; - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[76]); - assert(!(tmp_called_name_1 == NULL)); - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_iter_arg_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_expression_name_2; - CHECK_OBJECT(par_self); - tmp_expression_name_2 = par_self; - tmp_called_instance_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[69]); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 188; - type_description_1 = "o"; - goto try_except_handler_2; - } - frame_a1ff221c4fb1e4ec4f516f82b218dca5->m_frame.f_lineno = 188; - tmp_iter_arg_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[10]); - Py_DECREF(tmp_called_instance_1); - if (tmp_iter_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 188; - type_description_1 = "o"; - goto try_except_handler_2; - } - tmp_assign_source_1 = MAKE_ITERATOR(tmp_iter_arg_1); - Py_DECREF(tmp_iter_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 186; - type_description_1 = "o"; - goto try_except_handler_2; - } - assert(tmp_listcomp_1__$0 == NULL); - tmp_listcomp_1__$0 = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyList_New(0); - assert(tmp_listcomp_1__contraction == NULL); - tmp_listcomp_1__contraction = tmp_assign_source_2; - } - if (isFrameUnusable(cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2)) { - Py_XDECREF(cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2); - -#if _DEBUG_REFCOUNTS - if (cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2 = MAKE_FUNCTION_FRAME(codeobj_b1db33e43955f87a8a2ee720ed8431ae, module_models, sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2->m_type_description == NULL); - frame_b1db33e43955f87a8a2ee720ed8431ae_2 = cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2; - - // Push the new frame as the currently active one. - pushFrameStack(frame_b1db33e43955f87a8a2ee720ed8431ae_2); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_b1db33e43955f87a8a2ee720ed8431ae_2) == 2); // Frame stack - - // Framed code: - // Tried code: - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_3; - CHECK_OBJECT(tmp_listcomp_1__$0); - tmp_next_source_1 = tmp_listcomp_1__$0; - tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_3 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - type_description_2 = "oo"; - exception_lineno = 186; - goto try_except_handler_3; - } - } - - { - PyObject *old = tmp_listcomp_1__iter_value_0; - tmp_listcomp_1__iter_value_0 = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - // Tried code: - { - PyObject *tmp_assign_source_4; - PyObject *tmp_iter_arg_2; - CHECK_OBJECT(tmp_listcomp_1__iter_value_0); - tmp_iter_arg_2 = tmp_listcomp_1__iter_value_0; - tmp_assign_source_4 = MAKE_UNPACK_ITERATOR(tmp_iter_arg_2); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 186; - type_description_2 = "oo"; - goto try_except_handler_4; - } - { - PyObject *old = tmp_listcomp$tuple_unpack_1__source_iter; - tmp_listcomp$tuple_unpack_1__source_iter = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - // Tried code: - { - PyObject *tmp_assign_source_5; - PyObject *tmp_unpack_1; - CHECK_OBJECT(tmp_listcomp$tuple_unpack_1__source_iter); - tmp_unpack_1 = tmp_listcomp$tuple_unpack_1__source_iter; - tmp_assign_source_5 = UNPACK_NEXT(tmp_unpack_1, 0, 2); - if (tmp_assign_source_5 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_2 = "oo"; - exception_lineno = 186; - goto try_except_handler_5; - } - { - PyObject *old = tmp_listcomp$tuple_unpack_1__element_1; - tmp_listcomp$tuple_unpack_1__element_1 = tmp_assign_source_5; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_6; - PyObject *tmp_unpack_2; - CHECK_OBJECT(tmp_listcomp$tuple_unpack_1__source_iter); - tmp_unpack_2 = tmp_listcomp$tuple_unpack_1__source_iter; - tmp_assign_source_6 = UNPACK_NEXT(tmp_unpack_2, 1, 2); - if (tmp_assign_source_6 == NULL) { - if (!ERROR_OCCURRED()) { - exception_type = PyExc_StopIteration; - Py_INCREF(exception_type); - exception_value = NULL; - exception_tb = NULL; - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - } - - - type_description_2 = "oo"; - exception_lineno = 186; - goto try_except_handler_5; - } - { - PyObject *old = tmp_listcomp$tuple_unpack_1__element_2; - tmp_listcomp$tuple_unpack_1__element_2 = tmp_assign_source_6; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_iterator_name_1; - CHECK_OBJECT(tmp_listcomp$tuple_unpack_1__source_iter); - tmp_iterator_name_1 = tmp_listcomp$tuple_unpack_1__source_iter; - // Check if iterator has left-over elements. - CHECK_OBJECT(tmp_iterator_name_1); assert(HAS_ITERNEXT(tmp_iterator_name_1)); - - tmp_iterator_attempt = (*Py_TYPE(tmp_iterator_name_1)->tp_iternext)(tmp_iterator_name_1); - - if (likely(tmp_iterator_attempt == NULL)) { - PyObject *error = GET_ERROR_OCCURRED(); - - if (error != NULL) { - if (EXCEPTION_MATCH_BOOL_SINGLE(error, PyExc_StopIteration)) { - CLEAR_ERROR_OCCURRED(); - } else { - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - type_description_2 = "oo"; - exception_lineno = 186; - goto try_except_handler_5; - } - } - } else { - Py_DECREF(tmp_iterator_attempt); - - exception_type = PyExc_ValueError; - Py_INCREF(PyExc_ValueError); - exception_value = mod_consts[54]; - Py_INCREF(exception_value); - exception_tb = NULL; - - type_description_2 = "oo"; - exception_lineno = 186; - goto try_except_handler_5; - } - } - goto try_end_1; - // Exception handler code: - try_except_handler_5:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_listcomp$tuple_unpack_1__source_iter); - tmp_listcomp$tuple_unpack_1__source_iter = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_4; - // End of try: - try_end_1:; - goto try_end_2; - // Exception handler code: - try_except_handler_4:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_listcomp$tuple_unpack_1__element_1); - tmp_listcomp$tuple_unpack_1__element_1 = NULL; - Py_XDECREF(tmp_listcomp$tuple_unpack_1__element_2); - tmp_listcomp$tuple_unpack_1__element_2 = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto try_except_handler_3; - // End of try: - try_end_2:; - Py_XDECREF(tmp_listcomp$tuple_unpack_1__source_iter); - tmp_listcomp$tuple_unpack_1__source_iter = NULL; - { - PyObject *tmp_assign_source_7; - CHECK_OBJECT(tmp_listcomp$tuple_unpack_1__element_1); - tmp_assign_source_7 = tmp_listcomp$tuple_unpack_1__element_1; - { - PyObject *old = outline_0_var_name; - outline_0_var_name = tmp_assign_source_7; - Py_INCREF(outline_0_var_name); - Py_XDECREF(old); - } - - } - Py_XDECREF(tmp_listcomp$tuple_unpack_1__element_1); - tmp_listcomp$tuple_unpack_1__element_1 = NULL; - - { - PyObject *tmp_assign_source_8; - CHECK_OBJECT(tmp_listcomp$tuple_unpack_1__element_2); - tmp_assign_source_8 = tmp_listcomp$tuple_unpack_1__element_2; - { - PyObject *old = outline_0_var_types; - outline_0_var_types = tmp_assign_source_8; - Py_INCREF(outline_0_var_types); - Py_XDECREF(old); - } - - } - Py_XDECREF(tmp_listcomp$tuple_unpack_1__element_2); - tmp_listcomp$tuple_unpack_1__element_2 = NULL; - - Py_XDECREF(tmp_listcomp$tuple_unpack_1__element_1); - tmp_listcomp$tuple_unpack_1__element_1 = NULL; - Py_XDECREF(tmp_listcomp$tuple_unpack_1__element_2); - tmp_listcomp$tuple_unpack_1__element_2 = NULL; - { - PyObject *tmp_append_list_1; - PyObject *tmp_append_value_1; - PyObject *tmp_string_concat_values_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_format_value_2; - PyObject *tmp_format_spec_2; - CHECK_OBJECT(tmp_listcomp_1__contraction); - tmp_append_list_1 = tmp_listcomp_1__contraction; - CHECK_OBJECT(outline_0_var_name); - tmp_format_value_2 = outline_0_var_name; - tmp_format_spec_2 = mod_consts[72]; - tmp_tuple_element_2 = BUILTIN_FORMAT(tmp_format_value_2, tmp_format_spec_2); - if (tmp_tuple_element_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_2 = "oo"; - goto try_except_handler_3; - } - tmp_string_concat_values_2 = PyTuple_New(3); - { - PyObject *tmp_format_value_3; - PyObject *tmp_called_instance_2; - PyObject *tmp_args_element_name_2; - PyObject *tmp_format_spec_3; - PyTuple_SET_ITEM(tmp_string_concat_values_2, 0, tmp_tuple_element_2); - tmp_tuple_element_2 = mod_consts[77]; - PyTuple_SET_ITEM0(tmp_string_concat_values_2, 1, tmp_tuple_element_2); - tmp_called_instance_2 = mod_consts[78]; - CHECK_OBJECT(outline_0_var_types); - tmp_args_element_name_2 = outline_0_var_types; - frame_b1db33e43955f87a8a2ee720ed8431ae_2->m_frame.f_lineno = 187; - tmp_format_value_3 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_2, mod_consts[76], tmp_args_element_name_2); - if (tmp_format_value_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_2 = "oo"; - goto tuple_build_exception_1; - } - tmp_format_spec_3 = mod_consts[59]; - tmp_tuple_element_2 = BUILTIN_FORMAT(tmp_format_value_3, tmp_format_spec_3); - Py_DECREF(tmp_format_value_3); - if (tmp_tuple_element_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_2 = "oo"; - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_string_concat_values_2, 2, tmp_tuple_element_2); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_string_concat_values_2); - goto try_except_handler_3; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_append_value_1 = PyUnicode_Join(mod_consts[59], tmp_string_concat_values_2); - Py_DECREF(tmp_string_concat_values_2); - if (tmp_append_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_2 = "oo"; - goto try_except_handler_3; - } - assert(PyList_Check(tmp_append_list_1)); - tmp_result = LIST_APPEND1(tmp_append_list_1, tmp_append_value_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 186; - type_description_2 = "oo"; - goto try_except_handler_3; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 186; - type_description_2 = "oo"; - goto try_except_handler_3; - } - goto loop_start_1; - loop_end_1:; - CHECK_OBJECT(tmp_listcomp_1__contraction); - tmp_args_element_name_1 = tmp_listcomp_1__contraction; - Py_INCREF(tmp_args_element_name_1); - goto try_return_handler_3; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_3:; - Py_XDECREF(tmp_listcomp_1__$0); - tmp_listcomp_1__$0 = NULL; - CHECK_OBJECT(tmp_listcomp_1__contraction); - Py_DECREF(tmp_listcomp_1__contraction); - tmp_listcomp_1__contraction = NULL; - Py_XDECREF(tmp_listcomp_1__iter_value_0); - tmp_listcomp_1__iter_value_0 = NULL; - goto frame_return_exit_2; - // Exception handler code: - try_except_handler_3:; - exception_keeper_type_3 = exception_type; - exception_keeper_value_3 = exception_value; - exception_keeper_tb_3 = exception_tb; - exception_keeper_lineno_3 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_listcomp_1__$0); - tmp_listcomp_1__$0 = NULL; - CHECK_OBJECT(tmp_listcomp_1__contraction); - Py_DECREF(tmp_listcomp_1__contraction); - tmp_listcomp_1__contraction = NULL; - Py_XDECREF(tmp_listcomp_1__iter_value_0); - tmp_listcomp_1__iter_value_0 = NULL; - // Re-raise. - exception_type = exception_keeper_type_3; - exception_value = exception_keeper_value_3; - exception_tb = exception_keeper_tb_3; - exception_lineno = exception_keeper_lineno_3; - - goto frame_exception_exit_2; - // End of try: - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_b1db33e43955f87a8a2ee720ed8431ae_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_2:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_b1db33e43955f87a8a2ee720ed8431ae_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_2; - - frame_exception_exit_2:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_b1db33e43955f87a8a2ee720ed8431ae_2); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_b1db33e43955f87a8a2ee720ed8431ae_2, exception_lineno); - } else if (exception_tb->tb_frame != &frame_b1db33e43955f87a8a2ee720ed8431ae_2->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_b1db33e43955f87a8a2ee720ed8431ae_2, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_b1db33e43955f87a8a2ee720ed8431ae_2, - type_description_2, - outline_0_var_name, - outline_0_var_types - ); - - - // Release cached frame if used for exception. - if (frame_b1db33e43955f87a8a2ee720ed8431ae_2 == cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2); - cache_frame_b1db33e43955f87a8a2ee720ed8431ae_2 = NULL; - } - - assertFrameObject(frame_b1db33e43955f87a8a2ee720ed8431ae_2); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_1; - - frame_no_exception_1:; - goto skip_nested_handling_1; - nested_frame_exit_1:; - type_description_1 = "o"; - goto try_except_handler_2; - skip_nested_handling_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_2:; - Py_XDECREF(outline_0_var_name); - outline_0_var_name = NULL; - Py_XDECREF(outline_0_var_types); - outline_0_var_types = NULL; - goto outline_result_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_4 = exception_type; - exception_keeper_value_4 = exception_value; - exception_keeper_tb_4 = exception_tb; - exception_keeper_lineno_4 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(outline_0_var_name); - outline_0_var_name = NULL; - Py_XDECREF(outline_0_var_types); - outline_0_var_types = NULL; - // Re-raise. - exception_type = exception_keeper_type_4; - exception_value = exception_keeper_value_4; - exception_tb = exception_keeper_tb_4; - exception_lineno = exception_keeper_lineno_4; - - goto outline_exception_1; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_1:; - exception_lineno = 186; - goto frame_exception_exit_1; - outline_result_1:; - frame_a1ff221c4fb1e4ec4f516f82b218dca5->m_frame.f_lineno = 185; - tmp_right_name_4 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_element_name_1); - if (tmp_right_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_1); - - exception_lineno = 185; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - tmp_return_value = BINARY_OPERATION_ADD_OBJECT_UNICODE_OBJECT(tmp_left_name_1, tmp_right_name_4); - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_right_name_4); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 180; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_a1ff221c4fb1e4ec4f516f82b218dca5); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_2; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_a1ff221c4fb1e4ec4f516f82b218dca5); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_a1ff221c4fb1e4ec4f516f82b218dca5); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_a1ff221c4fb1e4ec4f516f82b218dca5, exception_lineno); - } else if (exception_tb->tb_frame != &frame_a1ff221c4fb1e4ec4f516f82b218dca5->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_a1ff221c4fb1e4ec4f516f82b218dca5, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_a1ff221c4fb1e4ec4f516f82b218dca5, - type_description_1, - par_self - ); - - - // Release cached frame if used for exception. - if (frame_a1ff221c4fb1e4ec4f516f82b218dca5 == cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5); - cache_frame_a1ff221c4fb1e4ec4f516f82b218dca5 = NULL; - } - - assertFrameObject(frame_a1ff221c4fb1e4ec4f516f82b218dca5); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_2:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_5 = exception_type; - exception_keeper_value_5 = exception_value; - exception_keeper_tb_5 = exception_tb; - exception_keeper_lineno_5 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - // Re-raise. - exception_type = exception_keeper_type_5; - exception_value = exception_keeper_value_5; - exception_tb = exception_keeper_tb_5; - exception_lineno = exception_keeper_lineno_5; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__6___iter__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - struct Nuitka_FrameObject *frame_c3c82eb0bf120804275f4f91d2bd99c7; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - static struct Nuitka_FrameObject *cache_frame_c3c82eb0bf120804275f4f91d2bd99c7 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_c3c82eb0bf120804275f4f91d2bd99c7)) { - Py_XDECREF(cache_frame_c3c82eb0bf120804275f4f91d2bd99c7); - -#if _DEBUG_REFCOUNTS - if (cache_frame_c3c82eb0bf120804275f4f91d2bd99c7 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_c3c82eb0bf120804275f4f91d2bd99c7 = MAKE_FUNCTION_FRAME(codeobj_c3c82eb0bf120804275f4f91d2bd99c7, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_c3c82eb0bf120804275f4f91d2bd99c7->m_type_description == NULL); - frame_c3c82eb0bf120804275f4f91d2bd99c7 = cache_frame_c3c82eb0bf120804275f4f91d2bd99c7; - - // Push the new frame as the currently active one. - pushFrameStack(frame_c3c82eb0bf120804275f4f91d2bd99c7); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_c3c82eb0bf120804275f4f91d2bd99c7) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_iter_arg_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_expression_name_1; - CHECK_OBJECT(par_self); - tmp_expression_name_1 = par_self; - tmp_called_instance_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[69]); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 194; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - frame_c3c82eb0bf120804275f4f91d2bd99c7->m_frame.f_lineno = 194; - tmp_iter_arg_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[10]); - Py_DECREF(tmp_called_instance_1); - if (tmp_iter_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 194; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - tmp_return_value = MAKE_ITERATOR(tmp_iter_arg_1); - Py_DECREF(tmp_iter_arg_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 194; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_c3c82eb0bf120804275f4f91d2bd99c7); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_c3c82eb0bf120804275f4f91d2bd99c7); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_c3c82eb0bf120804275f4f91d2bd99c7); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_c3c82eb0bf120804275f4f91d2bd99c7, exception_lineno); - } else if (exception_tb->tb_frame != &frame_c3c82eb0bf120804275f4f91d2bd99c7->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_c3c82eb0bf120804275f4f91d2bd99c7, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_c3c82eb0bf120804275f4f91d2bd99c7, - type_description_1, - par_self - ); - - - // Release cached frame if used for exception. - if (frame_c3c82eb0bf120804275f4f91d2bd99c7 == cache_frame_c3c82eb0bf120804275f4f91d2bd99c7) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_c3c82eb0bf120804275f4f91d2bd99c7); - cache_frame_c3c82eb0bf120804275f4f91d2bd99c7 = NULL; - } - - assertFrameObject(frame_c3c82eb0bf120804275f4f91d2bd99c7); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$$$function__7___len__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *outline_0_var_v = NULL; - PyObject *tmp_listcomp_1__$0 = NULL; - PyObject *tmp_listcomp_1__contraction = NULL; - PyObject *tmp_listcomp_1__iter_value_0 = NULL; - struct Nuitka_FrameObject *frame_345f9b676b7c503fdf12b10e713239a4; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - struct Nuitka_FrameObject *frame_363d192a44937f32417f15029b021df5_2; - NUITKA_MAY_BE_UNUSED char const *type_description_2 = NULL; - bool tmp_result; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - static struct Nuitka_FrameObject *cache_frame_363d192a44937f32417f15029b021df5_2 = NULL; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - static struct Nuitka_FrameObject *cache_frame_345f9b676b7c503fdf12b10e713239a4 = NULL; - PyObject *exception_keeper_type_3; - PyObject *exception_keeper_value_3; - PyTracebackObject *exception_keeper_tb_3; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_345f9b676b7c503fdf12b10e713239a4)) { - Py_XDECREF(cache_frame_345f9b676b7c503fdf12b10e713239a4); - -#if _DEBUG_REFCOUNTS - if (cache_frame_345f9b676b7c503fdf12b10e713239a4 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_345f9b676b7c503fdf12b10e713239a4 = MAKE_FUNCTION_FRAME(codeobj_345f9b676b7c503fdf12b10e713239a4, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_345f9b676b7c503fdf12b10e713239a4->m_type_description == NULL); - frame_345f9b676b7c503fdf12b10e713239a4 = cache_frame_345f9b676b7c503fdf12b10e713239a4; - - // Push the new frame as the currently active one. - pushFrameStack(frame_345f9b676b7c503fdf12b10e713239a4); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_345f9b676b7c503fdf12b10e713239a4) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_sum_sequence_1; - // Tried code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_iter_arg_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_expression_name_1; - CHECK_OBJECT(par_self); - tmp_expression_name_1 = par_self; - tmp_called_instance_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[69]); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "o"; - goto try_except_handler_2; - } - frame_345f9b676b7c503fdf12b10e713239a4->m_frame.f_lineno = 197; - tmp_iter_arg_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[79]); - Py_DECREF(tmp_called_instance_1); - if (tmp_iter_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "o"; - goto try_except_handler_2; - } - tmp_assign_source_1 = MAKE_ITERATOR(tmp_iter_arg_1); - Py_DECREF(tmp_iter_arg_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "o"; - goto try_except_handler_2; - } - assert(tmp_listcomp_1__$0 == NULL); - tmp_listcomp_1__$0 = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = PyList_New(0); - assert(tmp_listcomp_1__contraction == NULL); - tmp_listcomp_1__contraction = tmp_assign_source_2; - } - if (isFrameUnusable(cache_frame_363d192a44937f32417f15029b021df5_2)) { - Py_XDECREF(cache_frame_363d192a44937f32417f15029b021df5_2); - -#if _DEBUG_REFCOUNTS - if (cache_frame_363d192a44937f32417f15029b021df5_2 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_363d192a44937f32417f15029b021df5_2 = MAKE_FUNCTION_FRAME(codeobj_363d192a44937f32417f15029b021df5, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_363d192a44937f32417f15029b021df5_2->m_type_description == NULL); - frame_363d192a44937f32417f15029b021df5_2 = cache_frame_363d192a44937f32417f15029b021df5_2; - - // Push the new frame as the currently active one. - pushFrameStack(frame_363d192a44937f32417f15029b021df5_2); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_363d192a44937f32417f15029b021df5_2) == 2); // Frame stack - - // Framed code: - // Tried code: - loop_start_1:; - { - PyObject *tmp_next_source_1; - PyObject *tmp_assign_source_3; - CHECK_OBJECT(tmp_listcomp_1__$0); - tmp_next_source_1 = tmp_listcomp_1__$0; - tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1); - if (tmp_assign_source_3 == NULL) { - if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { - - goto loop_end_1; - } else { - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - type_description_2 = "o"; - exception_lineno = 197; - goto try_except_handler_3; - } - } - - { - PyObject *old = tmp_listcomp_1__iter_value_0; - tmp_listcomp_1__iter_value_0 = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_4; - CHECK_OBJECT(tmp_listcomp_1__iter_value_0); - tmp_assign_source_4 = tmp_listcomp_1__iter_value_0; - { - PyObject *old = outline_0_var_v; - outline_0_var_v = tmp_assign_source_4; - Py_INCREF(outline_0_var_v); - Py_XDECREF(old); - } - - } - { - PyObject *tmp_append_list_1; - PyObject *tmp_append_value_1; - PyObject *tmp_len_arg_1; - CHECK_OBJECT(tmp_listcomp_1__contraction); - tmp_append_list_1 = tmp_listcomp_1__contraction; - CHECK_OBJECT(outline_0_var_v); - tmp_len_arg_1 = outline_0_var_v; - tmp_append_value_1 = BUILTIN_LEN(tmp_len_arg_1); - if (tmp_append_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_2 = "o"; - goto try_except_handler_3; - } - assert(PyList_Check(tmp_append_list_1)); - tmp_result = LIST_APPEND1(tmp_append_list_1, tmp_append_value_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_2 = "o"; - goto try_except_handler_3; - } - } - if (CONSIDER_THREADING() == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_2 = "o"; - goto try_except_handler_3; - } - goto loop_start_1; - loop_end_1:; - CHECK_OBJECT(tmp_listcomp_1__contraction); - tmp_sum_sequence_1 = tmp_listcomp_1__contraction; - Py_INCREF(tmp_sum_sequence_1); - goto try_return_handler_3; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_3:; - Py_XDECREF(tmp_listcomp_1__$0); - tmp_listcomp_1__$0 = NULL; - CHECK_OBJECT(tmp_listcomp_1__contraction); - Py_DECREF(tmp_listcomp_1__contraction); - tmp_listcomp_1__contraction = NULL; - Py_XDECREF(tmp_listcomp_1__iter_value_0); - tmp_listcomp_1__iter_value_0 = NULL; - goto frame_return_exit_2; - // Exception handler code: - try_except_handler_3:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_listcomp_1__$0); - tmp_listcomp_1__$0 = NULL; - CHECK_OBJECT(tmp_listcomp_1__contraction); - Py_DECREF(tmp_listcomp_1__contraction); - tmp_listcomp_1__contraction = NULL; - Py_XDECREF(tmp_listcomp_1__iter_value_0); - tmp_listcomp_1__iter_value_0 = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto frame_exception_exit_2; - // End of try: - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_363d192a44937f32417f15029b021df5_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_2:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_363d192a44937f32417f15029b021df5_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_2; - - frame_exception_exit_2:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_363d192a44937f32417f15029b021df5_2); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_363d192a44937f32417f15029b021df5_2, exception_lineno); - } else if (exception_tb->tb_frame != &frame_363d192a44937f32417f15029b021df5_2->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_363d192a44937f32417f15029b021df5_2, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_363d192a44937f32417f15029b021df5_2, - type_description_2, - outline_0_var_v - ); - - - // Release cached frame if used for exception. - if (frame_363d192a44937f32417f15029b021df5_2 == cache_frame_363d192a44937f32417f15029b021df5_2) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_363d192a44937f32417f15029b021df5_2); - cache_frame_363d192a44937f32417f15029b021df5_2 = NULL; - } - - assertFrameObject(frame_363d192a44937f32417f15029b021df5_2); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_1; - - frame_no_exception_1:; - goto skip_nested_handling_1; - nested_frame_exit_1:; - type_description_1 = "o"; - goto try_except_handler_2; - skip_nested_handling_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_2:; - Py_XDECREF(outline_0_var_v); - outline_0_var_v = NULL; - goto outline_result_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(outline_0_var_v); - outline_0_var_v = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto outline_exception_1; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_1:; - exception_lineno = 197; - goto frame_exception_exit_1; - outline_result_1:; - tmp_return_value = BUILTIN_SUM1(tmp_sum_sequence_1); - Py_DECREF(tmp_sum_sequence_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "o"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_345f9b676b7c503fdf12b10e713239a4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_2; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_345f9b676b7c503fdf12b10e713239a4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_345f9b676b7c503fdf12b10e713239a4); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_345f9b676b7c503fdf12b10e713239a4, exception_lineno); - } else if (exception_tb->tb_frame != &frame_345f9b676b7c503fdf12b10e713239a4->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_345f9b676b7c503fdf12b10e713239a4, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_345f9b676b7c503fdf12b10e713239a4, - type_description_1, - par_self - ); - - - // Release cached frame if used for exception. - if (frame_345f9b676b7c503fdf12b10e713239a4 == cache_frame_345f9b676b7c503fdf12b10e713239a4) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_345f9b676b7c503fdf12b10e713239a4); - cache_frame_345f9b676b7c503fdf12b10e713239a4 = NULL; - } - - assertFrameObject(frame_345f9b676b7c503fdf12b10e713239a4); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_2:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_3 = exception_type; - exception_keeper_value_3 = exception_value; - exception_keeper_tb_3 = exception_tb; - exception_keeper_lineno_3 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - // Re-raise. - exception_type = exception_keeper_type_3; - exception_value = exception_keeper_value_3; - exception_tb = exception_keeper_tb_3; - exception_lineno = exception_keeper_lineno_3; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__1_load_model(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__1_load_model, - mod_consts[111], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_fe2cd4692aef62e7724c5cfc72c4c128, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models, - mod_consts[28], - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__2_load_preprocess() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__2_load_preprocess, - mod_consts[53], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_28d96cf50f456a1141613d0f55135c5a, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models, - mod_consts[42], - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__2_load_preprocess$$$function__1__build_proc_from_cfg() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__2_load_preprocess$$$function__1__build_proc_from_cfg, - mod_consts[29], -#if PYTHON_VERSION >= 0x300 - mod_consts[30], -#endif - codeobj_26067f56e445e8be2364d8b047b0369a, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__3_load_model_and_preprocess(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__3_load_model_and_preprocess, - mod_consts[113], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_8e01d5b362d6df18e9f336fc94ed971c, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models, - mod_consts[65], - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__4___init__(PyObject *annotations) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__4___init__, - mod_consts[125], -#if PYTHON_VERSION >= 0x300 - mod_consts[126], -#endif - codeobj_0f2082830916959456ffaf17ca3f97c9, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - annotations, -#endif - module_models, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__5___str__(PyObject *annotations) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__5___str__, - mod_consts[129], -#if PYTHON_VERSION >= 0x300 - mod_consts[130], -#endif - codeobj_a1ff221c4fb1e4ec4f516f82b218dca5, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - annotations, -#endif - module_models, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__6___iter__() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__6___iter__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[131], -#endif - codeobj_c3c82eb0bf120804275f4f91d2bd99c7, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$$$function__7___len__() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$$$function__7___len__, - mod_consts[132], -#if PYTHON_VERSION >= 0x300 - mod_consts[133], -#endif - codeobj_345f9b676b7c503fdf12b10e713239a4, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - -extern void _initCompiledCellType(); -extern void _initCompiledGeneratorType(); -extern void _initCompiledFunctionType(); -extern void _initCompiledMethodType(); -extern void _initCompiledFrameType(); - -extern PyTypeObject Nuitka_Loader_Type; - -#ifdef _NUITKA_PLUGIN_DILL_ENABLED -// Provide a way to create find a function via its C code and create it back -// in another process, useful for multiprocessing extensions like dill -extern void registerDillPluginTables(char const *module_name, PyMethodDef *reduce_compiled_function, PyMethodDef *create_compiled_function); - -function_impl_code functable_models[] = { - impl_models$$$function__2_load_preprocess$$$function__1__build_proc_from_cfg, - impl_models$$$function__1_load_model, - impl_models$$$function__2_load_preprocess, - impl_models$$$function__3_load_model_and_preprocess, - impl_models$$$function__4___init__, - impl_models$$$function__5___str__, - impl_models$$$function__6___iter__, - impl_models$$$function__7___len__, - NULL -}; - -static char const *_reduce_compiled_function_argnames[] = { - "func", - NULL -}; - -static PyObject *_reduce_compiled_function(PyObject *self, PyObject *args, PyObject *kwds) { - PyObject *func; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:reduce_compiled_function", (char **)_reduce_compiled_function_argnames, &func, NULL)) { - return NULL; - } - - if (Nuitka_Function_Check(func) == false) { - SET_CURRENT_EXCEPTION_TYPE0_STR(PyExc_TypeError, "not a compiled function"); - return NULL; - } - - struct Nuitka_FunctionObject *function = (struct Nuitka_FunctionObject *)func; - - function_impl_code *current = functable_models; - int offset = 0; - - while (*current != NULL) { - if (*current == function->m_c_code) { - break; - } - - current += 1; - offset += 1; - } - - if (*current == NULL) { - SET_CURRENT_EXCEPTION_TYPE0_STR(PyExc_TypeError, "Cannot find compiled function in module."); - return NULL; - } - - PyObject *code_object_desc = PyTuple_New(6); - PyTuple_SET_ITEM0(code_object_desc, 0, function->m_code_object->co_filename); - PyTuple_SET_ITEM0(code_object_desc, 1, function->m_code_object->co_name); - PyTuple_SET_ITEM(code_object_desc, 2, PyLong_FromLong(function->m_code_object->co_firstlineno)); - PyTuple_SET_ITEM0(code_object_desc, 3, function->m_code_object->co_varnames); - PyTuple_SET_ITEM(code_object_desc, 4, PyLong_FromLong(function->m_code_object->co_argcount)); - PyTuple_SET_ITEM(code_object_desc, 5, PyLong_FromLong(function->m_code_object->co_flags)); - - CHECK_OBJECT_DEEP(code_object_desc); - - PyObject *result = PyTuple_New(4); - PyTuple_SET_ITEM(result, 0, PyLong_FromLong(offset)); - PyTuple_SET_ITEM(result, 1, code_object_desc); - PyTuple_SET_ITEM0(result, 2, function->m_defaults); - PyTuple_SET_ITEM0(result, 3, function->m_doc != NULL ? function->m_doc : Py_None); - - CHECK_OBJECT_DEEP(result); - - return result; -} - -static PyMethodDef _method_def_reduce_compiled_function = {"reduce_compiled_function", (PyCFunction)_reduce_compiled_function, - METH_VARARGS | METH_KEYWORDS, NULL}; - -static char const *_create_compiled_function_argnames[] = { - "func", - "code_object_desc", - "defaults", - "doc", - NULL -}; - - -static PyObject *_create_compiled_function(PyObject *self, PyObject *args, PyObject *kwds) { - CHECK_OBJECT_DEEP(args); - - PyObject *func; - PyObject *code_object_desc; - PyObject *defaults; - PyObject *doc; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOOO:create_compiled_function", (char **)_create_compiled_function_argnames, &func, &code_object_desc, &defaults, &doc, NULL)) { - return NULL; - } - - int offset = PyLong_AsLong(func); - - if (offset == -1 && ERROR_OCCURRED()) { - return NULL; - } - - if (offset > sizeof(functable_models) || offset < 0) { - SET_CURRENT_EXCEPTION_TYPE0_STR(PyExc_TypeError, "Wrong offset for compiled function."); - return NULL; - } - - PyObject *filename = PyTuple_GET_ITEM(code_object_desc, 0); - PyObject *function_name = PyTuple_GET_ITEM(code_object_desc, 1); - PyObject *line = PyTuple_GET_ITEM(code_object_desc, 2); - int line_int = PyLong_AsLong(line); - assert(!ERROR_OCCURRED()); - - PyObject *argnames = PyTuple_GET_ITEM(code_object_desc, 3); - PyObject *arg_count = PyTuple_GET_ITEM(code_object_desc, 4); - int arg_count_int = PyLong_AsLong(arg_count); - assert(!ERROR_OCCURRED()); - PyObject *flags = PyTuple_GET_ITEM(code_object_desc, 5); - int flags_int = PyLong_AsLong(flags); - assert(!ERROR_OCCURRED()); - - PyCodeObject *code_object = MAKE_CODEOBJECT( - filename, - line_int, - flags_int, - function_name, - argnames, - NULL, // freevars - arg_count_int, - 0, // TODO: Missing kw_only_count - 0 // TODO: Missing pos_only_count - ); - - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - functable_models[offset], - code_object->co_name, -#if PYTHON_VERSION >= 0x300 - NULL, // TODO: Not transferring qualname yet -#endif - code_object, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, // kwdefaults are done on the outside currently - NULL, // TODO: Not transferring annotations -#endif - module_models, - doc, - NULL, - 0 - ); - - return (PyObject *)result; -} - -static PyMethodDef _method_def_create_compiled_function = { - "create_compiled_function", - (PyCFunction)_create_compiled_function, - METH_VARARGS | METH_KEYWORDS, NULL -}; - - -#endif - -// Internal entry point for module code. -PyObject *modulecode_models(PyObject *module, struct Nuitka_MetaPathBasedLoaderEntry const *module_entry) { - module_models = module; - -#ifdef _NUITKA_MODULE - // In case of a stand alone extension module, need to call initialization - // the init here because that's the first and only time we are going to get - // called here. - - // Initialize the constant values used. - _initBuiltinModule(); - createGlobalConstants(); - - /* Initialize the compiled types of Nuitka. */ - _initCompiledCellType(); - _initCompiledGeneratorType(); - _initCompiledFunctionType(); - _initCompiledMethodType(); - _initCompiledFrameType(); - -#if PYTHON_VERSION < 0x300 - _initSlotCompare(); -#endif -#if PYTHON_VERSION >= 0x270 - _initSlotIternext(); -#endif - - patchBuiltinModule(); - patchTypeComparison(); - - // Enable meta path based loader if not already done. -#ifdef _NUITKA_TRACE - PRINT_STRING("models: Calling setupMetaPathBasedLoader().\n"); -#endif - setupMetaPathBasedLoader(); - -#if PYTHON_VERSION >= 0x300 - patchInspectModule(); -#endif - -#endif - - /* The constants only used by this module are created now. */ -#ifdef _NUITKA_TRACE - PRINT_STRING("models: Calling createModuleConstants().\n"); -#endif - createModuleConstants(); - - /* The code objects used by this module are created now. */ -#ifdef _NUITKA_TRACE - PRINT_STRING("models: Calling createModuleCodeObjects().\n"); -#endif - createModuleCodeObjects(); - - // PRINT_STRING("in initmodels\n"); - - // Create the module object first. There are no methods initially, all are - // added dynamically in actual code only. Also no "__doc__" is initially - // set at this time, as it could not contain NUL characters this way, they - // are instead set in early module code. No "self" for modules, we have no - // use for it. - - moduledict_models = MODULE_DICT(module_models); - -#ifdef _NUITKA_PLUGIN_DILL_ENABLED - registerDillPluginTables(module_entry->name, &_method_def_reduce_compiled_function, &_method_def_create_compiled_function); -#endif - - // Set "__compiled__" to what version information we have. - UPDATE_STRING_DICT0( - moduledict_models, - (Nuitka_StringObject *)const_str_plain___compiled__, - Nuitka_dunder_compiled_value - ); - - // Update "__package__" value to what it ought to be. - { -#if 0 - UPDATE_STRING_DICT0( - moduledict_models, - (Nuitka_StringObject *)const_str_plain___package__, - const_str_empty - ); -#elif 1 - PyObject *module_name = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)const_str_plain___name__); - - UPDATE_STRING_DICT0( - moduledict_models, - (Nuitka_StringObject *)const_str_plain___package__, - module_name - ); -#else - -#if PYTHON_VERSION < 0x300 - PyObject *module_name = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)const_str_plain___name__); - char const *module_name_cstr = PyString_AS_STRING(module_name); - - char const *last_dot = strrchr(module_name_cstr, '.'); - - if (last_dot != NULL) { - UPDATE_STRING_DICT1( - moduledict_models, - (Nuitka_StringObject *)const_str_plain___package__, - PyString_FromStringAndSize(module_name_cstr, last_dot - module_name_cstr) - ); - } -#else - PyObject *module_name = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)const_str_plain___name__); - Py_ssize_t dot_index = PyUnicode_Find(module_name, const_str_dot, 0, PyUnicode_GetLength(module_name), -1); - - if (dot_index != -1) { - UPDATE_STRING_DICT1( - moduledict_models, - (Nuitka_StringObject *)const_str_plain___package__, - PyUnicode_Substring(module_name, 0, dot_index) - ); - } -#endif -#endif - } - - CHECK_OBJECT(module_models); - - // For deep importing of a module we need to have "__builtins__", so we set - // it ourselves in the same way than CPython does. Note: This must be done - // before the frame object is allocated, or else it may fail. - - if (GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)const_str_plain___builtins__) == NULL) { - PyObject *value = (PyObject *)builtin_module; - - // Check if main module, not a dict then but the module itself. -#if !defined(_NUITKA_EXE) || !0 - value = PyModule_GetDict(value); -#endif - - UPDATE_STRING_DICT0(moduledict_models, (Nuitka_StringObject *)const_str_plain___builtins__, value); - } - -#if PYTHON_VERSION >= 0x300 - UPDATE_STRING_DICT0(moduledict_models, (Nuitka_StringObject *)const_str_plain___loader__, (PyObject *)&Nuitka_Loader_Type); -#endif - -#if PYTHON_VERSION >= 0x340 -// Set the "__spec__" value - -#if 0 - // Main modules just get "None" as spec. - UPDATE_STRING_DICT0(moduledict_models, (Nuitka_StringObject *)const_str_plain___spec__, Py_None); -#else - // Other modules get a "ModuleSpec" from the standard mechanism. - { - PyObject *bootstrap_module = getImportLibBootstrapModule(); - CHECK_OBJECT(bootstrap_module); - - PyObject *_spec_from_module = PyObject_GetAttrString(bootstrap_module, "_spec_from_module"); - CHECK_OBJECT(_spec_from_module); - - PyObject *spec_value = CALL_FUNCTION_WITH_SINGLE_ARG(_spec_from_module, module_models); - Py_DECREF(_spec_from_module); - - // We can assume this to never fail, or else we are in trouble anyway. - // CHECK_OBJECT(spec_value); - - if (spec_value == NULL) { - PyErr_PrintEx(0); - abort(); - } - -// Mark the execution in the "__spec__" value. - SET_ATTRIBUTE(spec_value, const_str_plain__initializing, Py_True); - - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)const_str_plain___spec__, spec_value); - } -#endif -#endif - - // Temp variables if any - PyObject *outline_0_var___class__ = NULL; - PyObject *tmp_class_creation_1__class_decl_dict = NULL; - PyObject *tmp_class_creation_1__metaclass = NULL; - PyObject *tmp_class_creation_1__prepared = NULL; - struct Nuitka_FrameObject *frame_72d33f092ce284e25ff5e5267423439e; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_dictset_value; - PyObject *tmp_dictset_dict; - PyObject *tmp_dictset_key; - int tmp_res; - bool tmp_result; - PyObject *tmp_dictdel_dict; - PyObject *tmp_dictdel_key; - PyObject *locals_models$$$class__1_ModelZoo_161 = NULL; - struct Nuitka_FrameObject *frame_da5fc521af8681666a04d7c4becfd4f6_2; - NUITKA_MAY_BE_UNUSED char const *type_description_2 = NULL; - static struct Nuitka_FrameObject *cache_frame_da5fc521af8681666a04d7c4becfd4f6_2 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *exception_keeper_type_3; - PyObject *exception_keeper_value_3; - PyTracebackObject *exception_keeper_tb_3; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; - - // Module code. - { - PyObject *tmp_assign_source_1; - tmp_assign_source_1 = mod_consts[80]; - UPDATE_STRING_DICT0(moduledict_models, (Nuitka_StringObject *)mod_consts[81], tmp_assign_source_1); - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = module_filename_obj; - UPDATE_STRING_DICT0(moduledict_models, (Nuitka_StringObject *)mod_consts[82], tmp_assign_source_2); - } - // Frame without reuse. - frame_72d33f092ce284e25ff5e5267423439e = MAKE_MODULE_FRAME(codeobj_72d33f092ce284e25ff5e5267423439e, module_models); - - // Push the new frame as the currently active one, and we should be exclusively - // owning it. - pushFrameStack(frame_72d33f092ce284e25ff5e5267423439e); - assert(Py_REFCNT(frame_72d33f092ce284e25ff5e5267423439e) == 2); - - // Framed code: - { - PyObject *tmp_assign_source_3; - PyObject *tmp_list_element_1; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_args_element_name_1; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 1; - { - PyObject *hard_module = IMPORT_HARD_OS(); - tmp_expression_name_1 = LOOKUP_ATTRIBUTE(hard_module, mod_consts[83]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[84]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - tmp_args_element_name_1 = module_filename_obj; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 1; - tmp_list_element_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - Py_DECREF(tmp_called_name_1); - if (tmp_list_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - tmp_assign_source_3 = PyList_New(2); - { - PyObject *tmp_called_instance_1; - PyList_SET_ITEM(tmp_assign_source_3, 0, tmp_list_element_1); - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 1; - { - PyObject *hard_module = IMPORT_HARD_OS(); - tmp_called_instance_1 = LOOKUP_ATTRIBUTE(hard_module, mod_consts[85]); - } - - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto list_build_exception_1; - } - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 1; - tmp_list_element_1 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_1, - mod_consts[31], - &PyTuple_GET_ITEM(mod_consts[86], 0) - ); - - if (tmp_list_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto list_build_exception_1; - } - PyList_SET_ITEM(tmp_assign_source_3, 1, tmp_list_element_1); - } - goto list_build_noexception_1; - // Exception handling pass through code for list_build: - list_build_exception_1:; - Py_DECREF(tmp_assign_source_3); - goto frame_exception_exit_1; - // Finished with no exception for list_build: - list_build_noexception_1:; - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[87], tmp_assign_source_3); - } - { - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - tmp_dictset_value = Nuitka_Loader_New(module_entry); - tmp_dictset_dict = PySys_GetObject((char *)"path_importer_cache"); - if (tmp_dictset_dict == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[87]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[87]); - } - - assert(!(tmp_expression_name_2 == NULL)); - tmp_subscript_name_1 = mod_consts[11]; - tmp_dictset_key = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_2, tmp_subscript_name_1, 0); - if (tmp_dictset_key == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - tmp_res = PyDict_SetItem(tmp_dictset_dict, tmp_dictset_key, tmp_dictset_value); - Py_DECREF(tmp_dictset_key); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - tmp_assattr_name_1 = module_filename_obj; - tmp_assattr_target_1 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[88]); - - if (unlikely(tmp_assattr_target_1 == NULL)) { - tmp_assattr_target_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[88]); - } - - assert(!(tmp_assattr_target_1 == NULL)); - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[89], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_assattr_target_2; - tmp_assattr_name_2 = Py_True; - tmp_assattr_target_2 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[88]); - - if (unlikely(tmp_assattr_target_2 == NULL)) { - tmp_assattr_target_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[88]); - } - - assert(!(tmp_assattr_target_2 == NULL)); - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[90], tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_3; - PyObject *tmp_assattr_target_3; - tmp_assattr_name_3 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[87]); - - if (unlikely(tmp_assattr_name_3 == NULL)) { - tmp_assattr_name_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[87]); - } - - if (tmp_assattr_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - tmp_assattr_target_3 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[88]); - - if (unlikely(tmp_assattr_target_3 == NULL)) { - tmp_assattr_target_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[88]); - } - - assert(!(tmp_assattr_target_3 == NULL)); - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_3, mod_consts[91], tmp_assattr_name_3); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assign_source_4; - tmp_assign_source_4 = Py_None; - UPDATE_STRING_DICT0(moduledict_models, (Nuitka_StringObject *)mod_consts[92], tmp_assign_source_4); - } - { - PyObject *tmp_assign_source_5; - PyObject *tmp_name_name_1; - PyObject *tmp_globals_arg_name_1; - PyObject *tmp_locals_arg_name_1; - PyObject *tmp_fromlist_name_1; - PyObject *tmp_level_name_1; - tmp_name_name_1 = mod_consts[56]; - tmp_globals_arg_name_1 = (PyObject *)moduledict_models; - tmp_locals_arg_name_1 = Py_None; - tmp_fromlist_name_1 = Py_None; - tmp_level_name_1 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 8; - tmp_assign_source_5 = IMPORT_MODULE5(tmp_name_name_1, tmp_globals_arg_name_1, tmp_locals_arg_name_1, tmp_fromlist_name_1, tmp_level_name_1); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 8; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[56], tmp_assign_source_5); - } - { - PyObject *tmp_assign_source_6; - PyObject *tmp_name_name_2; - PyObject *tmp_globals_arg_name_2; - PyObject *tmp_locals_arg_name_2; - PyObject *tmp_fromlist_name_2; - PyObject *tmp_level_name_2; - tmp_name_name_2 = mod_consts[62]; - tmp_globals_arg_name_2 = (PyObject *)moduledict_models; - tmp_locals_arg_name_2 = Py_None; - tmp_fromlist_name_2 = Py_None; - tmp_level_name_2 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 9; - tmp_assign_source_6 = IMPORT_MODULE5(tmp_name_name_2, tmp_globals_arg_name_2, tmp_locals_arg_name_2, tmp_fromlist_name_2, tmp_level_name_2); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 9; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[62], tmp_assign_source_6); - } - { - PyObject *tmp_assign_source_7; - PyObject *tmp_import_name_from_1; - PyObject *tmp_name_name_3; - PyObject *tmp_globals_arg_name_3; - PyObject *tmp_locals_arg_name_3; - PyObject *tmp_fromlist_name_3; - PyObject *tmp_level_name_3; - tmp_name_name_3 = mod_consts[93]; - tmp_globals_arg_name_3 = (PyObject *)moduledict_models; - tmp_locals_arg_name_3 = Py_None; - tmp_fromlist_name_3 = mod_consts[94]; - tmp_level_name_3 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 10; - tmp_import_name_from_1 = IMPORT_MODULE5(tmp_name_name_3, tmp_globals_arg_name_3, tmp_locals_arg_name_3, tmp_fromlist_name_3, tmp_level_name_3); - if (tmp_import_name_from_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 10; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_1)) { - tmp_assign_source_7 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_1, - (PyObject *)moduledict_models, - mod_consts[48], - mod_consts[11] - ); - } else { - tmp_assign_source_7 = IMPORT_NAME(tmp_import_name_from_1, mod_consts[48]); - } - - Py_DECREF(tmp_import_name_from_1); - if (tmp_assign_source_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 10; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[48], tmp_assign_source_7); - } - { - PyObject *tmp_assign_source_8; - PyObject *tmp_import_name_from_2; - PyObject *tmp_name_name_4; - PyObject *tmp_globals_arg_name_4; - PyObject *tmp_locals_arg_name_4; - PyObject *tmp_fromlist_name_4; - PyObject *tmp_level_name_4; - tmp_name_name_4 = mod_consts[95]; - tmp_globals_arg_name_4 = (PyObject *)moduledict_models; - tmp_locals_arg_name_4 = Py_None; - tmp_fromlist_name_4 = mod_consts[96]; - tmp_level_name_4 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 12; - tmp_import_name_from_2 = IMPORT_MODULE5(tmp_name_name_4, tmp_globals_arg_name_4, tmp_locals_arg_name_4, tmp_fromlist_name_4, tmp_level_name_4); - if (tmp_import_name_from_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 12; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_2)) { - tmp_assign_source_8 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_2, - (PyObject *)moduledict_models, - mod_consts[18], - mod_consts[11] - ); - } else { - tmp_assign_source_8 = IMPORT_NAME(tmp_import_name_from_2, mod_consts[18]); - } - - Py_DECREF(tmp_import_name_from_2); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 12; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[18], tmp_assign_source_8); - } - { - PyObject *tmp_assign_source_9; - PyObject *tmp_import_name_from_3; - PyObject *tmp_name_name_5; - PyObject *tmp_globals_arg_name_5; - PyObject *tmp_locals_arg_name_5; - PyObject *tmp_fromlist_name_5; - PyObject *tmp_level_name_5; - tmp_name_name_5 = mod_consts[97]; - tmp_globals_arg_name_5 = (PyObject *)moduledict_models; - tmp_locals_arg_name_5 = Py_None; - tmp_fromlist_name_5 = mod_consts[98]; - tmp_level_name_5 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 13; - tmp_import_name_from_3 = IMPORT_MODULE5(tmp_name_name_5, tmp_globals_arg_name_5, tmp_locals_arg_name_5, tmp_fromlist_name_5, tmp_level_name_5); - if (tmp_import_name_from_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 13; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_3)) { - tmp_assign_source_9 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_3, - (PyObject *)moduledict_models, - mod_consts[99], - mod_consts[11] - ); - } else { - tmp_assign_source_9 = IMPORT_NAME(tmp_import_name_from_3, mod_consts[99]); - } - - Py_DECREF(tmp_import_name_from_3); - if (tmp_assign_source_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 13; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[99], tmp_assign_source_9); - } - { - PyObject *tmp_assign_source_10; - PyObject *tmp_import_name_from_4; - PyObject *tmp_name_name_6; - PyObject *tmp_globals_arg_name_6; - PyObject *tmp_locals_arg_name_6; - PyObject *tmp_fromlist_name_6; - PyObject *tmp_level_name_6; - tmp_name_name_6 = mod_consts[100]; - tmp_globals_arg_name_6 = (PyObject *)moduledict_models; - tmp_locals_arg_name_6 = Py_None; - tmp_fromlist_name_6 = mod_consts[101]; - tmp_level_name_6 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 14; - tmp_import_name_from_4 = IMPORT_MODULE5(tmp_name_name_6, tmp_globals_arg_name_6, tmp_locals_arg_name_6, tmp_fromlist_name_6, tmp_level_name_6); - if (tmp_import_name_from_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 14; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_4)) { - tmp_assign_source_10 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_4, - (PyObject *)moduledict_models, - mod_consts[102], - mod_consts[11] - ); - } else { - tmp_assign_source_10 = IMPORT_NAME(tmp_import_name_from_4, mod_consts[102]); - } - - Py_DECREF(tmp_import_name_from_4); - if (tmp_assign_source_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 14; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[102], tmp_assign_source_10); - } - { - PyObject *tmp_assign_source_11; - PyObject *tmp_import_name_from_5; - PyObject *tmp_name_name_7; - PyObject *tmp_globals_arg_name_7; - PyObject *tmp_locals_arg_name_7; - PyObject *tmp_fromlist_name_7; - PyObject *tmp_level_name_7; - tmp_name_name_7 = mod_consts[103]; - tmp_globals_arg_name_7 = (PyObject *)moduledict_models; - tmp_locals_arg_name_7 = Py_None; - tmp_fromlist_name_7 = mod_consts[104]; - tmp_level_name_7 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 15; - tmp_import_name_from_5 = IMPORT_MODULE5(tmp_name_name_7, tmp_globals_arg_name_7, tmp_locals_arg_name_7, tmp_fromlist_name_7, tmp_level_name_7); - if (tmp_import_name_from_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 15; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_5)) { - tmp_assign_source_11 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_5, - (PyObject *)moduledict_models, - mod_consts[105], - mod_consts[11] - ); - } else { - tmp_assign_source_11 = IMPORT_NAME(tmp_import_name_from_5, mod_consts[105]); - } - - Py_DECREF(tmp_import_name_from_5); - if (tmp_assign_source_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 15; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[105], tmp_assign_source_11); - } - { - PyObject *tmp_assign_source_12; - PyObject *tmp_import_name_from_6; - PyObject *tmp_name_name_8; - PyObject *tmp_globals_arg_name_8; - PyObject *tmp_locals_arg_name_8; - PyObject *tmp_fromlist_name_8; - PyObject *tmp_level_name_8; - tmp_name_name_8 = mod_consts[106]; - tmp_globals_arg_name_8 = (PyObject *)moduledict_models; - tmp_locals_arg_name_8 = Py_None; - tmp_fromlist_name_8 = mod_consts[107]; - tmp_level_name_8 = mod_consts[11]; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 16; - tmp_import_name_from_6 = IMPORT_MODULE5(tmp_name_name_8, tmp_globals_arg_name_8, tmp_locals_arg_name_8, tmp_fromlist_name_8, tmp_level_name_8); - if (tmp_import_name_from_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 16; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_6)) { - tmp_assign_source_12 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_6, - (PyObject *)moduledict_models, - mod_consts[47], - mod_consts[11] - ); - } else { - tmp_assign_source_12 = IMPORT_NAME(tmp_import_name_from_6, mod_consts[47]); - } - - Py_DECREF(tmp_import_name_from_6); - if (tmp_assign_source_12 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 16; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[47], tmp_assign_source_12); - } - { - PyObject *tmp_assign_source_13; - tmp_assign_source_13 = LIST_COPY(mod_consts[108]); - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[109], tmp_assign_source_13); - } - { - PyObject *tmp_assign_source_14; - PyObject *tmp_defaults_1; - tmp_defaults_1 = mod_consts[110]; - Py_INCREF(tmp_defaults_1); - - - tmp_assign_source_14 = MAKE_FUNCTION_models$$$function__1_load_model(tmp_defaults_1); - - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[111], tmp_assign_source_14); - } - { - PyObject *tmp_assign_source_15; - - - tmp_assign_source_15 = MAKE_FUNCTION_models$$$function__2_load_preprocess(); - - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[53], tmp_assign_source_15); - } - { - PyObject *tmp_assign_source_16; - PyObject *tmp_defaults_2; - tmp_defaults_2 = mod_consts[112]; - Py_INCREF(tmp_defaults_2); - - - tmp_assign_source_16 = MAKE_FUNCTION_models$$$function__3_load_model_and_preprocess(tmp_defaults_2); - - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[113], tmp_assign_source_16); - } - { - PyObject *tmp_assign_source_17; - tmp_assign_source_17 = PyDict_New(); - assert(tmp_class_creation_1__class_decl_dict == NULL); - tmp_class_creation_1__class_decl_dict = tmp_assign_source_17; - } - // Tried code: - { - PyObject *tmp_assign_source_18; - PyObject *tmp_metaclass_name_1; - nuitka_bool tmp_condition_result_1; - PyObject *tmp_key_name_1; - PyObject *tmp_dict_arg_name_1; - PyObject *tmp_dict_arg_name_2; - PyObject *tmp_key_name_2; - PyObject *tmp_bases_name_1; - tmp_key_name_1 = mod_consts[114]; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dict_arg_name_1 = tmp_class_creation_1__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_1, tmp_key_name_1); - assert(!(tmp_res == -1)); - tmp_condition_result_1 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto condexpr_true_1; - } else { - goto condexpr_false_1; - } - condexpr_true_1:; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dict_arg_name_2 = tmp_class_creation_1__class_decl_dict; - tmp_key_name_2 = mod_consts[114]; - tmp_metaclass_name_1 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_2, tmp_key_name_2); - if (tmp_metaclass_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - goto condexpr_end_1; - condexpr_false_1:; - tmp_metaclass_name_1 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_1); - condexpr_end_1:; - tmp_bases_name_1 = mod_consts[115]; - tmp_assign_source_18 = SELECT_METACLASS(tmp_metaclass_name_1, tmp_bases_name_1); - Py_DECREF(tmp_metaclass_name_1); - if (tmp_assign_source_18 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - assert(tmp_class_creation_1__metaclass == NULL); - tmp_class_creation_1__metaclass = tmp_assign_source_18; - } - { - nuitka_bool tmp_condition_result_2; - PyObject *tmp_key_name_3; - PyObject *tmp_dict_arg_name_3; - tmp_key_name_3 = mod_consts[114]; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dict_arg_name_3 = tmp_class_creation_1__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_3, tmp_key_name_3); - assert(!(tmp_res == -1)); - tmp_condition_result_2 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_1__class_decl_dict; - tmp_dictdel_key = mod_consts[114]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - branch_no_1:; - { - nuitka_bool tmp_condition_result_3; - PyObject *tmp_expression_name_3; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_expression_name_3 = tmp_class_creation_1__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_3, mod_consts[116]); - tmp_condition_result_3 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_3 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_19; - PyObject *tmp_called_name_2; - PyObject *tmp_expression_name_4; - PyObject *tmp_args_name_1; - PyObject *tmp_kwargs_name_1; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_expression_name_4 = tmp_class_creation_1__metaclass; - tmp_called_name_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_4, mod_consts[116]); - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - tmp_args_name_1 = mod_consts[117]; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_kwargs_name_1 = tmp_class_creation_1__class_decl_dict; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 161; - tmp_assign_source_19 = CALL_FUNCTION(tmp_called_name_2, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_2); - if (tmp_assign_source_19 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - assert(tmp_class_creation_1__prepared == NULL); - tmp_class_creation_1__prepared = tmp_assign_source_19; - } - { - nuitka_bool tmp_condition_result_4; - PyObject *tmp_operand_name_1; - PyObject *tmp_expression_name_5; - CHECK_OBJECT(tmp_class_creation_1__prepared); - tmp_expression_name_5 = tmp_class_creation_1__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_5, mod_consts[14]); - tmp_operand_name_1 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - tmp_condition_result_4 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_4 == NUITKA_BOOL_TRUE) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_getattr_target_1; - PyObject *tmp_getattr_attr_1; - PyObject *tmp_getattr_default_1; - tmp_raise_type_1 = PyExc_TypeError; - tmp_left_name_1 = mod_consts[118]; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_getattr_target_1 = tmp_class_creation_1__metaclass; - tmp_getattr_attr_1 = mod_consts[5]; - tmp_getattr_default_1 = mod_consts[119]; - tmp_tuple_element_1 = BUILTIN_GETATTR(tmp_getattr_target_1, tmp_getattr_attr_1, tmp_getattr_default_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_6; - PyObject *tmp_type_arg_1; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_1); - CHECK_OBJECT(tmp_class_creation_1__prepared); - tmp_type_arg_1 = tmp_class_creation_1__prepared; - tmp_expression_name_6 = BUILTIN_TYPE1(tmp_type_arg_1); - assert(!(tmp_expression_name_6 == NULL)); - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_6, mod_consts[5]); - Py_DECREF(tmp_expression_name_6); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - goto try_except_handler_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_raise_value_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_raise_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_1; - } - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - exception_lineno = 161; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_1; - } - branch_no_3:; - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_assign_source_20; - tmp_assign_source_20 = PyDict_New(); - assert(tmp_class_creation_1__prepared == NULL); - tmp_class_creation_1__prepared = tmp_assign_source_20; - } - branch_end_2:; - { - PyObject *tmp_assign_source_21; - { - PyObject *tmp_set_locals_1; - CHECK_OBJECT(tmp_class_creation_1__prepared); - tmp_set_locals_1 = tmp_class_creation_1__prepared; - locals_models$$$class__1_ModelZoo_161 = tmp_set_locals_1; - Py_INCREF(tmp_set_locals_1); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[5]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[5]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[120], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_3; - } - tmp_dictset_value = mod_consts[121]; - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[81], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_3; - } - tmp_dictset_value = mod_consts[122]; - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[123], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_3; - } - if (isFrameUnusable(cache_frame_da5fc521af8681666a04d7c4becfd4f6_2)) { - Py_XDECREF(cache_frame_da5fc521af8681666a04d7c4becfd4f6_2); - -#if _DEBUG_REFCOUNTS - if (cache_frame_da5fc521af8681666a04d7c4becfd4f6_2 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_da5fc521af8681666a04d7c4becfd4f6_2 = MAKE_FUNCTION_FRAME(codeobj_da5fc521af8681666a04d7c4becfd4f6, module_models, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_da5fc521af8681666a04d7c4becfd4f6_2->m_type_description == NULL); - frame_da5fc521af8681666a04d7c4becfd4f6_2 = cache_frame_da5fc521af8681666a04d7c4becfd4f6_2; - - // Push the new frame as the currently active one. - pushFrameStack(frame_da5fc521af8681666a04d7c4becfd4f6_2); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_da5fc521af8681666a04d7c4becfd4f6_2) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_annotations_1; - tmp_annotations_1 = PyDict_Copy(mod_consts[124]); - - - tmp_dictset_value = MAKE_FUNCTION_models$$$function__4___init__(tmp_annotations_1); - - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[125], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 172; - type_description_2 = "o"; - goto frame_exception_exit_2; - } - } - { - PyObject *tmp_annotations_2; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - tmp_dict_key_1 = mod_consts[127]; - tmp_dict_value_1 = PyObject_GetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[128]); - - if (tmp_dict_value_1 == NULL) { - if (CHECK_AND_CLEAR_KEY_ERROR_OCCURRED()) { - tmp_dict_value_1 = (PyObject *)&PyUnicode_Type; - Py_INCREF(tmp_dict_value_1); - } - } - - tmp_annotations_2 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_annotations_2, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - - - tmp_dictset_value = MAKE_FUNCTION_models$$$function__5___str__(tmp_annotations_2); - - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[129], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 178; - type_description_2 = "o"; - goto frame_exception_exit_2; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$$$function__6___iter__(); - - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 193; - type_description_2 = "o"; - goto frame_exception_exit_2; - } - - - tmp_dictset_value = MAKE_FUNCTION_models$$$function__7___len__(); - - tmp_res = PyObject_SetItem(locals_models$$$class__1_ModelZoo_161, mod_consts[132], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 196; - type_description_2 = "o"; - goto frame_exception_exit_2; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_da5fc521af8681666a04d7c4becfd4f6_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_2:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_da5fc521af8681666a04d7c4becfd4f6_2); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_da5fc521af8681666a04d7c4becfd4f6_2, exception_lineno); - } else if (exception_tb->tb_frame != &frame_da5fc521af8681666a04d7c4becfd4f6_2->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_da5fc521af8681666a04d7c4becfd4f6_2, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_da5fc521af8681666a04d7c4becfd4f6_2, - type_description_2, - outline_0_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_da5fc521af8681666a04d7c4becfd4f6_2 == cache_frame_da5fc521af8681666a04d7c4becfd4f6_2) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_da5fc521af8681666a04d7c4becfd4f6_2); - cache_frame_da5fc521af8681666a04d7c4becfd4f6_2 = NULL; - } - - assertFrameObject(frame_da5fc521af8681666a04d7c4becfd4f6_2); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_1; - - frame_no_exception_1:; - goto skip_nested_handling_1; - nested_frame_exit_1:; - - goto try_except_handler_3; - skip_nested_handling_1:; - { - PyObject *tmp_assign_source_22; - PyObject *tmp_called_name_3; - PyObject *tmp_args_name_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_kwargs_name_2; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_called_name_3 = tmp_class_creation_1__metaclass; - tmp_tuple_element_2 = mod_consts[122]; - tmp_args_name_2 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_2, 0, tmp_tuple_element_2); - tmp_tuple_element_2 = mod_consts[115]; - PyTuple_SET_ITEM0(tmp_args_name_2, 1, tmp_tuple_element_2); - tmp_tuple_element_2 = locals_models$$$class__1_ModelZoo_161; - PyTuple_SET_ITEM0(tmp_args_name_2, 2, tmp_tuple_element_2); - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_kwargs_name_2 = tmp_class_creation_1__class_decl_dict; - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 161; - tmp_assign_source_22 = CALL_FUNCTION(tmp_called_name_3, tmp_args_name_2, tmp_kwargs_name_2); - Py_DECREF(tmp_args_name_2); - if (tmp_assign_source_22 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 161; - - goto try_except_handler_3; - } - assert(outline_0_var___class__ == NULL); - outline_0_var___class__ = tmp_assign_source_22; - } - CHECK_OBJECT(outline_0_var___class__); - tmp_assign_source_21 = outline_0_var___class__; - Py_INCREF(tmp_assign_source_21); - goto try_return_handler_3; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_3:; - Py_DECREF(locals_models$$$class__1_ModelZoo_161); - locals_models$$$class__1_ModelZoo_161 = NULL; - goto try_return_handler_2; - // Exception handler code: - try_except_handler_3:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$$$class__1_ModelZoo_161); - locals_models$$$class__1_ModelZoo_161 = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto try_except_handler_2; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_2:; - CHECK_OBJECT(outline_0_var___class__); - Py_DECREF(outline_0_var___class__); - outline_0_var___class__ = NULL; - goto outline_result_1; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto outline_exception_1; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_1:; - exception_lineno = 161; - goto try_except_handler_1; - outline_result_1:; - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[122], tmp_assign_source_21); - } - goto try_end_1; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_3 = exception_type; - exception_keeper_value_3 = exception_value; - exception_keeper_tb_3 = exception_tb; - exception_keeper_lineno_3 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_1__class_decl_dict); - tmp_class_creation_1__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_1__metaclass); - tmp_class_creation_1__metaclass = NULL; - Py_XDECREF(tmp_class_creation_1__prepared); - tmp_class_creation_1__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_3; - exception_value = exception_keeper_value_3; - exception_tb = exception_keeper_tb_3; - exception_lineno = exception_keeper_lineno_3; - - goto frame_exception_exit_1; - // End of try: - try_end_1:; - Py_XDECREF(tmp_class_creation_1__class_decl_dict); - tmp_class_creation_1__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_1__metaclass); - tmp_class_creation_1__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_1__prepared); - Py_DECREF(tmp_class_creation_1__prepared); - tmp_class_creation_1__prepared = NULL; - { - PyObject *tmp_assign_source_23; - PyObject *tmp_called_name_4; - tmp_called_name_4 = GET_STRING_DICT_VALUE(moduledict_models, (Nuitka_StringObject *)mod_consts[122]); - - if (unlikely(tmp_called_name_4 == NULL)) { - tmp_called_name_4 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[122]); - } - - if (tmp_called_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 200; - - goto frame_exception_exit_1; - } - frame_72d33f092ce284e25ff5e5267423439e->m_frame.f_lineno = 200; - tmp_assign_source_23 = CALL_FUNCTION_NO_ARGS(tmp_called_name_4); - if (tmp_assign_source_23 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 200; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models, (Nuitka_StringObject *)mod_consts[69], tmp_assign_source_23); - } - - // Restore frame exception if necessary. -#if 0 - RESTORE_FRAME_EXCEPTION(frame_72d33f092ce284e25ff5e5267423439e); -#endif - popFrameStack(); - - assertFrameObject(frame_72d33f092ce284e25ff5e5267423439e); - - goto frame_no_exception_2; - - frame_exception_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_72d33f092ce284e25ff5e5267423439e); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_72d33f092ce284e25ff5e5267423439e, exception_lineno); - } else if (exception_tb->tb_frame != &frame_72d33f092ce284e25ff5e5267423439e->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_72d33f092ce284e25ff5e5267423439e, exception_lineno); - } - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto module_exception_exit; - - frame_no_exception_2:; - - return module_models; - module_exception_exit: - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - return NULL; -} - - -/* Visibility definitions to make the DLL entry point exported */ -#if defined(__GNUC__) - -#if PYTHON_VERSION < 0x300 - -#if defined(_WIN32) -#define NUITKA_MODULE_INIT_FUNCTION __declspec(dllexport) PyMODINIT_FUNC -#else -#define NUITKA_MODULE_INIT_FUNCTION PyMODINIT_FUNC __attribute__((visibility("default"))) -#endif - -#else - -#if defined(_WIN32) -#define NUITKA_MODULE_INIT_FUNCTION __declspec(dllexport) PyObject * -#else - -#ifdef __cplusplus -#define NUITKA_MODULE_INIT_FUNCTION extern "C" __attribute__((visibility("default"))) PyObject * -#else -#define NUITKA_MODULE_INIT_FUNCTION __attribute__((visibility("default"))) PyObject * -#endif - -#endif -#endif - -#else -#define NUITKA_MODULE_INIT_FUNCTION PyMODINIT_FUNC -#endif - -/* The name of the entry point for DLLs changed between CPython versions, and - * this is here to hide that. - */ -#if PYTHON_VERSION < 0x300 -#define MOD_INIT_DECL(name) NUITKA_MODULE_INIT_FUNCTION init##name(void) -#else -#define MOD_INIT_DECL(name) NUITKA_MODULE_INIT_FUNCTION PyInit_##name(void) -#endif - -#if PYTHON_VERSION >= 0x300 -static struct PyModuleDef mdef_models = { - PyModuleDef_HEAD_INIT, - NULL, /* m_name, filled later */ - NULL, /* m_doc */ - -1, /* m_size */ - NULL, /* m_methods */ - NULL, /* m_reload */ - NULL, /* m_traverse */ - NULL, /* m_clear */ - NULL, /* m_free */ -}; - -#endif - -/* The exported interface to CPython. On import of the module, this function - * gets called. It has to have an exact function name, in cases it's a shared - * library export. This is hidden behind the MOD_INIT_DECL macro. - */ - -// Actual name might be different when loaded as a package. -static char const *module_full_name = "models"; - -MOD_INIT_DECL(models) { - if (_Py_PackageContext != NULL) { - module_full_name = _Py_PackageContext; - } - -#if PYTHON_VERSION < 0x300 - PyObject *module = Py_InitModule4( - module_full_name, // Module Name - NULL, // No methods initially, all are added - // dynamically in actual module code only. - NULL, // No "__doc__" is initially set, as it could - // not contain NUL this way, added early in - // actual code. - NULL, // No self for modules, we don't use it. - PYTHON_API_VERSION - ); -#else - mdef_models.m_name = module_full_name; - PyObject *module = PyModule_Create(&mdef_models); - CHECK_OBJECT(module); - - bool res = Nuitka_SetModuleString(module_full_name, module); - assert(res != false); -#endif - -#if PYTHON_VERSION < 0x300 - modulecode_models(module, NULL); -#else - PyObject *result = modulecode_models(module, NULL); - return result; -#endif -} -