Construct FunctionCreationGeneratorClosure

Performance Diagrams

Construct FunctionCreationGeneratorClosure 0040000004000000800000080000001200000012000000160000001600000020000000200000002400000024000000280000002800000032000000320000003600000036000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)3838740188.95192307692307257.0CPython 2.712302540242.31730769230768424.91890804625837Nuitka (master)12101420395.6826923076923426.2135996601513Nuitka (develop)12102370549.0480769230769426.207484121999Nuitka (factory)Construct FunctionCreationGeneratorClosureTicks Construct FunctionCreationGeneratorClosure 0010000000100000002000000020000000300000003000000040000000400000005000000050000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)5069018788.95192307692307257.0CPython 3.514203262242.31730769230768434.8742797853102Nuitka (master)14148766395.6826923076923435.1399485625826Nuitka (develop)14156263549.0480769230769435.10340058065344Nuitka (factory)Construct FunctionCreationGeneratorClosureTicks

Source Code with Construct

module_var = None

def calledRepeatedly():
    # We measure making a local function that will remain unused.
    closure_var = module_var

# construct_begin
    def empty():
        yield closure_var

# construct_alternative



    return empty, closure_var


import itertools
for x in itertools.repeat(None, 50000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

module_var = None

def calledRepeatedly():
    # We measure making a local function that will remain unused.
    closure_var = module_var

# construct_begin



# construct_alternative
    empty = 1
# construct_end

    return empty, closure_var


import itertools
for x in itertools.repeat(None, 50000):
    calledRepeatedly()

print("OK.")

Context Diff of Source Code


Construct
Baseline
23 def calledRepeatedly(): 23 def calledRepeatedly():
24     # We measure making a local function that will remain unused. 24     # We measure making a local function that will remain unused.
25     closure_var = module_var 25     closure_var = module_var
26 26
27 # construct_begin 27 # construct_begin
n 28     def empty(): n 28  
29         yield closure_var 29  
30 30
31 # construct_alternative 31 # construct_alternative
t 32   t 32     empty = 1
33   33 # construct_end
34 34
35     return empty, closure_var 35     return empty, closure_var
36 36
37 37
38 import itertools 38 import itertools

Context Diff of Generated Code


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[19]; n 36 static PyObject *mod_consts[17];
37 37
38 static PyObject *module_filename_obj = NULL; 38 static PyObject *module_filename_obj = NULL;
39 39
40 /* Indicator if this modules private constants were created yet. */ 40 /* Indicator if this modules private constants were created yet. */
41 static bool constants_created = false; 41 static bool constants_created = false;
42 42
43 /* Function to create module private constants. */ 43 /* Function to create module private constants. */
44 static void createModuleConstants(void) { 44 static void createModuleConstants(void) {
n 45     loadConstantsBlob(&mod_consts[0], "__main__", 19); n 45     loadConstantsBlob(&mod_consts[0], "__main__", 17);
46 46
47     constants_created = true; 47     constants_created = true;
48 } 48 }
49 49
50 /* Function to verify module private constants for non-corruption. */ 50 /* Function to verify module private constants for non-corruption. */
51 #ifndef __NUITKA_NO_ASSERT__ 51 #ifndef __NUITKA_NO_ASSERT__
52 void checkModuleConstants___main__(void) { 52 void checkModuleConstants___main__(void) {
53     // The module may not have been used at all, then ignore this. 53     // The module may not have been used at all, then ignore this.
54     if (constants_created == false) return; 54     if (constants_created == false) return;
55 55
n 56     checkConstantsBlob(&mod_consts[0], "__main__", 19); n 56     checkConstantsBlob(&mod_consts[0], "__main__", 17);
57 } 57 }
58 #endif 58 #endif
59 59
60 // The module code objects. 60 // The module code objects.
61 static PyCodeObject *codeobj_6ed0b3e1954f3c9f38d44fb22aaea8cf; 61 static PyCodeObject *codeobj_6ed0b3e1954f3c9f38d44fb22aaea8cf;
62 static PyCodeObject *codeobj_9b1b85a01c26fc4575ca15cc1bac04b5; 62 static PyCodeObject *codeobj_9b1b85a01c26fc4575ca15cc1bac04b5;
n 63 static PyCodeObject *codeobj_a007ba68ebd58efb4ec87485e61bc216; n
64 /* For use in "MainProgram.c". */ 63 /* For use in "MainProgram.c". */
65 PyCodeObject *codeobj_main = NULL; 64 PyCodeObject *codeobj_main = NULL;
66 65
67 static void createModuleCodeObjects(void) { 66 static void createModuleCodeObjects(void) {
n 68     module_filename_obj = mod_consts[4]; CHECK_OBJECT(module_filename_obj); n 67     module_filename_obj = mod_consts[3]; CHECK_OBJECT(module_filename_obj);
69     codeobj_6ed0b3e1954f3c9f38d44fb22aaea8cf = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[15], mod_consts[16], 0, 0, 0); 68     codeobj_6ed0b3e1954f3c9f38d44fb22aaea8cf = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[14], mod_consts[15], 0, 0, 0);
70     codeobj_9b1b85a01c26fc4575ca15cc1bac04b5 = MAKE_CODEOBJECT(module_filename_obj, 23, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[7], mod_consts[17], 0, 0, 0); 69     codeobj_9b1b85a01c26fc4575ca15cc1bac04b5 = MAKE_CODEOBJECT(module_filename_obj, 23, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[6], mod_consts[16], 0, 0, 0);
71     codeobj_a007ba68ebd58efb4ec87485e61bc216 = MAKE_CODEOBJECT(module_filename_obj, 28, CO_GENERATOR | CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[1], mod_consts[18], 0, 0, 0);
72 } 70 }
73 71
74 // The module function declarations. 72 // The module function declarations.
n 75 static PyObject *MAKE_GENERATOR___main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty(struct Nuitka_CellObject **closure); n
76  
77  
78 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(); 73 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly();
n 79   n
80  
81 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty(struct Nuitka_CellObject **closure);
82 74
83 75
84 // The module function definitions. 76 // The module function definitions.
85 static PyObject *impl___main__$$$function_1_calledRepeatedly(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { 77 static PyObject *impl___main__$$$function_1_calledRepeatedly(struct Nuitka_FunctionObject const *self, PyObject **python_pars) {
86     // Preserve error status for checks 78     // Preserve error status for checks
87 #ifndef __NUITKA_NO_ASSERT__ 79 #ifndef __NUITKA_NO_ASSERT__
88     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 80     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
89 #endif 81 #endif
90 82
91     // Local variable declarations. 83     // Local variable declarations.
n 92     struct Nuitka_CellObject *var_closure_var = Nuitka_Cell_Empty(); n
93     PyObject *var_empty = NULL; 84     PyObject *var_closure_var = NULL;
94     struct Nuitka_FrameObject *frame_9b1b85a01c26fc4575ca15cc1bac04b5; 85     struct Nuitka_FrameObject *frame_9b1b85a01c26fc4575ca15cc1bac04b5;
95     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; 86     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
96     PyObject *exception_type = NULL; 87     PyObject *exception_type = NULL;
97     PyObject *exception_value = NULL; 88     PyObject *exception_value = NULL;
98     PyTracebackObject *exception_tb = NULL; 89     PyTracebackObject *exception_tb = NULL;
147             FORMAT_NAME_ERROR(&exception_type, &exception_value, mod_consts[0]); 138             FORMAT_NAME_ERROR(&exception_type, &exception_value, mod_consts[0]);
148             NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); 139             NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb);
149             CHAIN_EXCEPTION(exception_value); 140             CHAIN_EXCEPTION(exception_value);
150 141
151             exception_lineno = 25; 142             exception_lineno = 25;
n 152             type_description_1 = "co"; n 143             type_description_1 = "oN";
153             goto frame_exception_exit_1; 144             goto frame_exception_exit_1;
154         } 145         }
155 146
156         tmp_assign_source_1 = tmp_mvar_value_1; 147         tmp_assign_source_1 = tmp_mvar_value_1;
n 157         assert(Nuitka_Cell_GET(var_closure_var) == NULL); n 148         assert(var_closure_var == NULL);
158         Py_INCREF(tmp_assign_source_1); 149         Py_INCREF(tmp_assign_source_1);
n 159         PyCell_SET(var_closure_var, tmp_assign_source_1); n 150         var_closure_var = tmp_assign_source_1;
160  
161     } 151     }
162 152
163 #if 0 153 #if 0
164     RESTORE_FRAME_EXCEPTION(frame_9b1b85a01c26fc4575ca15cc1bac04b5); 154     RESTORE_FRAME_EXCEPTION(frame_9b1b85a01c26fc4575ca15cc1bac04b5);
165 #endif 155 #endif
184     // Attachs locals to frame if any. 174     // Attachs locals to frame if any.
185     Nuitka_Frame_AttachLocals( 175     Nuitka_Frame_AttachLocals(
186         frame_9b1b85a01c26fc4575ca15cc1bac04b5, 176         frame_9b1b85a01c26fc4575ca15cc1bac04b5,
187         type_description_1, 177         type_description_1,
188         var_closure_var, 178         var_closure_var,
n 189         var_empty n 179         NULL
190     ); 180     );
191 181
192 182
193     // Release cached frame. 183     // Release cached frame.
194     if (frame_9b1b85a01c26fc4575ca15cc1bac04b5 == cache_frame_9b1b85a01c26fc4575ca15cc1bac04b5) { 184     if (frame_9b1b85a01c26fc4575ca15cc1bac04b5 == cache_frame_9b1b85a01c26fc4575ca15cc1bac04b5) {
209     // Return the error. 199     // Return the error.
210     goto try_except_handler_1; 200     goto try_except_handler_1;
211 201
212     frame_no_exception_1:; 202     frame_no_exception_1:;
213     { 203     {
n 214         PyObject *tmp_assign_source_2; n
215         struct Nuitka_CellObject *tmp_closure_1[1];
216  
217         tmp_closure_1[0] = var_closure_var;
218         Py_INCREF(tmp_closure_1[0]);
219  
220         tmp_assign_source_2 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty(tmp_closure_1);
221  
222         assert(var_empty == NULL);
223         var_empty = tmp_assign_source_2;
224     }
225     {
226         PyObject *tmp_tuple_element_1; 204         PyObject *tmp_tuple_element_1;
n 227         CHECK_OBJECT(var_empty); n
228         tmp_tuple_element_1 = var_empty; 205         tmp_tuple_element_1 = mod_consts[1];
229         tmp_return_value = PyTuple_New(2); 206         tmp_return_value = PyTuple_New(2);
230         Py_INCREF(tmp_tuple_element_1); 207         Py_INCREF(tmp_tuple_element_1);
231         PyTuple_SET_ITEM(tmp_return_value, 0, tmp_tuple_element_1); 208         PyTuple_SET_ITEM(tmp_return_value, 0, tmp_tuple_element_1);
n 232         CHECK_OBJECT(Nuitka_Cell_GET(var_closure_var)); n 209         CHECK_OBJECT(var_closure_var);
233         tmp_tuple_element_1 = Nuitka_Cell_GET(var_closure_var); 210         tmp_tuple_element_1 = var_closure_var;
234         Py_INCREF(tmp_tuple_element_1); 211         Py_INCREF(tmp_tuple_element_1);
235         PyTuple_SET_ITEM(tmp_return_value, 1, tmp_tuple_element_1); 212         PyTuple_SET_ITEM(tmp_return_value, 1, tmp_tuple_element_1);
236         goto try_return_handler_1; 213         goto try_return_handler_1;
237     } 214     }
238     NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); 215     NUITKA_CANNOT_GET_HERE("tried codes exits in all cases");
240     // Return handler code: 217     // Return handler code:
241     try_return_handler_1:; 218     try_return_handler_1:;
242     CHECK_OBJECT(var_closure_var); 219     CHECK_OBJECT(var_closure_var);
243     Py_DECREF(var_closure_var); 220     Py_DECREF(var_closure_var);
244     var_closure_var = NULL; 221     var_closure_var = NULL;
n 245   n
246     CHECK_OBJECT(var_empty);
247     Py_DECREF(var_empty);
248     var_empty = NULL;
249 222
250     goto function_return_exit; 223     goto function_return_exit;
251     // Exception handler code: 224     // Exception handler code:
252     try_except_handler_1:; 225     try_except_handler_1:;
253     exception_keeper_type_1 = exception_type; 226     exception_keeper_type_1 = exception_type;
287    assert(had_error || !ERROR_OCCURRED()); 260    assert(had_error || !ERROR_OCCURRED());
288    return tmp_return_value; 261    return tmp_return_value;
289 } 262 }
290 263
291 264
n 292 static PyObject *impl___main__$$$function_1_calledRepeatedly$$$function_1_empty(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { n
293     // Preserve error status for checks
294 #ifndef __NUITKA_NO_ASSERT__
295     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
296 #endif
297  
298     // Local variable declarations.
299     PyObject *tmp_return_value = NULL;
300  
301     // Actual function body.
302     {
303         struct Nuitka_CellObject *tmp_closure_1[1];
304  
305         tmp_closure_1[0] = self->m_closure[0];
306         Py_INCREF(tmp_closure_1[0]);
307  
308         tmp_return_value = MAKE_GENERATOR___main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty(tmp_closure_1);
309  
310         goto function_return_exit;
311     }
312  
313     NUITKA_CANNOT_GET_HERE("Return statement must have exited already.");
314     return NULL;
315  
316  
317 function_return_exit:
318    // Function cleanup code if any.
319  
320  
321    // Actual function exit with return value, making sure we did not make
322    // the error status worse despite non-NULL return.
323    CHECK_OBJECT(tmp_return_value);
324    assert(had_error || !ERROR_OCCURRED());
325    return tmp_return_value;
326 }
327  
328  
329  
330 struct __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_locals {
331     char const *type_description_1;
332     PyObject *exception_type;
333     PyObject *exception_value;
334     PyTracebackObject *exception_tb;
335     int exception_lineno;
336 };
337  
338 static PyObject *__main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_context(struct Nuitka_GeneratorObject *generator, PyObject *yield_return_value) {
339     CHECK_OBJECT(generator);
340     assert(Nuitka_Generator_Check((PyObject *)generator));
341     CHECK_OBJECT_X(yield_return_value);
342  
343     // Heap access if used.
344     struct __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_locals *generator_heap = (struct __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_locals *)generator->m_heap_storage;
345  
346     // Dispatch to yield based on return label index:
347     switch(generator->m_yield_return_index) {
348     case 1: goto yield_return_1;
349     }
350  
351     // Local variable initialization
352     NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused;
353     static struct Nuitka_FrameObject *cache_m_frame = NULL;
354     generator_heap->type_description_1 = NULL;
355     generator_heap->exception_type = NULL;
356     generator_heap->exception_value = NULL;
357     generator_heap->exception_tb = NULL;
358     generator_heap->exception_lineno = 0;
359  
360     // Actual generator function body.
361     if (isFrameUnusable(cache_m_frame)) {
362         Py_XDECREF(cache_m_frame);
363  
364 #if _DEBUG_REFCOUNTS
365         if (cache_m_frame == NULL) {
366             count_active_frame_cache_instances += 1;
367         } else {
368             count_released_frame_cache_instances += 1;
369         }
370         count_allocated_frame_cache_instances += 1;
371 #endif
372         cache_m_frame = MAKE_FUNCTION_FRAME(codeobj_a007ba68ebd58efb4ec87485e61bc216, module___main__, sizeof(void *));
373 #if _DEBUG_REFCOUNTS
374     } else {
375         count_hit_frame_cache_instances += 1;
376 #endif
377     }
378     generator->m_frame = cache_m_frame;
379  
380     // Mark the frame object as in use, ref count 1 will be up for reuse.
381     Py_INCREF(generator->m_frame);
382     assert(Py_REFCNT(generator->m_frame) == 2); // Frame stack
383  
384 #if PYTHON_VERSION >= 340
385     generator->m_frame->m_frame.f_gen = (PyObject *)generator;
386 #endif
387  
388     assert(generator->m_frame->m_frame.f_back == NULL);
389     Py_CLEAR(generator->m_frame->m_frame.f_back);
390  
391     generator->m_frame->m_frame.f_back = PyThreadState_GET()->frame;
392     Py_INCREF(generator->m_frame->m_frame.f_back);
393  
394     PyThreadState_GET()->frame = &generator->m_frame->m_frame;
395     Py_INCREF(generator->m_frame);
396  
397     Nuitka_Frame_MarkAsExecuting(generator->m_frame);
398  
399 #if PYTHON_VERSION >= 300
400     // Accept currently existing exception as the one to publish again when we
401     // yield or yield from.
402     {
403         PyThreadState *thread_state = PyThreadState_GET();
404  
405         EXC_TYPE_F(generator) = EXC_TYPE(thread_state);
406         if (EXC_TYPE_F(generator) == Py_None) EXC_TYPE_F(generator) = NULL;
407         Py_XINCREF(EXC_TYPE_F(generator));
408         EXC_VALUE_F(generator) = EXC_VALUE(thread_state);
409         Py_XINCREF(EXC_VALUE_F(generator));
410         EXC_TRACEBACK_F(generator) = EXC_TRACEBACK(thread_state);
411         Py_XINCREF(EXC_TRACEBACK_F(generator));
412     }
413  
414 #endif
415  
416     // Framed code:
417     {
418         PyObject *tmp_expression_name_1;
419         NUITKA_MAY_BE_UNUSED PyObject *tmp_yield_result_1;
420         if (Nuitka_Cell_GET(generator->m_closure[0]) == NULL) {
421  
422             generator_heap->exception_type = PyExc_NameError;
423             Py_INCREF(generator_heap->exception_type);
424             generator_heap->exception_value = PyUnicode_FromFormat("free variable '%s' referenced before assignment in enclosing scope", "closure_var");
425             generator_heap->exception_tb = NULL;
426             NORMALIZE_EXCEPTION(&generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb);
427             CHAIN_EXCEPTION(generator_heap->exception_value);
428  
429             generator_heap->exception_lineno = 29;
430             generator_heap->type_description_1 = "c";
431             goto frame_exception_exit_1;
432         }
433  
434         tmp_expression_name_1 = Nuitka_Cell_GET(generator->m_closure[0]);
435         Py_INCREF(tmp_expression_name_1);
436         generator->m_yield_return_index = 1;
437         return tmp_expression_name_1;
438         yield_return_1:
439         if (yield_return_value == NULL) {
440             assert(ERROR_OCCURRED());
441  
442             FETCH_ERROR_OCCURRED(&generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb);
443  
444  
445             generator_heap->exception_lineno = 29;
446             generator_heap->type_description_1 = "c";
447             goto frame_exception_exit_1;
448         }
449         tmp_yield_result_1 = yield_return_value;
450     }
451  
452     Nuitka_Frame_MarkAsNotExecuting(generator->m_frame);
453  
454 #if PYTHON_VERSION >= 300
455     Py_CLEAR(EXC_TYPE_F(generator));
456     Py_CLEAR(EXC_VALUE_F(generator));
457     Py_CLEAR(EXC_TRACEBACK_F(generator));
458 #endif
459  
460     // Allow re-use of the frame again.
461     Py_DECREF(generator->m_frame);
462     goto frame_no_exception_1;
463  
464     frame_exception_exit_1:;
465  
466     // If it's not an exit exception, consider and create a traceback for it.
467     if (!EXCEPTION_MATCH_GENERATOR(generator_heap->exception_type)) {
468         if (generator_heap->exception_tb == NULL) {
469             generator_heap->exception_tb = MAKE_TRACEBACK(generator->m_frame, generator_heap->exception_lineno);
470         } else if (generator_heap->exception_tb->tb_frame != &generator->m_frame->m_frame) {
471             generator_heap->exception_tb = ADD_TRACEBACK(generator_heap->exception_tb, generator->m_frame, generator_heap->exception_lineno);
472         }
473  
474         Nuitka_Frame_AttachLocals(
475             generator->m_frame,
476             generator_heap->type_description_1,
477             generator->m_closure[0]
478         );
479  
480  
481         // Release cached frame.
482         if (generator->m_frame == cache_m_frame) {
483 #if _DEBUG_REFCOUNTS
484             count_active_frame_cache_instances -= 1;
485             count_released_frame_cache_instances += 1;
486 #endif
487  
488             Py_DECREF(generator->m_frame);
489         }
490         cache_m_frame = NULL;
491  
492         assertFrameObject(generator->m_frame);
493     }
494  
495 #if PYTHON_VERSION >= 300
496     Py_CLEAR(EXC_TYPE_F(generator));
497     Py_CLEAR(EXC_VALUE_F(generator));
498     Py_CLEAR(EXC_TRACEBACK_F(generator));
499 #endif
500  
501     Py_DECREF(generator->m_frame);
502  
503     // Return the error.
504     goto function_exception_exit;
505  
506     frame_no_exception_1:;
507  
508  
509     return NULL;
510  
511     function_exception_exit:
512     assert(generator_heap->exception_type);
513     RESTORE_ERROR_OCCURRED(generator_heap->exception_type, generator_heap->exception_value, generator_heap->exception_tb);
514  
515     return NULL;
516  
517 }
518  
519 static PyObject *MAKE_GENERATOR___main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty(struct Nuitka_CellObject **closure) {
520     return Nuitka_Generator_New(
521         __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_context,
522         module___main__,
523         mod_consts[1],
524 #if PYTHON_VERSION >= 350
525         mod_consts[2],
526 #endif
527         codeobj_a007ba68ebd58efb4ec87485e61bc216,
528         closure,
529         1,
530         sizeof(struct __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_locals)
531     );
532 }
533  
534  
535 265
536 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly() { 266 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly() {
537     struct Nuitka_FunctionObject *result = Nuitka_Function_New( 267     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
538         impl___main__$$$function_1_calledRepeatedly, 268         impl___main__$$$function_1_calledRepeatedly,
n 539         mod_consts[7], n 269         mod_consts[6],
540 #if PYTHON_VERSION >= 300 270 #if PYTHON_VERSION >= 300
541         NULL, 271         NULL,
542 #endif 272 #endif
543         codeobj_9b1b85a01c26fc4575ca15cc1bac04b5, 273         codeobj_9b1b85a01c26fc4575ca15cc1bac04b5,
544         NULL, 274         NULL,
554 284
555     return (PyObject *)result; 285     return (PyObject *)result;
556 } 286 }
557 287
558 288
n 559   n
560 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty(struct Nuitka_CellObject **closure) {
561     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
562         impl___main__$$$function_1_calledRepeatedly$$$function_1_empty,
563         mod_consts[1],
564 #if PYTHON_VERSION >= 300
565         mod_consts[2],
566 #endif
567         codeobj_a007ba68ebd58efb4ec87485e61bc216,
568         NULL,
569 #if PYTHON_VERSION >= 300
570         NULL,
571         NULL,
572 #endif
573         module___main__,
574         NULL,
575         closure,
576         1
577     );
578  
579     return (PyObject *)result;
580 }
581  
582  
583 extern void _initCompiledCellType(); 289 extern void _initCompiledCellType();
584 extern void _initCompiledGeneratorType(); 290 extern void _initCompiledGeneratorType();
585 extern void _initCompiledFunctionType(); 291 extern void _initCompiledFunctionType();
586 extern void _initCompiledMethodType(); 292 extern void _initCompiledMethodType();
587 extern void _initCompiledFrameType(); 293 extern void _initCompiledFrameType();
591 #ifdef _NUITKA_PLUGIN_DILL_ENABLED 297 #ifdef _NUITKA_PLUGIN_DILL_ENABLED
592 // Provide a way to create find a function via its C code and create it back 298 // Provide a way to create find a function via its C code and create it back
593 // in another process, useful for multiprocessing extensions like dill 299 // in another process, useful for multiprocessing extensions like dill
594 300
595 function_impl_code functable___main__[] = { 301 function_impl_code functable___main__[] = {
n 596     impl___main__$$$function_1_calledRepeatedly$$$function_1_empty, n
597     impl___main__$$$function_1_calledRepeatedly, 302     impl___main__$$$function_1_calledRepeatedly,
598     NULL 303     NULL
599 }; 304 };
600 305
601 static char const *_reduce_compiled_function_argnames[] = { 306 static char const *_reduce_compiled_function_argnames[] = {
960 665
961     // Module code. 666     // Module code.
962     { 667     {
963         PyObject *tmp_assign_source_1; 668         PyObject *tmp_assign_source_1;
964         tmp_assign_source_1 = Py_None; 669         tmp_assign_source_1 = Py_None;
n 965         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[3], tmp_assign_source_1); n 670         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[2], tmp_assign_source_1);
966     } 671     }
967     { 672     {
968         PyObject *tmp_assign_source_2; 673         PyObject *tmp_assign_source_2;
n 969         tmp_assign_source_2 = mod_consts[4]; n 674         tmp_assign_source_2 = mod_consts[3];
970         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_2); 675         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_2);
971     } 676     }
972     { 677     {
973         PyObject *tmp_assign_source_3; 678         PyObject *tmp_assign_source_3;
974         tmp_assign_source_3 = Py_None; 679         tmp_assign_source_3 = Py_None;
n 975         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_3); n 680         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_3);
976     } 681     }
977     { 682     {
978         PyObject *tmp_assign_source_4; 683         PyObject *tmp_assign_source_4;
979         tmp_assign_source_4 = Py_None; 684         tmp_assign_source_4 = Py_None;
980         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_4); 685         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_4);
983         PyObject *tmp_assign_source_5; 688         PyObject *tmp_assign_source_5;
984 689
985 690
986         tmp_assign_source_5 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(); 691         tmp_assign_source_5 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly();
987 692
n 988         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[7], tmp_assign_source_5); n 693         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_5);
989     } 694     }
990     { 695     {
991         PyObject *tmp_assign_source_6; 696         PyObject *tmp_assign_source_6;
992         PyObject *tmp_name_name_1; 697         PyObject *tmp_name_name_1;
993         PyObject *tmp_globals_name_1; 698         PyObject *tmp_globals_name_1;
994         PyObject *tmp_locals_name_1; 699         PyObject *tmp_locals_name_1;
995         PyObject *tmp_fromlist_name_1; 700         PyObject *tmp_fromlist_name_1;
996         PyObject *tmp_level_name_1; 701         PyObject *tmp_level_name_1;
n 997         tmp_name_name_1 = mod_consts[8]; n 702         tmp_name_name_1 = mod_consts[7];
998         tmp_globals_name_1 = (PyObject *)moduledict___main__; 703         tmp_globals_name_1 = (PyObject *)moduledict___main__;
999         tmp_locals_name_1 = Py_None; 704         tmp_locals_name_1 = Py_None;
1000         tmp_fromlist_name_1 = Py_None; 705         tmp_fromlist_name_1 = Py_None;
n 1001         tmp_level_name_1 = mod_consts[9]; n 706         tmp_level_name_1 = mod_consts[8];
1002         tmp_assign_source_6 = IMPORT_MODULE5(tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1); 707         tmp_assign_source_6 = IMPORT_MODULE5(tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1);
1003         assert(!(tmp_assign_source_6 == NULL)); 708         assert(!(tmp_assign_source_6 == NULL));
n 1004         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[8], tmp_assign_source_6); n 709         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[7], tmp_assign_source_6);
1005     } 710     }
1006     // Frame without reuse. 711     // Frame without reuse.
1007     frame_6ed0b3e1954f3c9f38d44fb22aaea8cf = MAKE_MODULE_FRAME(codeobj_6ed0b3e1954f3c9f38d44fb22aaea8cf, module___main__); 712     frame_6ed0b3e1954f3c9f38d44fb22aaea8cf = MAKE_MODULE_FRAME(codeobj_6ed0b3e1954f3c9f38d44fb22aaea8cf, module___main__);
1008 713
1009     // Push the new frame as the currently active one, and we should be exclusively 714     // Push the new frame as the currently active one, and we should be exclusively
1015     { 720     {
1016         PyObject *tmp_assign_source_7; 721         PyObject *tmp_assign_source_7;
1017         PyObject *tmp_iter_arg_1; 722         PyObject *tmp_iter_arg_1;
1018         PyObject *tmp_called_instance_1; 723         PyObject *tmp_called_instance_1;
1019         PyObject *tmp_mvar_value_1; 724         PyObject *tmp_mvar_value_1;
n 1020         tmp_mvar_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[8]); n 725         tmp_mvar_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[7]);
1021 726
1022         if (unlikely(tmp_mvar_value_1 == NULL)) { 727         if (unlikely(tmp_mvar_value_1 == NULL)) {
n 1023             tmp_mvar_value_1 = GET_STRING_DICT_VALUE(dict_builtin, (Nuitka_StringObject *)mod_consts[8]); n 728             tmp_mvar_value_1 = GET_STRING_DICT_VALUE(dict_builtin, (Nuitka_StringObject *)mod_consts[7]);
1024         } 729         }
1025 730
1026         CHECK_OBJECT(tmp_mvar_value_1); 731         CHECK_OBJECT(tmp_mvar_value_1);
1027         tmp_called_instance_1 = tmp_mvar_value_1; 732         tmp_called_instance_1 = tmp_mvar_value_1;
1028         frame_6ed0b3e1954f3c9f38d44fb22aaea8cf->m_frame.f_lineno = 39; 733         frame_6ed0b3e1954f3c9f38d44fb22aaea8cf->m_frame.f_lineno = 39;
n 1029         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2(tmp_called_instance_1, mod_consts[10], &PyTuple_GET_ITEM(mod_consts[11], 0)); n 734         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2(tmp_called_instance_1, mod_consts[9], &PyTuple_GET_ITEM(mod_consts[10], 0));
1030 735
1031         if (tmp_iter_arg_1 == NULL) { 736         if (tmp_iter_arg_1 == NULL) {
1032             assert(ERROR_OCCURRED()); 737             assert(ERROR_OCCURRED());
1033 738
1034             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 739             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1083     } 788     }
1084     { 789     {
1085         PyObject *tmp_assign_source_9; 790         PyObject *tmp_assign_source_9;
1086         CHECK_OBJECT(tmp_for_loop_1__iter_value); 791         CHECK_OBJECT(tmp_for_loop_1__iter_value);
1087         tmp_assign_source_9 = tmp_for_loop_1__iter_value; 792         tmp_assign_source_9 = tmp_for_loop_1__iter_value;
n 1088         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[12], tmp_assign_source_9); n 793         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[11], tmp_assign_source_9);
1089     } 794     }
1090     { 795     {
1091         PyObject *tmp_called_name_1; 796         PyObject *tmp_called_name_1;
1092         PyObject *tmp_mvar_value_2; 797         PyObject *tmp_mvar_value_2;
1093         PyObject *tmp_call_result_1; 798         PyObject *tmp_call_result_1;
n 1094         tmp_mvar_value_2 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[7]); n 799         tmp_mvar_value_2 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[6]);
1095 800
1096         if (unlikely(tmp_mvar_value_2 == NULL)) { 801         if (unlikely(tmp_mvar_value_2 == NULL)) {
n 1097             tmp_mvar_value_2 = GET_STRING_DICT_VALUE(dict_builtin, (Nuitka_StringObject *)mod_consts[7]); n 802             tmp_mvar_value_2 = GET_STRING_DICT_VALUE(dict_builtin, (Nuitka_StringObject *)mod_consts[6]);
1098         } 803         }
1099 804
1100         if (unlikely(tmp_mvar_value_2 == NULL)) { 805         if (unlikely(tmp_mvar_value_2 == NULL)) {
1101 806
n 1102             FORMAT_NAME_ERROR(&exception_type, &exception_value, mod_consts[7]); n 807             FORMAT_NAME_ERROR(&exception_type, &exception_value, mod_consts[6]);
1103             NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); 808             NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb);
1104             CHAIN_EXCEPTION(exception_value); 809             CHAIN_EXCEPTION(exception_value);
1105 810
1106             exception_lineno = 40; 811             exception_lineno = 40;
1107 812
1171     tmp_for_loop_1__for_iterator = NULL; 876     tmp_for_loop_1__for_iterator = NULL;
1172 877
1173     { 878     {
1174         PyObject *tmp_called_name_2; 879         PyObject *tmp_called_name_2;
1175         PyObject *tmp_call_result_2; 880         PyObject *tmp_call_result_2;
n 1176         tmp_called_name_2 = LOOKUP_BUILTIN(mod_consts[13]); n 881         tmp_called_name_2 = LOOKUP_BUILTIN(mod_consts[12]);
1177         assert(tmp_called_name_2 != NULL); 882         assert(tmp_called_name_2 != NULL);
1178         frame_6ed0b3e1954f3c9f38d44fb22aaea8cf->m_frame.f_lineno = 42; 883         frame_6ed0b3e1954f3c9f38d44fb22aaea8cf->m_frame.f_lineno = 42;
t 1179         tmp_call_result_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, mod_consts[14]); t 884         tmp_call_result_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, mod_consts[13]);
1180         if (tmp_call_result_2 == NULL) { 885         if (tmp_call_result_2 == NULL) {
1181             assert(ERROR_OCCURRED()); 886             assert(ERROR_OCCURRED());
1182 887
1183             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 888             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1184 889