.. title: Construct FunctionCreationGeneratorClosure .. tags: 310_develop_steady_vs_main,310_factory_steady_vs_develop,38_develop_steady_vs_main,38_factory_steady_vs_develop,27_develop_steady_vs_main,27_factory_steady_vs_develop .. date: 03/28/2024, 10:20:18 .. contents:: Performance Diagrams ==================== .. chart:: Bar :title: 'Construct FunctionCreationGeneratorClosure' :x_labels: ['CPython 3.10', 'Nuitka (main)', 'Nuitka (develop)', 'Nuitka (factory)'] 'Ticks', [21799221, 3403156, 3403102, 3404123] .. chart:: Bar :title: 'Construct FunctionCreationGeneratorClosure' :x_labels: ['CPython 3.8', 'Nuitka (main)', 'Nuitka (develop)', 'Nuitka (factory)'] 'Ticks', [25149996, 3701336, 3701382, 3701368] .. chart:: Bar :title: 'Construct FunctionCreationGeneratorClosure' :x_labels: ['CPython 2.7', 'Nuitka (main)', 'Nuitka (develop)', 'Nuitka (factory)'] 'Ticks', [26944185, 2800997, 2801005, 2801009] Source Code with Construct ========================== .. code-block:: python return empty, x for x in itertools.repeat(None, 50000): calledRepeatedly(x) print("OK.") # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # 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. Source Code without Construct ============================= .. code-block:: python # construct_end return empty, x for x in itertools.repeat(None, 50000): calledRepeatedly(x) print("OK.") # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # 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. Context Diff of Source Code =========================== .. raw:: html
Construct | Baseline | ||||
---|---|---|---|---|---|
9 | def calledRepeatedly(x): | 9 | def calledRepeatedly(x): | ||
10 | # Force frame usage for now | 10 | # Force frame usage for now | ||
11 | module_var | 11 | module_var | ||
12 | 12 | ||||
13 | # construct_begin | 13 | # construct_begin | ||
n | 14 | def empty(): | n | ||
15 | yield x | ||||
16 | |||||
17 | # construct_alternative | ||||
18 | 14 | ||||
19 | 15 | ||||
20 | 16 | ||||
n | n | 17 | # construct_alternative | ||
18 | def empty(): | ||||
19 | yield module_var | ||||
21 | 20 | ||||
t | t | 21 | # construct_end | ||
22 | 22 | ||||
23 | return empty, x | 23 | return empty, x | ||
24 | 24 | ||||
25 | 25 | ||||
26 | for x in itertools.repeat(None, 50000): | 26 | for x in itertools.repeat(None, 50000): |
Construct | Baseline | ||||
---|---|---|---|---|---|
31 | 31 | ||||
32 | PyObject *module___main__; | 32 | PyObject *module___main__; | ||
33 | PyDictObject *moduledict___main__; | 33 | PyDictObject *moduledict___main__; | ||
34 | 34 | ||||
35 | /* The declarations of module constants used, if any. */ | 35 | /* The declarations of module constants used, if any. */ | ||
n | 36 | static PyObject *mod_consts[14]; | n | 36 | static PyObject *mod_consts[13]; |
37 | #ifndef __NUITKA_NO_ASSERT__ | 37 | #ifndef __NUITKA_NO_ASSERT__ | ||
n | 38 | static Py_hash_t mod_consts_hash[14]; | n | 38 | static Py_hash_t mod_consts_hash[13]; |
39 | #endif | 39 | #endif | ||
40 | 40 | ||||
41 | static PyObject *module_filename_obj = NULL; | 41 | static PyObject *module_filename_obj = NULL; | ||
42 | 42 | ||||
43 | /* Indicator if this modules private constants were created yet. */ | 43 | /* Indicator if this modules private constants were created yet. */ | ||
48 | if (constants_created == false) { | 48 | if (constants_created == false) { | ||
49 | loadConstantsBlob(tstate, &mod_consts[0], UNTRANSLATE("__main__")); | 49 | loadConstantsBlob(tstate, &mod_consts[0], UNTRANSLATE("__main__")); | ||
50 | constants_created = true; | 50 | constants_created = true; | ||
51 | 51 | ||||
52 | #ifndef __NUITKA_NO_ASSERT__ | 52 | #ifndef __NUITKA_NO_ASSERT__ | ||
n | 53 | for (int i = 0; i < 14; i++) { | n | 53 | for (int i = 0; i < 13; i++) { |
54 | mod_consts_hash[i] = DEEP_HASH(tstate, mod_consts[i]); | 54 | mod_consts_hash[i] = DEEP_HASH(tstate, mod_consts[i]); | ||
55 | } | 55 | } | ||
56 | #endif | 56 | #endif | ||
57 | } | 57 | } | ||
58 | } | 58 | } | ||
68 | #ifndef __NUITKA_NO_ASSERT__ | 68 | #ifndef __NUITKA_NO_ASSERT__ | ||
69 | void checkModuleConstants___main__(PyThreadState *tstate) { | 69 | void checkModuleConstants___main__(PyThreadState *tstate) { | ||
70 | // The module may not have been used at all, then ignore this. | 70 | // The module may not have been used at all, then ignore this. | ||
71 | if (constants_created == false) return; | 71 | if (constants_created == false) return; | ||
72 | 72 | ||||
n | 73 | for (int i = 0; i < 14; i++) { | n | 73 | for (int i = 0; i < 13; i++) { |
74 | assert(mod_consts_hash[i] == DEEP_HASH(tstate, mod_consts[i])); | 74 | assert(mod_consts_hash[i] == DEEP_HASH(tstate, mod_consts[i])); | ||
75 | CHECK_OBJECT_DEEP(mod_consts[i]); | 75 | CHECK_OBJECT_DEEP(mod_consts[i]); | ||
76 | } | 76 | } | ||
77 | } | 77 | } | ||
78 | #endif | 78 | #endif | ||
79 | 79 | ||||
80 | // The module code objects. | 80 | // The module code objects. | ||
81 | static PyCodeObject *codeobj_04d482b4a85d1c41cf9e950158e42681; | 81 | static PyCodeObject *codeobj_04d482b4a85d1c41cf9e950158e42681; | ||
82 | static PyCodeObject *codeobj_7beffb8ef60e75959c672fd5d187f398; | 82 | static PyCodeObject *codeobj_7beffb8ef60e75959c672fd5d187f398; | ||
n | 83 | static PyCodeObject *codeobj_bf3f1c10ea1bdf57e1419f20b5950a30; | n | 83 | static PyCodeObject *codeobj_fa1439694ecc7b12a67bc67da993aad9; |
84 | /* For use in "MainProgram.c". */ | 84 | /* For use in "MainProgram.c". */ | ||
85 | PyCodeObject *codeobj_main = NULL; | 85 | PyCodeObject *codeobj_main = NULL; | ||
86 | 86 | ||||
87 | static void createModuleCodeObjects(void) { | 87 | static void createModuleCodeObjects(void) { | ||
n | 88 | module_filename_obj = mod_consts[4]; CHECK_OBJECT(module_filename_obj); | n | 88 | module_filename_obj = mod_consts[3]; CHECK_OBJECT(module_filename_obj); |
89 | codeobj_04d482b4a85d1c41cf9e950158e42681 = MAKE_CODE_OBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[11], mod_consts[11], NULL, NULL, 0, 0, 0); | 89 | codeobj_04d482b4a85d1c41cf9e950158e42681 = MAKE_CODE_OBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[11], mod_consts[11], NULL, NULL, 0, 0, 0); | ||
90 | codeobj_main = codeobj_04d482b4a85d1c41cf9e950158e42681; | 90 | codeobj_main = codeobj_04d482b4a85d1c41cf9e950158e42681; | ||
n | 91 | codeobj_7beffb8ef60e75959c672fd5d187f398 = MAKE_CODE_OBJECT(module_filename_obj, 9, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[7], mod_consts[7], mod_consts[12], NULL, 1, 0, 0); | n | 91 | codeobj_7beffb8ef60e75959c672fd5d187f398 = MAKE_CODE_OBJECT(module_filename_obj, 9, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[6], mod_consts[6], mod_consts[12], NULL, 1, 0, 0); |
92 | codeobj_bf3f1c10ea1bdf57e1419f20b5950a30 = MAKE_CODE_OBJECT(module_filename_obj, 14, CO_GENERATOR | CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[1], mod_consts[1], mod_consts[13], mod_consts[13], 0, 0, 0); | 92 | codeobj_fa1439694ecc7b12a67bc67da993aad9 = MAKE_CODE_OBJECT(module_filename_obj, 18, CO_GENERATOR | CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[1], mod_consts[1], NULL, NULL, 0, 0, 0); | ||
93 | } | 93 | } | ||
94 | 94 | ||||
95 | // The module function declarations. | 95 | // The module function declarations. | ||
n | 96 | static PyObject *MAKE_GENERATOR___main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty(struct Nuitka_CellObject **closure); | n | 96 | static PyObject *MAKE_GENERATOR___main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty(); |
97 | 97 | ||||
98 | 98 | ||||
99 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly(); | 99 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly(); | ||
100 | 100 | ||||
101 | 101 | ||||
n | 102 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly$$$function__1_empty(struct Nuitka_CellObject **closure); | n | 102 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly$$$function__1_empty(); |
103 | 103 | ||||
104 | 104 | ||||
105 | // The module function definitions. | 105 | // The module function definitions. | ||
106 | static PyObject *impl___main__$$$function__1_calledRepeatedly(PyThreadState *tstate, struct Nuitka_FunctionObject const *self, PyObject **python_pars) { | 106 | static PyObject *impl___main__$$$function__1_calledRepeatedly(PyThreadState *tstate, struct Nuitka_FunctionObject const *self, PyObject **python_pars) { | ||
107 | // Preserve error status for checks | 107 | // Preserve error status for checks | ||
108 | #ifndef __NUITKA_NO_ASSERT__ | 108 | #ifndef __NUITKA_NO_ASSERT__ | ||
109 | NUITKA_MAY_BE_UNUSED bool had_error = HAS_ERROR_OCCURRED(tstate); | 109 | NUITKA_MAY_BE_UNUSED bool had_error = HAS_ERROR_OCCURRED(tstate); | ||
110 | #endif | 110 | #endif | ||
111 | 111 | ||||
112 | // Local variable declarations. | 112 | // Local variable declarations. | ||
n | 113 | struct Nuitka_CellObject *par_x = Nuitka_Cell_New1(python_pars[0]); | n | 113 | PyObject *par_x = python_pars[0]; |
114 | PyObject *var_empty = NULL; | 114 | PyObject *var_empty = NULL; | ||
115 | struct Nuitka_FrameObject *frame_7beffb8ef60e75959c672fd5d187f398; | 115 | struct Nuitka_FrameObject *frame_7beffb8ef60e75959c672fd5d187f398; | ||
116 | NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; | 116 | NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; | ||
117 | NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; | 117 | NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; | ||
118 | PyObject *exception_type = NULL; | 118 | PyObject *exception_type = NULL; | ||
168 | 168 | ||||
169 | FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); | 169 | FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); | ||
170 | 170 | ||||
171 | 171 | ||||
172 | exception_lineno = 11; | 172 | exception_lineno = 11; | ||
n | 173 | type_description_1 = "co"; | n | 173 | type_description_1 = "oo"; |
174 | goto frame_exception_exit_1; | 174 | goto frame_exception_exit_1; | ||
175 | } | 175 | } | ||
176 | } | 176 | } | ||
177 | 177 | ||||
178 | 178 | ||||
216 | // Return the error. | 216 | // Return the error. | ||
217 | goto try_except_handler_1; | 217 | goto try_except_handler_1; | ||
218 | frame_no_exception_1:; | 218 | frame_no_exception_1:; | ||
219 | { | 219 | { | ||
220 | PyObject *tmp_assign_source_1; | 220 | PyObject *tmp_assign_source_1; | ||
n | 221 | struct Nuitka_CellObject *tmp_closure_1[1]; | n | ||
222 | 221 | ||||
n | 223 | tmp_closure_1[0] = par_x; | n | ||
224 | Py_INCREF(tmp_closure_1[0]); | ||||
225 | 222 | ||||
n | 226 | tmp_assign_source_1 = MAKE_FUNCTION___main__$$$function__1_calledRepeatedly$$$function__1_empty(tmp_closure_1); | n | 223 | tmp_assign_source_1 = MAKE_FUNCTION___main__$$$function__1_calledRepeatedly$$$function__1_empty(); |
227 | 224 | ||||
228 | assert(var_empty == NULL); | 225 | assert(var_empty == NULL); | ||
229 | var_empty = tmp_assign_source_1; | 226 | var_empty = tmp_assign_source_1; | ||
230 | } | 227 | } | ||
231 | { | 228 | { | ||
232 | PyObject *tmp_tuple_element_1; | 229 | PyObject *tmp_tuple_element_1; | ||
233 | CHECK_OBJECT(var_empty); | 230 | CHECK_OBJECT(var_empty); | ||
234 | tmp_tuple_element_1 = var_empty; | 231 | tmp_tuple_element_1 = var_empty; | ||
235 | tmp_return_value = MAKE_TUPLE_EMPTY(2); | 232 | tmp_return_value = MAKE_TUPLE_EMPTY(2); | ||
236 | PyTuple_SET_ITEM0(tmp_return_value, 0, tmp_tuple_element_1); | 233 | PyTuple_SET_ITEM0(tmp_return_value, 0, tmp_tuple_element_1); | ||
n | 237 | CHECK_OBJECT(Nuitka_Cell_GET(par_x)); | n | 234 | CHECK_OBJECT(par_x); |
238 | tmp_tuple_element_1 = Nuitka_Cell_GET(par_x); | 235 | tmp_tuple_element_1 = par_x; | ||
239 | PyTuple_SET_ITEM0(tmp_return_value, 1, tmp_tuple_element_1); | 236 | PyTuple_SET_ITEM0(tmp_return_value, 1, tmp_tuple_element_1); | ||
240 | goto try_return_handler_1; | 237 | goto try_return_handler_1; | ||
241 | } | 238 | } | ||
242 | NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); | 239 | NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); | ||
243 | return NULL; | 240 | return NULL; | ||
299 | 296 | ||||
300 | // Local variable declarations. | 297 | // Local variable declarations. | ||
301 | PyObject *tmp_return_value = NULL; | 298 | PyObject *tmp_return_value = NULL; | ||
302 | 299 | ||||
303 | // Actual function body. | 300 | // Actual function body. | ||
n | 304 | { | n | ||
305 | struct Nuitka_CellObject *tmp_closure_1[1]; | ||||
306 | 301 | ||||
n | 307 | tmp_closure_1[0] = self->m_closure[0]; | n | ||
308 | Py_INCREF(tmp_closure_1[0]); | ||||
309 | 302 | ||||
n | 310 | tmp_return_value = MAKE_GENERATOR___main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty(tmp_closure_1); | n | 303 | tmp_return_value = MAKE_GENERATOR___main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty(); |
311 | 304 | ||||
n | 312 | goto function_return_exit; | n | 305 | goto function_return_exit; |
313 | } | ||||
314 | 306 | ||||
315 | NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); | 307 | NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); | ||
316 | return NULL; | 308 | return NULL; | ||
317 | 309 | ||||
318 | 310 | ||||
373 | } else { | 365 | } else { | ||
374 | count_released_frame_cache_instances += 1; | 366 | count_released_frame_cache_instances += 1; | ||
375 | } | 367 | } | ||
376 | count_allocated_frame_cache_instances += 1; | 368 | count_allocated_frame_cache_instances += 1; | ||
377 | #endif | 369 | #endif | ||
n | 378 | cache_m_frame = MAKE_FUNCTION_FRAME(tstate, codeobj_bf3f1c10ea1bdf57e1419f20b5950a30, module___main__, sizeof(void *)); | n | 370 | cache_m_frame = MAKE_FUNCTION_FRAME(tstate, codeobj_fa1439694ecc7b12a67bc67da993aad9, module___main__, 0); |
379 | #if _DEBUG_REFCOUNTS | 371 | #if _DEBUG_REFCOUNTS | ||
380 | } else { | 372 | } else { | ||
381 | count_hit_frame_cache_instances += 1; | 373 | count_hit_frame_cache_instances += 1; | ||
382 | #endif | 374 | #endif | ||
383 | } | 375 | } | ||
398 | 390 | ||||
399 | // Framed code: | 391 | // Framed code: | ||
400 | { | 392 | { | ||
401 | PyObject *tmp_expression_value_1; | 393 | PyObject *tmp_expression_value_1; | ||
402 | NUITKA_MAY_BE_UNUSED PyObject *tmp_yield_result_1; | 394 | NUITKA_MAY_BE_UNUSED PyObject *tmp_yield_result_1; | ||
n | 403 | if (Nuitka_Cell_GET(generator->m_closure[0]) == NULL) { | n | 395 | tmp_expression_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[0]); |
404 | 396 | ||||
n | 405 | FORMAT_UNBOUND_CLOSURE_ERROR(&generator_heap->exception_type, &generator_heap->exception_value, mod_consts[2]); | n | 397 | if (unlikely(tmp_expression_value_1 == NULL)) { |
406 | generator_heap->exception_tb = NULL; | 398 | tmp_expression_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK_IN_FUNCTION(tstate, mod_consts[0]); | ||
399 | } | ||||
407 | 400 | ||||
n | n | 401 | if (tmp_expression_value_1 == NULL) { | ||
402 | assert(HAS_ERROR_OCCURRED(tstate)); | ||||
403 | |||||
404 | FETCH_ERROR_OCCURRED(tstate, &generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb); | ||||
405 | |||||
406 | |||||
408 | generator_heap->exception_lineno = 15; | 407 | generator_heap->exception_lineno = 19; | ||
409 | generator_heap->type_description_1 = "c"; | 408 | |||
410 | goto frame_exception_exit_1; | 409 | goto frame_exception_exit_1; | ||
411 | } | 410 | } | ||
n | 412 | n | |||
413 | tmp_expression_value_1 = Nuitka_Cell_GET(generator->m_closure[0]); | ||||
414 | Py_INCREF(tmp_expression_value_1); | 411 | Py_INCREF(tmp_expression_value_1); | ||
415 | generator->m_yield_return_index = 1; | 412 | generator->m_yield_return_index = 1; | ||
416 | return tmp_expression_value_1; | 413 | return tmp_expression_value_1; | ||
417 | yield_return_1: | 414 | yield_return_1: | ||
418 | if (yield_return_value == NULL) { | 415 | if (yield_return_value == NULL) { | ||
419 | assert(HAS_ERROR_OCCURRED(tstate)); | 416 | assert(HAS_ERROR_OCCURRED(tstate)); | ||
420 | 417 | ||||
421 | FETCH_ERROR_OCCURRED(tstate, &generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb); | 418 | FETCH_ERROR_OCCURRED(tstate, &generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb); | ||
422 | 419 | ||||
423 | 420 | ||||
n | 424 | generator_heap->exception_lineno = 15; | n | 421 | generator_heap->exception_lineno = 19; |
425 | generator_heap->type_description_1 = "c"; | 422 | |||
426 | goto frame_exception_exit_1; | 423 | goto frame_exception_exit_1; | ||
427 | } | 424 | } | ||
428 | tmp_yield_result_1 = yield_return_value; | 425 | tmp_yield_result_1 = yield_return_value; | ||
429 | Py_DECREF(tmp_yield_result_1); | 426 | Py_DECREF(tmp_yield_result_1); | ||
430 | } | 427 | } | ||
442 | generator_heap->exception_tb = ADD_TRACEBACK(generator_heap->exception_tb, generator->m_frame, generator_heap->exception_lineno); | 439 | generator_heap->exception_tb = ADD_TRACEBACK(generator_heap->exception_tb, generator->m_frame, generator_heap->exception_lineno); | ||
443 | } | 440 | } | ||
444 | 441 | ||||
445 | Nuitka_Frame_AttachLocals( | 442 | Nuitka_Frame_AttachLocals( | ||
446 | generator->m_frame, | 443 | generator->m_frame, | ||
n | 447 | generator_heap->type_description_1, | n | 444 | generator_heap->type_description_1 |
448 | generator->m_closure[0] | ||||
449 | ); | 445 | ); | ||
450 | 446 | ||||
451 | 447 | ||||
452 | // Release cached frame if used for exception. | 448 | // Release cached frame if used for exception. | ||
453 | if (generator->m_frame == cache_m_frame) { | 449 | if (generator->m_frame == cache_m_frame) { | ||
488 | 484 | ||||
489 | return NULL; | 485 | return NULL; | ||
490 | 486 | ||||
491 | } | 487 | } | ||
492 | 488 | ||||
n | 493 | static PyObject *MAKE_GENERATOR___main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty(struct Nuitka_CellObject **closure) { | n | 489 | static PyObject *MAKE_GENERATOR___main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty() { |
494 | return Nuitka_Generator_New( | 490 | return Nuitka_Generator_New( | ||
495 | __main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty_context, | 491 | __main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty_context, | ||
496 | module___main__, | 492 | module___main__, | ||
497 | mod_consts[1], | 493 | mod_consts[1], | ||
498 | #if PYTHON_VERSION >= 0x350 | 494 | #if PYTHON_VERSION >= 0x350 | ||
499 | NULL, | 495 | NULL, | ||
500 | #endif | 496 | #endif | ||
n | 501 | codeobj_bf3f1c10ea1bdf57e1419f20b5950a30, | n | 497 | codeobj_fa1439694ecc7b12a67bc67da993aad9, |
502 | closure, | 498 | NULL, | ||
503 | 1, | 499 | 0, | ||
504 | #if 1 | 500 | #if 1 | ||
505 | sizeof(struct __main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty_locals) | 501 | sizeof(struct __main__$$$function__1_calledRepeatedly$$$function__1_empty$$$genobj__1_empty_locals) | ||
506 | #else | 502 | #else | ||
507 | 0 | 503 | 0 | ||
508 | #endif | 504 | #endif | ||
512 | 508 | ||||
513 | 509 | ||||
514 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly() { | 510 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly() { | ||
515 | struct Nuitka_FunctionObject *result = Nuitka_Function_New( | 511 | struct Nuitka_FunctionObject *result = Nuitka_Function_New( | ||
516 | impl___main__$$$function__1_calledRepeatedly, | 512 | impl___main__$$$function__1_calledRepeatedly, | ||
n | 517 | mod_consts[7], | n | 513 | mod_consts[6], |
518 | #if PYTHON_VERSION >= 0x300 | 514 | #if PYTHON_VERSION >= 0x300 | ||
519 | NULL, | 515 | NULL, | ||
520 | #endif | 516 | #endif | ||
521 | codeobj_7beffb8ef60e75959c672fd5d187f398, | 517 | codeobj_7beffb8ef60e75959c672fd5d187f398, | ||
522 | NULL, | 518 | NULL, | ||
534 | return (PyObject *)result; | 530 | return (PyObject *)result; | ||
535 | } | 531 | } | ||
536 | 532 | ||||
537 | 533 | ||||
538 | 534 | ||||
n | 539 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly$$$function__1_empty(struct Nuitka_CellObject **closure) { | n | 535 | static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly$$$function__1_empty() { |
540 | struct Nuitka_FunctionObject *result = Nuitka_Function_New( | 536 | struct Nuitka_FunctionObject *result = Nuitka_Function_New( | ||
541 | impl___main__$$$function__1_calledRepeatedly$$$function__1_empty, | 537 | impl___main__$$$function__1_calledRepeatedly$$$function__1_empty, | ||
542 | mod_consts[1], | 538 | mod_consts[1], | ||
543 | #if PYTHON_VERSION >= 0x300 | 539 | #if PYTHON_VERSION >= 0x300 | ||
544 | NULL, | 540 | NULL, | ||
545 | #endif | 541 | #endif | ||
n | 546 | codeobj_bf3f1c10ea1bdf57e1419f20b5950a30, | n | 542 | codeobj_fa1439694ecc7b12a67bc67da993aad9, |
547 | NULL, | 543 | NULL, | ||
548 | #if PYTHON_VERSION >= 0x300 | 544 | #if PYTHON_VERSION >= 0x300 | ||
549 | NULL, | 545 | NULL, | ||
550 | NULL, | 546 | NULL, | ||
551 | #endif | 547 | #endif | ||
552 | module___main__, | 548 | module___main__, | ||
553 | NULL, | 549 | NULL, | ||
n | 554 | closure, | n | 550 | NULL, |
555 | 1 | 551 | 0 | ||
556 | ); | 552 | ); | ||
557 | 553 | ||||
558 | 554 | ||||
559 | return (PyObject *)result; | 555 | return (PyObject *)result; | ||
560 | } | 556 | } | ||
925 | 921 | ||||
926 | // Module code. | 922 | // Module code. | ||
927 | { | 923 | { | ||
928 | PyObject *tmp_assign_source_1; | 924 | PyObject *tmp_assign_source_1; | ||
929 | tmp_assign_source_1 = Py_None; | 925 | tmp_assign_source_1 = Py_None; | ||
n | 930 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[3], tmp_assign_source_1); | n | 926 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[2], tmp_assign_source_1); |
931 | } | 927 | } | ||
932 | { | 928 | { | ||
933 | PyObject *tmp_assign_source_2; | 929 | PyObject *tmp_assign_source_2; | ||
n | 934 | tmp_assign_source_2 = mod_consts[4]; | n | 930 | tmp_assign_source_2 = mod_consts[3]; |
935 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_2); | 931 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_2); | ||
936 | } | 932 | } | ||
937 | frame_04d482b4a85d1c41cf9e950158e42681 = MAKE_MODULE_FRAME(codeobj_04d482b4a85d1c41cf9e950158e42681, module___main__); | 933 | frame_04d482b4a85d1c41cf9e950158e42681 = MAKE_MODULE_FRAME(codeobj_04d482b4a85d1c41cf9e950158e42681, module___main__); | ||
938 | 934 | ||||
939 | // Push the new frame as the currently active one, and we should be exclusively | 935 | // Push the new frame as the currently active one, and we should be exclusively | ||
940 | // owning it. | 936 | // owning it. | ||
946 | PyObject *tmp_assign_source_3; | 942 | PyObject *tmp_assign_source_3; | ||
947 | PyObject *tmp_name_value_1; | 943 | PyObject *tmp_name_value_1; | ||
948 | PyObject *tmp_globals_arg_value_1; | 944 | PyObject *tmp_globals_arg_value_1; | ||
949 | PyObject *tmp_locals_arg_value_1; | 945 | PyObject *tmp_locals_arg_value_1; | ||
950 | PyObject *tmp_fromlist_value_1; | 946 | PyObject *tmp_fromlist_value_1; | ||
n | 951 | tmp_name_value_1 = mod_consts[6]; | n | 947 | tmp_name_value_1 = mod_consts[5]; |
952 | tmp_globals_arg_value_1 = (PyObject *)moduledict___main__; | 948 | tmp_globals_arg_value_1 = (PyObject *)moduledict___main__; | ||
953 | tmp_locals_arg_value_1 = Py_None; | 949 | tmp_locals_arg_value_1 = Py_None; | ||
954 | tmp_fromlist_value_1 = Py_None; | 950 | tmp_fromlist_value_1 = Py_None; | ||
955 | frame_04d482b4a85d1c41cf9e950158e42681->m_frame.f_lineno = 4; | 951 | frame_04d482b4a85d1c41cf9e950158e42681->m_frame.f_lineno = 4; | ||
956 | tmp_assign_source_3 = IMPORT_MODULE4(tstate, tmp_name_value_1, tmp_globals_arg_value_1, tmp_locals_arg_value_1, tmp_fromlist_value_1); | 952 | tmp_assign_source_3 = IMPORT_MODULE4(tstate, tmp_name_value_1, tmp_globals_arg_value_1, tmp_locals_arg_value_1, tmp_fromlist_value_1); | ||
962 | 958 | ||||
963 | exception_lineno = 4; | 959 | exception_lineno = 4; | ||
964 | 960 | ||||
965 | goto frame_exception_exit_1; | 961 | goto frame_exception_exit_1; | ||
966 | } | 962 | } | ||
n | 967 | UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_3); | n | 963 | UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_3); |
968 | } | 964 | } | ||
969 | { | 965 | { | ||
970 | PyObject *tmp_assign_source_4; | 966 | PyObject *tmp_assign_source_4; | ||
971 | tmp_assign_source_4 = Py_None; | 967 | tmp_assign_source_4 = Py_None; | ||
972 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_4); | 968 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_4); | ||
975 | PyObject *tmp_assign_source_5; | 971 | PyObject *tmp_assign_source_5; | ||
976 | 972 | ||||
977 | 973 | ||||
978 | tmp_assign_source_5 = MAKE_FUNCTION___main__$$$function__1_calledRepeatedly(); | 974 | tmp_assign_source_5 = MAKE_FUNCTION___main__$$$function__1_calledRepeatedly(); | ||
979 | 975 | ||||
n | 980 | UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[7], tmp_assign_source_5); | n | 976 | UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_5); |
981 | } | 977 | } | ||
982 | { | 978 | { | ||
983 | PyObject *tmp_assign_source_6; | 979 | PyObject *tmp_assign_source_6; | ||
984 | PyObject *tmp_iter_arg_1; | 980 | PyObject *tmp_iter_arg_1; | ||
985 | PyObject *tmp_called_instance_1; | 981 | PyObject *tmp_called_instance_1; | ||
n | 986 | tmp_called_instance_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[6]); | n | 982 | tmp_called_instance_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[5]); |
987 | 983 | ||||
988 | if (unlikely(tmp_called_instance_1 == NULL)) { | 984 | if (unlikely(tmp_called_instance_1 == NULL)) { | ||
n | 989 | tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(tstate, mod_consts[6]); | n | 985 | tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(tstate, mod_consts[5]); |
990 | } | 986 | } | ||
991 | 987 | ||||
992 | assert(!(tmp_called_instance_1 == NULL)); | 988 | assert(!(tmp_called_instance_1 == NULL)); | ||
993 | frame_04d482b4a85d1c41cf9e950158e42681->m_frame.f_lineno = 26; | 989 | frame_04d482b4a85d1c41cf9e950158e42681->m_frame.f_lineno = 26; | ||
994 | tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2( | 990 | tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2( | ||
995 | tstate, | 991 | tstate, | ||
996 | tmp_called_instance_1, | 992 | tmp_called_instance_1, | ||
n | 997 | mod_consts[8], | n | 993 | mod_consts[7], |
998 | &PyTuple_GET_ITEM(mod_consts[9], 0) | 994 | &PyTuple_GET_ITEM(mod_consts[8], 0) | ||
999 | ); | 995 | ); | ||
1000 | 996 | ||||
1001 | if (tmp_iter_arg_1 == NULL) { | 997 | if (tmp_iter_arg_1 == NULL) { | ||
1002 | assert(HAS_ERROR_OCCURRED(tstate)); | 998 | assert(HAS_ERROR_OCCURRED(tstate)); | ||
1003 | 999 | ||||
1053 | } | 1049 | } | ||
1054 | { | 1050 | { | ||
1055 | PyObject *tmp_assign_source_8; | 1051 | PyObject *tmp_assign_source_8; | ||
1056 | CHECK_OBJECT(tmp_for_loop_1__iter_value); | 1052 | CHECK_OBJECT(tmp_for_loop_1__iter_value); | ||
1057 | tmp_assign_source_8 = tmp_for_loop_1__iter_value; | 1053 | tmp_assign_source_8 = tmp_for_loop_1__iter_value; | ||
n | 1058 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[2], tmp_assign_source_8); | n | 1054 | UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[9], tmp_assign_source_8); |
1059 | } | 1055 | } | ||
1060 | { | 1056 | { | ||
1061 | PyObject *tmp_called_value_1; | 1057 | PyObject *tmp_called_value_1; | ||
1062 | PyObject *tmp_call_result_1; | 1058 | PyObject *tmp_call_result_1; | ||
1063 | PyObject *tmp_args_element_value_1; | 1059 | PyObject *tmp_args_element_value_1; | ||
n | 1064 | tmp_called_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[7]); | n | 1060 | tmp_called_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[6]); |
1065 | 1061 | ||||
1066 | if (unlikely(tmp_called_value_1 == NULL)) { | 1062 | if (unlikely(tmp_called_value_1 == NULL)) { | ||
n | 1067 | tmp_called_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(tstate, mod_consts[7]); | n | 1063 | tmp_called_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(tstate, mod_consts[6]); |
1068 | } | 1064 | } | ||
1069 | 1065 | ||||
1070 | if (tmp_called_value_1 == NULL) { | 1066 | if (tmp_called_value_1 == NULL) { | ||
1071 | assert(HAS_ERROR_OCCURRED(tstate)); | 1067 | assert(HAS_ERROR_OCCURRED(tstate)); | ||
1072 | 1068 | ||||
1075 | 1071 | ||||
1076 | exception_lineno = 27; | 1072 | exception_lineno = 27; | ||
1077 | 1073 | ||||
1078 | goto try_except_handler_1; | 1074 | goto try_except_handler_1; | ||
1079 | } | 1075 | } | ||
n | 1080 | tmp_args_element_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[2]); | n | 1076 | tmp_args_element_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[9]); |
1081 | 1077 | ||||
1082 | if (unlikely(tmp_args_element_value_1 == NULL)) { | 1078 | if (unlikely(tmp_args_element_value_1 == NULL)) { | ||
t | 1083 | tmp_args_element_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(tstate, mod_consts[2]); | t | 1079 | tmp_args_element_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(tstate, mod_consts[9]); |
1084 | } | 1080 | } | ||
1085 | 1081 | ||||
1086 | assert(!(tmp_args_element_value_1 == NULL)); | 1082 | assert(!(tmp_args_element_value_1 == NULL)); | ||
1087 | frame_04d482b4a85d1c41cf9e950158e42681->m_frame.f_lineno = 27; | 1083 | frame_04d482b4a85d1c41cf9e950158e42681->m_frame.f_lineno = 27; | ||
1088 | tmp_call_result_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, tmp_called_value_1, tmp_args_element_value_1); | 1084 | tmp_call_result_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, tmp_called_value_1, tmp_args_element_value_1); |