Construct FunctionCreationGeneratorClosure

Performance Diagrams

Construct FunctionCreationGeneratorClosure 0040000004000000800000080000001200000012000000160000001600000020000000200000002400000024000000280000002800000032000000320000003600000036000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)3838746588.95192307692307257.0CPython 2.712102834242.31730769230768426.20462705829783Nuitka (master)12502834395.6826923076923423.62966791874135Nuitka (develop)12502834549.0480769230769423.62966791874135Nuitka (factory)Construct FunctionCreationGeneratorClosureTicks Construct FunctionCreationGeneratorClosure 0010000000100000002000000020000000300000003000000040000000400000005000000050000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)5069021388.95192307692307257.0CPython 3.514156079242.31730769230768435.1043329804118Nuitka (master)14604776395.6826923076923432.9169298276421Nuitka (develop)14604838549.0480769230769432.9166275769128Nuitka (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[20]; 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__", 20); 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__", 20); 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_f8b6bc6e7f20fbe6078cd36a10bc56c7; 61 static PyCodeObject *codeobj_f8b6bc6e7f20fbe6078cd36a10bc56c7;
62 static PyCodeObject *codeobj_51eafd8c452ab6933403c7afdb1b04d6; 62 static PyCodeObject *codeobj_51eafd8c452ab6933403c7afdb1b04d6;
n 63 static PyCodeObject *codeobj_4324d8a216e6a59fcc2e1ab023f1277b; 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[5]; CHECK_OBJECT(module_filename_obj); n 67     module_filename_obj = mod_consts[3]; CHECK_OBJECT(module_filename_obj);
69     codeobj_f8b6bc6e7f20fbe6078cd36a10bc56c7 = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[16], mod_consts[17], 0, 0, 0); 68     codeobj_f8b6bc6e7f20fbe6078cd36a10bc56c7 = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[14], mod_consts[15], 0, 0, 0);
70     codeobj_51eafd8c452ab6933403c7afdb1b04d6 = MAKE_CODEOBJECT(module_filename_obj, 23, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[8], mod_consts[18], 0, 0, 0); 69     codeobj_51eafd8c452ab6933403c7afdb1b04d6 = MAKE_CODEOBJECT(module_filename_obj, 23, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[6], mod_consts[16], 0, 0, 0);
71     codeobj_4324d8a216e6a59fcc2e1ab023f1277b = MAKE_CODEOBJECT(module_filename_obj, 28, CO_GENERATOR | CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[1], mod_consts[19], 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_51eafd8c452ab6933403c7afdb1b04d6; 85     struct Nuitka_FrameObject *frame_51eafd8c452ab6933403c7afdb1b04d6;
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;
141 132
142             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 133             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
143 134
144 135
145             exception_lineno = 25; 136             exception_lineno = 25;
n 146             type_description_1 = "co"; n 137             type_description_1 = "oN";
147             goto frame_exception_exit_1; 138             goto frame_exception_exit_1;
148         } 139         }
n 149         assert(Nuitka_Cell_GET(var_closure_var) == NULL); n 140         assert(var_closure_var == NULL);
150         Py_INCREF(tmp_assign_source_1); 141         Py_INCREF(tmp_assign_source_1);
n 151         PyCell_SET(var_closure_var, tmp_assign_source_1); n 142         var_closure_var = tmp_assign_source_1;
152  
153     } 143     }
154 144
155 #if 0 145 #if 0
156     RESTORE_FRAME_EXCEPTION(frame_51eafd8c452ab6933403c7afdb1b04d6); 146     RESTORE_FRAME_EXCEPTION(frame_51eafd8c452ab6933403c7afdb1b04d6);
157 #endif 147 #endif
176     // Attaches locals to frame if any. 166     // Attaches locals to frame if any.
177     Nuitka_Frame_AttachLocals( 167     Nuitka_Frame_AttachLocals(
178         frame_51eafd8c452ab6933403c7afdb1b04d6, 168         frame_51eafd8c452ab6933403c7afdb1b04d6,
179         type_description_1, 169         type_description_1,
180         var_closure_var, 170         var_closure_var,
n 181         var_empty n 171         NULL
182     ); 172     );
183 173
184 174
185     // Release cached frame. 175     // Release cached frame.
186     if (frame_51eafd8c452ab6933403c7afdb1b04d6 == cache_frame_51eafd8c452ab6933403c7afdb1b04d6) { 176     if (frame_51eafd8c452ab6933403c7afdb1b04d6 == cache_frame_51eafd8c452ab6933403c7afdb1b04d6) {
201     // Return the error. 191     // Return the error.
202     goto try_except_handler_1; 192     goto try_except_handler_1;
203 193
204     frame_no_exception_1:; 194     frame_no_exception_1:;
205     { 195     {
n 206         PyObject *tmp_assign_source_2; n
207         struct Nuitka_CellObject *tmp_closure_1[1];
208  
209         tmp_closure_1[0] = var_closure_var;
210         Py_INCREF(tmp_closure_1[0]);
211  
212         tmp_assign_source_2 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty(tmp_closure_1);
213  
214         assert(var_empty == NULL);
215         var_empty = tmp_assign_source_2;
216     }
217     {
218         PyObject *tmp_tuple_element_1; 196         PyObject *tmp_tuple_element_1;
219         tmp_return_value = PyTuple_New(2); 197         tmp_return_value = PyTuple_New(2);
n 220         CHECK_OBJECT(var_empty); n
221         tmp_tuple_element_1 = var_empty; 198         tmp_tuple_element_1 = mod_consts[1];
222         PyTuple_SET_ITEM0(tmp_return_value, 0, tmp_tuple_element_1); 199         PyTuple_SET_ITEM0(tmp_return_value, 0, tmp_tuple_element_1);
n 223         CHECK_OBJECT(Nuitka_Cell_GET(var_closure_var)); n 200         CHECK_OBJECT(var_closure_var);
224         tmp_tuple_element_1 = Nuitka_Cell_GET(var_closure_var); 201         tmp_tuple_element_1 = var_closure_var;
225         PyTuple_SET_ITEM0(tmp_return_value, 1, tmp_tuple_element_1); 202         PyTuple_SET_ITEM0(tmp_return_value, 1, tmp_tuple_element_1);
226         goto try_return_handler_1; 203         goto try_return_handler_1;
227     } 204     }
228     NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); 205     NUITKA_CANNOT_GET_HERE("tried codes exits in all cases");
229     return NULL; 206     return NULL;
230     // Return handler code: 207     // Return handler code:
231     try_return_handler_1:; 208     try_return_handler_1:;
232     CHECK_OBJECT(var_closure_var); 209     CHECK_OBJECT(var_closure_var);
233     Py_DECREF(var_closure_var); 210     Py_DECREF(var_closure_var);
234     var_closure_var = NULL; 211     var_closure_var = NULL;
n 235     CHECK_OBJECT(var_empty); n
236     Py_DECREF(var_empty);
237     var_empty = NULL;
238     goto function_return_exit; 212     goto function_return_exit;
239     // Exception handler code: 213     // Exception handler code:
240     try_except_handler_1:; 214     try_except_handler_1:;
241     exception_keeper_type_1 = exception_type; 215     exception_keeper_type_1 = exception_type;
242     exception_keeper_value_1 = exception_value; 216     exception_keeper_value_1 = exception_value;
275    assert(had_error || !ERROR_OCCURRED()); 249    assert(had_error || !ERROR_OCCURRED());
276    return tmp_return_value; 250    return tmp_return_value;
277 } 251 }
278 252
279 253
n 280 static PyObject *impl___main__$$$function_1_calledRepeatedly$$$function_1_empty(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { n
281     // Preserve error status for checks
282 #ifndef __NUITKA_NO_ASSERT__
283     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
284 #endif
285  
286     // Local variable declarations.
287     PyObject *tmp_return_value = NULL;
288  
289     // Actual function body.
290     {
291         struct Nuitka_CellObject *tmp_closure_1[1];
292  
293         tmp_closure_1[0] = self->m_closure[0];
294         Py_INCREF(tmp_closure_1[0]);
295  
296         tmp_return_value = MAKE_GENERATOR___main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty(tmp_closure_1);
297  
298         goto function_return_exit;
299     }
300  
301     NUITKA_CANNOT_GET_HERE("Return statement must have exited already.");
302     return NULL;
303  
304  
305 function_return_exit:
306    // Function cleanup code if any.
307  
308  
309    // Actual function exit with return value, making sure we did not make
310    // the error status worse despite non-NULL return.
311    CHECK_OBJECT(tmp_return_value);
312    assert(had_error || !ERROR_OCCURRED());
313    return tmp_return_value;
314 }
315  
316  
317  
318 struct __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_locals {
319     char const *type_description_1;
320     PyObject *exception_type;
321     PyObject *exception_value;
322     PyTracebackObject *exception_tb;
323     int exception_lineno;
324 };
325  
326 static PyObject *__main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_context(struct Nuitka_GeneratorObject *generator, PyObject *yield_return_value) {
327     CHECK_OBJECT(generator);
328     assert(Nuitka_Generator_Check((PyObject *)generator));
329     CHECK_OBJECT_X(yield_return_value);
330  
331     // Heap access if used.
332     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;
333  
334     // Dispatch to yield based on return label index:
335     switch(generator->m_yield_return_index) {
336     case 1: goto yield_return_1;
337     }
338  
339     // Local variable initialization
340     NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused;
341     static struct Nuitka_FrameObject *cache_m_frame = NULL;
342     generator_heap->type_description_1 = NULL;
343     generator_heap->exception_type = NULL;
344     generator_heap->exception_value = NULL;
345     generator_heap->exception_tb = NULL;
346     generator_heap->exception_lineno = 0;
347  
348     // Actual generator function body.
349     if (isFrameUnusable(cache_m_frame)) {
350         Py_XDECREF(cache_m_frame);
351  
352 #if _DEBUG_REFCOUNTS
353         if (cache_m_frame == NULL) {
354             count_active_frame_cache_instances += 1;
355         } else {
356             count_released_frame_cache_instances += 1;
357         }
358         count_allocated_frame_cache_instances += 1;
359 #endif
360         cache_m_frame = MAKE_FUNCTION_FRAME(codeobj_4324d8a216e6a59fcc2e1ab023f1277b, module___main__, sizeof(void *));
361 #if _DEBUG_REFCOUNTS
362     } else {
363         count_hit_frame_cache_instances += 1;
364 #endif
365     }
366     generator->m_frame = cache_m_frame;
367  
368     // Mark the frame object as in use, ref count 1 will be up for reuse.
369     Py_INCREF(generator->m_frame);
370     assert(Py_REFCNT(generator->m_frame) == 2); // Frame stack
371  
372 #if PYTHON_VERSION >= 340
373     generator->m_frame->m_frame.f_gen = (PyObject *)generator;
374 #endif
375  
376     assert(generator->m_frame->m_frame.f_back == NULL);
377     Py_CLEAR(generator->m_frame->m_frame.f_back);
378  
379     generator->m_frame->m_frame.f_back = PyThreadState_GET()->frame;
380     Py_INCREF(generator->m_frame->m_frame.f_back);
381  
382     PyThreadState_GET()->frame = &generator->m_frame->m_frame;
383     Py_INCREF(generator->m_frame);
384  
385     Nuitka_Frame_MarkAsExecuting(generator->m_frame);
386  
387 #if PYTHON_VERSION >= 300
388     // Accept currently existing exception as the one to publish again when we
389     // yield or yield from.
390     {
391         PyThreadState *thread_state = PyThreadState_GET();
392  
393         EXC_TYPE_F(generator) = EXC_TYPE(thread_state);
394         if (EXC_TYPE_F(generator) == Py_None) EXC_TYPE_F(generator) = NULL;
395         Py_XINCREF(EXC_TYPE_F(generator));
396         EXC_VALUE_F(generator) = EXC_VALUE(thread_state);
397         Py_XINCREF(EXC_VALUE_F(generator));
398         EXC_TRACEBACK_F(generator) = EXC_TRACEBACK(thread_state);
399         Py_XINCREF(EXC_TRACEBACK_F(generator));
400     }
401  
402 #endif
403  
404     // Framed code:
405     {
406         PyObject *tmp_expression_name_1;
407         NUITKA_MAY_BE_UNUSED PyObject *tmp_yield_result_1;
408         if (Nuitka_Cell_GET(generator->m_closure[0]) == NULL) {
409  
410             FORMAT_UNBOUND_CLOSURE_ERROR(&generator_heap->exception_type, &generator_heap->exception_value, mod_consts[3]);
411             generator_heap->exception_tb = NULL;
412             NORMALIZE_EXCEPTION(&generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb);
413             CHAIN_EXCEPTION(generator_heap->exception_value);
414  
415             generator_heap->exception_lineno = 29;
416             generator_heap->type_description_1 = "c";
417             goto frame_exception_exit_1;
418         }
419  
420         tmp_expression_name_1 = Nuitka_Cell_GET(generator->m_closure[0]);
421         Py_INCREF(tmp_expression_name_1);
422         generator->m_yield_return_index = 1;
423         return tmp_expression_name_1;
424         yield_return_1:
425         if (yield_return_value == NULL) {
426             assert(ERROR_OCCURRED());
427  
428             FETCH_ERROR_OCCURRED(&generator_heap->exception_type, &generator_heap->exception_value, &generator_heap->exception_tb);
429  
430  
431             generator_heap->exception_lineno = 29;
432             generator_heap->type_description_1 = "c";
433             goto frame_exception_exit_1;
434         }
435         tmp_yield_result_1 = yield_return_value;
436     }
437  
438     Nuitka_Frame_MarkAsNotExecuting(generator->m_frame);
439  
440 #if PYTHON_VERSION >= 300
441     Py_CLEAR(EXC_TYPE_F(generator));
442     Py_CLEAR(EXC_VALUE_F(generator));
443     Py_CLEAR(EXC_TRACEBACK_F(generator));
444 #endif
445  
446     // Allow re-use of the frame again.
447     Py_DECREF(generator->m_frame);
448     goto frame_no_exception_1;
449  
450     frame_exception_exit_1:;
451  
452     // If it's not an exit exception, consider and create a traceback for it.
453     if (!EXCEPTION_MATCH_GENERATOR(generator_heap->exception_type)) {
454         if (generator_heap->exception_tb == NULL) {
455             generator_heap->exception_tb = MAKE_TRACEBACK(generator->m_frame, generator_heap->exception_lineno);
456         } else if (generator_heap->exception_tb->tb_frame != &generator->m_frame->m_frame) {
457             generator_heap->exception_tb = ADD_TRACEBACK(generator_heap->exception_tb, generator->m_frame, generator_heap->exception_lineno);
458         }
459  
460         Nuitka_Frame_AttachLocals(
461             generator->m_frame,
462             generator_heap->type_description_1,
463             generator->m_closure[0]
464         );
465  
466  
467         // Release cached frame.
468         if (generator->m_frame == cache_m_frame) {
469 #if _DEBUG_REFCOUNTS
470             count_active_frame_cache_instances -= 1;
471             count_released_frame_cache_instances += 1;
472 #endif
473  
474             Py_DECREF(generator->m_frame);
475         }
476         cache_m_frame = NULL;
477  
478         assertFrameObject(generator->m_frame);
479     }
480  
481 #if PYTHON_VERSION >= 300
482     Py_CLEAR(EXC_TYPE_F(generator));
483     Py_CLEAR(EXC_VALUE_F(generator));
484     Py_CLEAR(EXC_TRACEBACK_F(generator));
485 #endif
486  
487     Py_DECREF(generator->m_frame);
488  
489     // Return the error.
490     goto function_exception_exit;
491  
492     frame_no_exception_1:;
493  
494  
495     return NULL;
496  
497     function_exception_exit:
498     assert(generator_heap->exception_type);
499     RESTORE_ERROR_OCCURRED(generator_heap->exception_type, generator_heap->exception_value, generator_heap->exception_tb);
500  
501     return NULL;
502  
503 }
504  
505 static PyObject *MAKE_GENERATOR___main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty(struct Nuitka_CellObject **closure) {
506     return Nuitka_Generator_New(
507         __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_context,
508         module___main__,
509         mod_consts[1],
510 #if PYTHON_VERSION >= 350
511         mod_consts[2],
512 #endif
513         codeobj_4324d8a216e6a59fcc2e1ab023f1277b,
514         closure,
515         1,
516         sizeof(struct __main__$$$function_1_calledRepeatedly$$$function_1_empty$$$genobj_1_empty_locals)
517     );
518 }
519  
520  
521 254
522 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly() { 255 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly() {
523     struct Nuitka_FunctionObject *result = Nuitka_Function_New( 256     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
524         impl___main__$$$function_1_calledRepeatedly, 257         impl___main__$$$function_1_calledRepeatedly,
n 525         mod_consts[8], n 258         mod_consts[6],
526 #if PYTHON_VERSION >= 300 259 #if PYTHON_VERSION >= 300
527         NULL, 260         NULL,
528 #endif 261 #endif
529         codeobj_51eafd8c452ab6933403c7afdb1b04d6, 262         codeobj_51eafd8c452ab6933403c7afdb1b04d6,
530         NULL, 263         NULL,
541 274
542     return (PyObject *)result; 275     return (PyObject *)result;
543 } 276 }
544 277
545 278
n 546   n
547 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty(struct Nuitka_CellObject **closure) {
548     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
549         impl___main__$$$function_1_calledRepeatedly$$$function_1_empty,
550         mod_consts[1],
551 #if PYTHON_VERSION >= 300
552         mod_consts[2],
553 #endif
554         codeobj_4324d8a216e6a59fcc2e1ab023f1277b,
555         NULL,
556 #if PYTHON_VERSION >= 300
557         NULL,
558         NULL,
559 #endif
560         module___main__,
561         NULL,
562         closure,
563         1
564     );
565  
566  
567     return (PyObject *)result;
568 }
569  
570  
571 extern void _initCompiledCellType(); 279 extern void _initCompiledCellType();
572 extern void _initCompiledGeneratorType(); 280 extern void _initCompiledGeneratorType();
573 extern void _initCompiledFunctionType(); 281 extern void _initCompiledFunctionType();
574 extern void _initCompiledMethodType(); 282 extern void _initCompiledMethodType();
575 extern void _initCompiledFrameType(); 283 extern void _initCompiledFrameType();
579 #ifdef _NUITKA_PLUGIN_DILL_ENABLED 287 #ifdef _NUITKA_PLUGIN_DILL_ENABLED
580 // Provide a way to create find a function via its C code and create it back 288 // Provide a way to create find a function via its C code and create it back
581 // in another process, useful for multiprocessing extensions like dill 289 // in another process, useful for multiprocessing extensions like dill
582 290
583 function_impl_code functable___main__[] = { 291 function_impl_code functable___main__[] = {
n 584     impl___main__$$$function_1_calledRepeatedly$$$function_1_empty, n
585     impl___main__$$$function_1_calledRepeatedly, 292     impl___main__$$$function_1_calledRepeatedly,
586     NULL 293     NULL
587 }; 294 };
588 295
589 static char const *_reduce_compiled_function_argnames[] = { 296 static char const *_reduce_compiled_function_argnames[] = {
948 655
949     // Module code. 656     // Module code.
950     { 657     {
951         PyObject *tmp_assign_source_1; 658         PyObject *tmp_assign_source_1;
952         tmp_assign_source_1 = Py_None; 659         tmp_assign_source_1 = Py_None;
n 953         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_1); n 660         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[2], tmp_assign_source_1);
954     } 661     }
955     { 662     {
956         PyObject *tmp_assign_source_2; 663         PyObject *tmp_assign_source_2;
n 957         tmp_assign_source_2 = mod_consts[5]; n 664         tmp_assign_source_2 = mod_consts[3];
958         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_2); 665         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_2);
959     } 666     }
960     { 667     {
961         PyObject *tmp_assign_source_3; 668         PyObject *tmp_assign_source_3;
962         tmp_assign_source_3 = Py_None; 669         tmp_assign_source_3 = Py_None;
n 963         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[7], tmp_assign_source_3); n 670         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_3);
964     } 671     }
965     { 672     {
966         PyObject *tmp_assign_source_4; 673         PyObject *tmp_assign_source_4;
967         tmp_assign_source_4 = Py_None; 674         tmp_assign_source_4 = Py_None;
968         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_4); 675         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_4);
971         PyObject *tmp_assign_source_5; 678         PyObject *tmp_assign_source_5;
972 679
973 680
974         tmp_assign_source_5 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(); 681         tmp_assign_source_5 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly();
975 682
n 976         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[8], tmp_assign_source_5); n 683         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_5);
977     } 684     }
978     { 685     {
979         PyObject *tmp_assign_source_6; 686         PyObject *tmp_assign_source_6;
980         PyObject *tmp_name_name_1; 687         PyObject *tmp_name_name_1;
981         PyObject *tmp_globals_name_1; 688         PyObject *tmp_globals_name_1;
982         PyObject *tmp_locals_name_1; 689         PyObject *tmp_locals_name_1;
983         PyObject *tmp_fromlist_name_1; 690         PyObject *tmp_fromlist_name_1;
984         PyObject *tmp_level_name_1; 691         PyObject *tmp_level_name_1;
n 985         tmp_name_name_1 = mod_consts[9]; n 692         tmp_name_name_1 = mod_consts[7];
986         tmp_globals_name_1 = (PyObject *)moduledict___main__; 693         tmp_globals_name_1 = (PyObject *)moduledict___main__;
987         tmp_locals_name_1 = Py_None; 694         tmp_locals_name_1 = Py_None;
988         tmp_fromlist_name_1 = Py_None; 695         tmp_fromlist_name_1 = Py_None;
n 989         tmp_level_name_1 = mod_consts[10]; n 696         tmp_level_name_1 = mod_consts[8];
990         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); 697         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);
991         assert(!(tmp_assign_source_6 == NULL)); 698         assert(!(tmp_assign_source_6 == NULL));
n 992         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[9], tmp_assign_source_6); n 699         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[7], tmp_assign_source_6);
993     } 700     }
994     // Frame without reuse. 701     // Frame without reuse.
995     frame_f8b6bc6e7f20fbe6078cd36a10bc56c7 = MAKE_MODULE_FRAME(codeobj_f8b6bc6e7f20fbe6078cd36a10bc56c7, module___main__); 702     frame_f8b6bc6e7f20fbe6078cd36a10bc56c7 = MAKE_MODULE_FRAME(codeobj_f8b6bc6e7f20fbe6078cd36a10bc56c7, module___main__);
996 703
997     // Push the new frame as the currently active one, and we should be exclusively 704     // Push the new frame as the currently active one, and we should be exclusively
1002     // Framed code: 709     // Framed code:
1003     { 710     {
1004         PyObject *tmp_assign_source_7; 711         PyObject *tmp_assign_source_7;
1005         PyObject *tmp_iter_arg_1; 712         PyObject *tmp_iter_arg_1;
1006         PyObject *tmp_called_instance_1; 713         PyObject *tmp_called_instance_1;
n 1007         tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE(moduledict___main__, mod_consts[9]); n 714         tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE(moduledict___main__, mod_consts[7]);
1008         assert(!(tmp_called_instance_1 == NULL)); 715         assert(!(tmp_called_instance_1 == NULL));
1009         frame_f8b6bc6e7f20fbe6078cd36a10bc56c7->m_frame.f_lineno = 39; 716         frame_f8b6bc6e7f20fbe6078cd36a10bc56c7->m_frame.f_lineno = 39;
n 1010         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2(tmp_called_instance_1, mod_consts[11], &PyTuple_GET_ITEM(mod_consts[12], 0)); n 717         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2(tmp_called_instance_1, mod_consts[9], &PyTuple_GET_ITEM(mod_consts[10], 0));
1011 718
1012         if (tmp_iter_arg_1 == NULL) { 719         if (tmp_iter_arg_1 == NULL) {
1013             assert(ERROR_OCCURRED()); 720             assert(ERROR_OCCURRED());
1014 721
1015             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 722             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1064     } 771     }
1065     { 772     {
1066         PyObject *tmp_assign_source_9; 773         PyObject *tmp_assign_source_9;
1067         CHECK_OBJECT(tmp_for_loop_1__iter_value); 774         CHECK_OBJECT(tmp_for_loop_1__iter_value);
1068         tmp_assign_source_9 = tmp_for_loop_1__iter_value; 775         tmp_assign_source_9 = tmp_for_loop_1__iter_value;
n 1069         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[13], tmp_assign_source_9); n 776         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[11], tmp_assign_source_9);
1070     } 777     }
1071     { 778     {
1072         PyObject *tmp_called_name_1; 779         PyObject *tmp_called_name_1;
1073         PyObject *tmp_call_result_1; 780         PyObject *tmp_call_result_1;
n 1074         tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE(moduledict___main__, mod_consts[8]); n 781         tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE(moduledict___main__, mod_consts[6]);
1075         if (tmp_called_name_1 == NULL) { 782         if (tmp_called_name_1 == NULL) {
1076             assert(ERROR_OCCURRED()); 783             assert(ERROR_OCCURRED());
1077 784
1078             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 785             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1079 786
1140     Py_DECREF(tmp_for_loop_1__for_iterator); 847     Py_DECREF(tmp_for_loop_1__for_iterator);
1141     tmp_for_loop_1__for_iterator = NULL; 848     tmp_for_loop_1__for_iterator = NULL;
1142     { 849     {
1143         PyObject *tmp_called_name_2; 850         PyObject *tmp_called_name_2;
1144         PyObject *tmp_call_result_2; 851         PyObject *tmp_call_result_2;
n 1145         tmp_called_name_2 = LOOKUP_BUILTIN(mod_consts[14]); n 852         tmp_called_name_2 = LOOKUP_BUILTIN(mod_consts[12]);
1146         assert(tmp_called_name_2 != NULL); 853         assert(tmp_called_name_2 != NULL);
1147         frame_f8b6bc6e7f20fbe6078cd36a10bc56c7->m_frame.f_lineno = 42; 854         frame_f8b6bc6e7f20fbe6078cd36a10bc56c7->m_frame.f_lineno = 42;
t 1148         tmp_call_result_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, mod_consts[15]); t 855         tmp_call_result_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, mod_consts[13]);
1149         if (tmp_call_result_2 == NULL) { 856         if (tmp_call_result_2 == NULL) {
1150             assert(ERROR_OCCURRED()); 857             assert(ERROR_OCCURRED());
1151 858
1152             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 859             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1153 860