Construct LoopSmallXrange

Performance Diagrams

Construct LoopSmallXrange 0010000000100000002000000020000000300000003000000040000000400000005000000050000000600000006000000070000000700000008000000080000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)8257863188.95192307692307257.0CPython 2.725004439242.31730769230768429.28995477050233Nuitka (main)25004365395.6826923076923429.2901762144551Nuitka (develop)25004365549.0480769230769429.2901762144551Nuitka (factory)Construct LoopSmallXrangeTicks Construct LoopSmallXrange 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000CPython 3.8Nuitka (main)Nuitka (develop)Nuitka (factory)10398123588.11538461538461257.0CPython 3.863157382240.03846153846155354.01944909172244Nuitka (main)63157434391.96153846153845354.01932551173223Nuitka (develop)63157434543.8846153846154354.01932551173223Nuitka (factory)Construct LoopSmallXrangeTicks

Source Code with Construct

module_value1 = 5
module_value2 = 3

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    # Make sure we have a local variable x anyway
    x = 2

    local_value = module_value1

# construct_begin
    for x in xrange(local_value, local_value+3):
        pass
# construct_end

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

print("OK.")

Source Code without Construct

module_value1 = 5
module_value2 = 3

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    # Make sure we have a local variable x anyway
    x = 2

    local_value = module_value1

# construct_begin




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

print("OK.")

Context Diff of Source Code


Construct
Baseline
29     x = 2 29     x = 2
30 30
31     local_value = module_value1 31     local_value = module_value1
32 32
33 # construct_begin 33 # construct_begin
t 34     for x in xrange(local_value, local_value+3): t 34  
35         pass 35  
36 # construct_end 36  
37 37
38 import itertools 38 import itertools
39 for x in itertools.repeat(None, 50000): 39 for x in itertools.repeat(None, 50000):
40     calledRepeatedly() 40     calledRepeatedly()
41 41

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[19];
37 #ifndef __NUITKA_NO_ASSERT__ 37 #ifndef __NUITKA_NO_ASSERT__
n 38 static Py_hash_t mod_consts_hash[20]; n 38 static Py_hash_t mod_consts_hash[19];
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(&mod_consts[0], UNTRANSLATE("__main__")); 49         loadConstantsBlob(&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 < 20; i++) { n 53         for(int i = 0; i < 19; i++) {
54             mod_consts_hash[i] = DEEP_HASH(mod_consts[i]); 54             mod_consts_hash[i] = DEEP_HASH(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__(void) { 69 void checkModuleConstants___main__(void) {
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 < 20; i++) { n 73     for(int i = 0; i < 19; i++) {
74         assert(mod_consts_hash[i] == DEEP_HASH(mod_consts[i])); 74         assert(mod_consts_hash[i] == DEEP_HASH(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_4b4a5de3a547b0f1df5dc44eca05b0ac; 81 static PyCodeObject *codeobj_4b4a5de3a547b0f1df5dc44eca05b0ac;
n 82 static PyCodeObject *codeobj_8379b1a6c5c2682551a500537f44ffa5; n 82 static PyCodeObject *codeobj_1ee78d62b8aaa4e0e7235681823384d2;
83 /* For use in "MainProgram.c". */ 83 /* For use in "MainProgram.c". */
84 PyCodeObject *codeobj_main = NULL; 84 PyCodeObject *codeobj_main = NULL;
85 85
86 static void createModuleCodeObjects(void) { 86 static void createModuleCodeObjects(void) {
n 87     module_filename_obj = mod_consts[3]; CHECK_OBJECT(module_filename_obj); n 87     module_filename_obj = mod_consts[2]; CHECK_OBJECT(module_filename_obj);
88     codeobj_4b4a5de3a547b0f1df5dc44eca05b0ac = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[18], NULL, NULL, 0, 0, 0); 88     codeobj_4b4a5de3a547b0f1df5dc44eca05b0ac = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[17], NULL, NULL, 0, 0, 0);
89     codeobj_8379b1a6c5c2682551a500537f44ffa5 = MAKE_CODEOBJECT(module_filename_obj, 25, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[10], mod_consts[19], NULL, 0, 0, 0); 89     codeobj_1ee78d62b8aaa4e0e7235681823384d2 = MAKE_CODEOBJECT(module_filename_obj, 24, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[9], mod_consts[18], NULL, 0, 0, 0);
90 } 90 }
91 91
92 // The module function declarations. 92 // The module function declarations.
93 static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly(); 93 static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly();
94 94
99 #ifndef __NUITKA_NO_ASSERT__ 99 #ifndef __NUITKA_NO_ASSERT__
100     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 100     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
101 #endif 101 #endif
102 102
103     // Local variable declarations. 103     // Local variable declarations.
n 104     PyObject *var_x = NULL; n
105     PyObject *var_local_value = NULL; 104     PyObject *var_local_value = NULL;
n 106     PyObject *tmp_for_loop_1__for_iterator = NULL; n 105     struct Nuitka_FrameObject *frame_1ee78d62b8aaa4e0e7235681823384d2;
107     PyObject *tmp_for_loop_1__iter_value = NULL;
108     struct Nuitka_FrameObject *frame_8379b1a6c5c2682551a500537f44ffa5;
109     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; 106     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
110     NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; 107     NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused;
111     PyObject *exception_type = NULL; 108     PyObject *exception_type = NULL;
112     PyObject *exception_value = NULL; 109     PyObject *exception_value = NULL;
113     PyTracebackObject *exception_tb = NULL; 110     PyTracebackObject *exception_tb = NULL;
114     NUITKA_MAY_BE_UNUSED int exception_lineno = 0; 111     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
n n 112     static struct Nuitka_FrameObject *cache_frame_1ee78d62b8aaa4e0e7235681823384d2 = NULL;
113     PyObject *tmp_return_value = NULL;
115     PyObject *exception_keeper_type_1; 114     PyObject *exception_keeper_type_1;
116     PyObject *exception_keeper_value_1; 115     PyObject *exception_keeper_value_1;
117     PyTracebackObject *exception_keeper_tb_1; 116     PyTracebackObject *exception_keeper_tb_1;
118     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; 117     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
n 119     static struct Nuitka_FrameObject *cache_frame_8379b1a6c5c2682551a500537f44ffa5 = NULL; n
120     PyObject *tmp_return_value = NULL;
121     PyObject *exception_keeper_type_2;
122     PyObject *exception_keeper_value_2;
123     PyTracebackObject *exception_keeper_tb_2;
124     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
125 118
126     // Actual function body. 119     // Actual function body.
127     // Tried code: 120     // Tried code:
n 128     if (isFrameUnusable(cache_frame_8379b1a6c5c2682551a500537f44ffa5)) { n 121     if (isFrameUnusable(cache_frame_1ee78d62b8aaa4e0e7235681823384d2)) {
129         Py_XDECREF(cache_frame_8379b1a6c5c2682551a500537f44ffa5); 122         Py_XDECREF(cache_frame_1ee78d62b8aaa4e0e7235681823384d2);
130 123
131 #if _DEBUG_REFCOUNTS 124 #if _DEBUG_REFCOUNTS
n 132         if (cache_frame_8379b1a6c5c2682551a500537f44ffa5 == NULL) { n 125         if (cache_frame_1ee78d62b8aaa4e0e7235681823384d2 == NULL) {
133             count_active_frame_cache_instances += 1; 126             count_active_frame_cache_instances += 1;
134         } else { 127         } else {
135             count_released_frame_cache_instances += 1; 128             count_released_frame_cache_instances += 1;
136         } 129         }
137         count_allocated_frame_cache_instances += 1; 130         count_allocated_frame_cache_instances += 1;
138 #endif 131 #endif
n 139         cache_frame_8379b1a6c5c2682551a500537f44ffa5 = MAKE_FUNCTION_FRAME(codeobj_8379b1a6c5c2682551a500537f44ffa5, module___main__, sizeof(void *)+sizeof(void *)); n 132         cache_frame_1ee78d62b8aaa4e0e7235681823384d2 = MAKE_FUNCTION_FRAME(codeobj_1ee78d62b8aaa4e0e7235681823384d2, module___main__, sizeof(void *)+sizeof(void *));
140 #if _DEBUG_REFCOUNTS 133 #if _DEBUG_REFCOUNTS
141     } else { 134     } else {
142         count_hit_frame_cache_instances += 1; 135         count_hit_frame_cache_instances += 1;
143 #endif 136 #endif
144     } 137     }
n 145     assert(cache_frame_8379b1a6c5c2682551a500537f44ffa5->m_type_description == NULL); n 138     assert(cache_frame_1ee78d62b8aaa4e0e7235681823384d2->m_type_description == NULL);
146     frame_8379b1a6c5c2682551a500537f44ffa5 = cache_frame_8379b1a6c5c2682551a500537f44ffa5; 139     frame_1ee78d62b8aaa4e0e7235681823384d2 = cache_frame_1ee78d62b8aaa4e0e7235681823384d2;
147 140
148     // Push the new frame as the currently active one. 141     // Push the new frame as the currently active one.
n 149     pushFrameStack(frame_8379b1a6c5c2682551a500537f44ffa5); n 142     pushFrameStack(frame_1ee78d62b8aaa4e0e7235681823384d2);
150 143
151     // Mark the frame object as in use, ref count 1 will be up for reuse. 144     // Mark the frame object as in use, ref count 1 will be up for reuse.
n 152     assert(Py_REFCNT(frame_8379b1a6c5c2682551a500537f44ffa5) == 2); // Frame stack n 145     assert(Py_REFCNT(frame_1ee78d62b8aaa4e0e7235681823384d2) == 2); // Frame stack
153 146
154     // Framed code: 147     // Framed code:
155     { 148     {
156         PyObject *tmp_mvar_value_1; 149         PyObject *tmp_mvar_value_1;
157         tmp_mvar_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[0]); 150         tmp_mvar_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[0]);
164             assert(ERROR_OCCURRED()); 157             assert(ERROR_OCCURRED());
165 158
166             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 159             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
167 160
168 161
n 169             exception_lineno = 27; n 162             exception_lineno = 26;
170             type_description_1 = "oo"; 163             type_description_1 = "No";
171             goto frame_exception_exit_1; 164             goto frame_exception_exit_1;
172         } 165         }
173     } 166     }
174     { 167     {
175         PyObject *tmp_assign_source_1; 168         PyObject *tmp_assign_source_1;
183             assert(ERROR_OCCURRED()); 176             assert(ERROR_OCCURRED());
184 177
185             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 178             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
186 179
187 180
n 188             exception_lineno = 32; n 181             exception_lineno = 31;
189             type_description_1 = "oo"; 182             type_description_1 = "No";
190             goto frame_exception_exit_1; 183             goto frame_exception_exit_1;
191         } 184         }
192         assert(var_local_value == NULL); 185         assert(var_local_value == NULL);
193         Py_INCREF(tmp_assign_source_1); 186         Py_INCREF(tmp_assign_source_1);
194         var_local_value = tmp_assign_source_1; 187         var_local_value = tmp_assign_source_1;
195     } 188     }
n n 189  
190 #if 0
191     RESTORE_FRAME_EXCEPTION(frame_1ee78d62b8aaa4e0e7235681823384d2);
192 #endif
193  
194     // Put the previous frame back on top.
195     popFrameStack();
196  
197     goto frame_no_exception_1;
198  
199     frame_exception_exit_1:;
200  
201 #if 0
202     RESTORE_FRAME_EXCEPTION(frame_1ee78d62b8aaa4e0e7235681823384d2);
203 #endif
204  
205     if (exception_tb == NULL) {
206         exception_tb = MAKE_TRACEBACK(frame_1ee78d62b8aaa4e0e7235681823384d2, exception_lineno);
207     } else if (exception_tb->tb_frame != &frame_1ee78d62b8aaa4e0e7235681823384d2->m_frame) {
208         exception_tb = ADD_TRACEBACK(exception_tb, frame_1ee78d62b8aaa4e0e7235681823384d2, exception_lineno);
196     { 209     }
197         PyObject *tmp_assign_source_2; 210  
198         PyObject *tmp_iter_arg_1; 211     // Attaches locals to frame if any.
199         PyObject *tmp_xrange_low_1; 212     Nuitka_Frame_AttachLocals(
200         PyObject *tmp_xrange_high_1; 213         frame_1ee78d62b8aaa4e0e7235681823384d2,
201         PyObject *tmp_left_value_1; 214         type_description_1,
202         PyObject *tmp_right_value_1; 215         NULL,
216         var_local_value
217     );
218  
219  
220     // Release cached frame if used for exception.
221     if (frame_1ee78d62b8aaa4e0e7235681823384d2 == cache_frame_1ee78d62b8aaa4e0e7235681823384d2) {
222 #if _DEBUG_REFCOUNTS
223         count_active_frame_cache_instances -= 1;
224         count_released_frame_cache_instances += 1;
225 #endif
226  
227         Py_DECREF(cache_frame_1ee78d62b8aaa4e0e7235681823384d2);
228         cache_frame_1ee78d62b8aaa4e0e7235681823384d2 = NULL;
229     }
230  
231     assertFrameObject(frame_1ee78d62b8aaa4e0e7235681823384d2);
232  
233     // Put the previous frame back on top.
234     popFrameStack();
235  
236     // Return the error.
237     goto try_except_handler_1;
238  
239     frame_no_exception_1:;
240     tmp_return_value = Py_None;
241     Py_INCREF(tmp_return_value);
242     goto try_return_handler_1;
243     NUITKA_CANNOT_GET_HERE("tried codes exits in all cases");
244     return NULL;
245     // Return handler code:
246     try_return_handler_1:;
203         CHECK_OBJECT(var_local_value); 247     CHECK_OBJECT(var_local_value);
204         tmp_xrange_low_1 = var_local_value; 248     Py_DECREF(var_local_value);
205         CHECK_OBJECT(var_local_value); 249     var_local_value = NULL;
206         tmp_left_value_1 = var_local_value; 250     goto function_return_exit;
207         tmp_right_value_1 = mod_consts[1];
208         tmp_xrange_high_1 = BINARY_OPERATION_ADD_OBJECT_OBJECT_LONG(tmp_left_value_1, tmp_right_value_1);
209         if (tmp_xrange_high_1 == NULL) {
210             assert(ERROR_OCCURRED());
211  
212             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
213  
214  
215             exception_lineno = 35;
216             type_description_1 = "oo";
217             goto frame_exception_exit_1;
218         }
219         tmp_iter_arg_1 = BUILTIN_XRANGE2(tmp_xrange_low_1, tmp_xrange_high_1);
220         Py_DECREF(tmp_xrange_high_1);
221         if (tmp_iter_arg_1 == NULL) {
222             assert(ERROR_OCCURRED());
223  
224             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
225  
226  
227             exception_lineno = 35;
228             type_description_1 = "oo";
229             goto frame_exception_exit_1;
230         }
231         tmp_assign_source_2 = MAKE_ITERATOR(tmp_iter_arg_1);
232         Py_DECREF(tmp_iter_arg_1);
233         if (tmp_assign_source_2 == NULL) {
234             assert(ERROR_OCCURRED());
235  
236             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
237  
238  
239             exception_lineno = 35;
240             type_description_1 = "oo";
241             goto frame_exception_exit_1;
242         }
243         assert(tmp_for_loop_1__for_iterator == NULL);
244         tmp_for_loop_1__for_iterator = tmp_assign_source_2;
245     }
246     // Tried code:
247     loop_start_1:;
248     {
249         PyObject *tmp_next_source_1;
250         PyObject *tmp_assign_source_3;
251         CHECK_OBJECT(tmp_for_loop_1__for_iterator);
252         tmp_next_source_1 = tmp_for_loop_1__for_iterator;
253         tmp_assign_source_3 = ITERATOR_NEXT(tmp_next_source_1);
254         if (tmp_assign_source_3 == NULL) {
255             if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) {
256  
257                 goto loop_end_1;
258             } else {
259  
260                 FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
261                 type_description_1 = "oo";
262                 exception_lineno = 35;
263                 goto try_except_handler_2;
264             }
265         }
266  
267         {
268             PyObject *old = tmp_for_loop_1__iter_value;
269             tmp_for_loop_1__iter_value = tmp_assign_source_3;
270             Py_XDECREF(old);
271         }
272  
273     }
274     {
275         PyObject *tmp_assign_source_4;
276         CHECK_OBJECT(tmp_for_loop_1__iter_value);
277         tmp_assign_source_4 = tmp_for_loop_1__iter_value;
278         {
279             PyObject *old = var_x;
280             var_x = tmp_assign_source_4;
281             Py_INCREF(var_x);
282             Py_XDECREF(old);
283         }
284  
285     }
286     if (CONSIDER_THREADING() == false) {
287         assert(ERROR_OCCURRED());
288  
289         FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
290  
291  
292         exception_lineno = 35;
293         type_description_1 = "oo";
294         goto try_except_handler_2;
295     }
296     goto loop_start_1;
297     loop_end_1:;
298     goto try_end_1;
299     // Exception handler code: 251     // Exception handler code:
n 300     try_except_handler_2:; n 252     try_except_handler_1:;
301     exception_keeper_type_1 = exception_type; 253     exception_keeper_type_1 = exception_type;
302     exception_keeper_value_1 = exception_value; 254     exception_keeper_value_1 = exception_value;
303     exception_keeper_tb_1 = exception_tb; 255     exception_keeper_tb_1 = exception_tb;
304     exception_keeper_lineno_1 = exception_lineno; 256     exception_keeper_lineno_1 = exception_lineno;
305     exception_type = NULL; 257     exception_type = NULL;
306     exception_value = NULL; 258     exception_value = NULL;
307     exception_tb = NULL; 259     exception_tb = NULL;
308     exception_lineno = 0; 260     exception_lineno = 0;
309 261
n 310     Py_XDECREF(tmp_for_loop_1__iter_value); n
311     tmp_for_loop_1__iter_value = NULL;
312     CHECK_OBJECT(tmp_for_loop_1__for_iterator);
313     Py_DECREF(tmp_for_loop_1__for_iterator);
314     tmp_for_loop_1__for_iterator = NULL;
315     // Re-raise. 262     // Re-raise.
316     exception_type = exception_keeper_type_1; 263     exception_type = exception_keeper_type_1;
317     exception_value = exception_keeper_value_1; 264     exception_value = exception_keeper_value_1;
318     exception_tb = exception_keeper_tb_1; 265     exception_tb = exception_keeper_tb_1;
319     exception_lineno = exception_keeper_lineno_1; 266     exception_lineno = exception_keeper_lineno_1;
n 320   n
321     goto frame_exception_exit_1;
322     // End of try:
323     try_end_1:;
324  
325 #if 0
326     RESTORE_FRAME_EXCEPTION(frame_8379b1a6c5c2682551a500537f44ffa5);
327 #endif
328  
329     // Put the previous frame back on top.
330     popFrameStack();
331  
332     goto frame_no_exception_1;
333  
334     frame_exception_exit_1:;
335  
336 #if 0
337     RESTORE_FRAME_EXCEPTION(frame_8379b1a6c5c2682551a500537f44ffa5);
338 #endif
339  
340     if (exception_tb == NULL) {
341         exception_tb = MAKE_TRACEBACK(frame_8379b1a6c5c2682551a500537f44ffa5, exception_lineno);
342     } else if (exception_tb->tb_frame != &frame_8379b1a6c5c2682551a500537f44ffa5->m_frame) {
343         exception_tb = ADD_TRACEBACK(exception_tb, frame_8379b1a6c5c2682551a500537f44ffa5, exception_lineno);
344     }
345  
346     // Attaches locals to frame if any.
347     Nuitka_Frame_AttachLocals(
348         frame_8379b1a6c5c2682551a500537f44ffa5,
349         type_description_1,
350         var_x,
351         var_local_value
352     );
353  
354  
355     // Release cached frame if used for exception.
356     if (frame_8379b1a6c5c2682551a500537f44ffa5 == cache_frame_8379b1a6c5c2682551a500537f44ffa5) {
357 #if _DEBUG_REFCOUNTS
358         count_active_frame_cache_instances -= 1;
359         count_released_frame_cache_instances += 1;
360 #endif
361  
362         Py_DECREF(cache_frame_8379b1a6c5c2682551a500537f44ffa5);
363         cache_frame_8379b1a6c5c2682551a500537f44ffa5 = NULL;
364     }
365  
366     assertFrameObject(frame_8379b1a6c5c2682551a500537f44ffa5);
367  
368     // Put the previous frame back on top.
369     popFrameStack();
370  
371     // Return the error.
372     goto try_except_handler_1;
373  
374     frame_no_exception_1:;
375     Py_XDECREF(tmp_for_loop_1__iter_value);
376     tmp_for_loop_1__iter_value = NULL;
377     CHECK_OBJECT(tmp_for_loop_1__for_iterator);
378     Py_DECREF(tmp_for_loop_1__for_iterator);
379     tmp_for_loop_1__for_iterator = NULL;
380     tmp_return_value = Py_None;
381     Py_INCREF(tmp_return_value);
382     goto try_return_handler_1;
383     NUITKA_CANNOT_GET_HERE("tried codes exits in all cases");
384     return NULL;
385     // Return handler code:
386     try_return_handler_1:;
387     Py_XDECREF(var_x);
388     var_x = NULL;
389     CHECK_OBJECT(var_local_value);
390     Py_DECREF(var_local_value);
391     var_local_value = NULL;
392     goto function_return_exit;
393     // Exception handler code:
394     try_except_handler_1:;
395     exception_keeper_type_2 = exception_type;
396     exception_keeper_value_2 = exception_value;
397     exception_keeper_tb_2 = exception_tb;
398     exception_keeper_lineno_2 = exception_lineno;
399     exception_type = NULL;
400     exception_value = NULL;
401     exception_tb = NULL;
402     exception_lineno = 0;
403  
404     Py_XDECREF(var_x);
405     var_x = NULL;
406     Py_XDECREF(var_local_value);
407     var_local_value = NULL;
408     // Re-raise.
409     exception_type = exception_keeper_type_2;
410     exception_value = exception_keeper_value_2;
411     exception_tb = exception_keeper_tb_2;
412     exception_lineno = exception_keeper_lineno_2;
413 267
414     goto function_exception_exit; 268     goto function_exception_exit;
415     // End of try: 269     // End of try:
416 270
417     NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); 271     NUITKA_CANNOT_GET_HERE("Return statement must have exited already.");
437 291
438 292
439 static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly() { 293 static PyObject *MAKE_FUNCTION___main__$$$function__1_calledRepeatedly() {
440     struct Nuitka_FunctionObject *result = Nuitka_Function_New( 294     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
441         impl___main__$$$function__1_calledRepeatedly, 295         impl___main__$$$function__1_calledRepeatedly,
n 442         mod_consts[10], n 296         mod_consts[9],
443 #if PYTHON_VERSION >= 0x300 297 #if PYTHON_VERSION >= 0x300
444         NULL, 298         NULL,
445 #endif 299 #endif
n 446         codeobj_8379b1a6c5c2682551a500537f44ffa5, n 300         codeobj_1ee78d62b8aaa4e0e7235681823384d2,
447         NULL, 301         NULL,
448 #if PYTHON_VERSION >= 0x300 302 #if PYTHON_VERSION >= 0x300
449         NULL, 303         NULL,
450         NULL, 304         NULL,
451 #endif 305 #endif
822 676
823     // Module code. 677     // Module code.
824     { 678     {
825         PyObject *tmp_assign_source_1; 679         PyObject *tmp_assign_source_1;
826         tmp_assign_source_1 = Py_None; 680         tmp_assign_source_1 = Py_None;
n 827         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[2], tmp_assign_source_1); n 681         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[1], tmp_assign_source_1);
828     } 682     }
829     { 683     {
830         PyObject *tmp_assign_source_2; 684         PyObject *tmp_assign_source_2;
n 831         tmp_assign_source_2 = mod_consts[3]; n 685         tmp_assign_source_2 = mod_consts[2];
832         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_2); 686         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[3], tmp_assign_source_2);
833     } 687     }
834     { 688     {
835         PyObject *tmp_assign_source_3; 689         PyObject *tmp_assign_source_3;
836         tmp_assign_source_3 = Py_None; 690         tmp_assign_source_3 = Py_None;
n 837         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_3); n 691         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_3);
838     } 692     }
839     { 693     {
840         PyObject *tmp_assign_source_4; 694         PyObject *tmp_assign_source_4;
841         tmp_assign_source_4 = PyDict_New(); 695         tmp_assign_source_4 = PyDict_New();
n 842         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[6], tmp_assign_source_4); n 696         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[5], tmp_assign_source_4);
843     } 697     }
844     { 698     {
845         PyObject *tmp_assign_source_5; 699         PyObject *tmp_assign_source_5;
n 846         tmp_assign_source_5 = mod_consts[7]; n 700         tmp_assign_source_5 = mod_consts[6];
847         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[4], tmp_assign_source_5); 701         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_5);
848     } 702     }
849     { 703     {
850         PyObject *tmp_assign_source_6; 704         PyObject *tmp_assign_source_6;
n 851         tmp_assign_source_6 = mod_consts[8]; n 705         tmp_assign_source_6 = mod_consts[7];
852         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[0], tmp_assign_source_6); 706         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[8], tmp_assign_source_6);
853     } 707     }
854     { 708     {
855         PyObject *tmp_assign_source_7; 709         PyObject *tmp_assign_source_7;
n 856         tmp_assign_source_7 = mod_consts[1]; n 710  
711  
712         tmp_assign_source_7 = MAKE_FUNCTION___main__$$$function__1_calledRepeatedly();
713  
857         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[9], tmp_assign_source_7); 714         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[9], tmp_assign_source_7);
858     } 715     }
859     { 716     {
860         PyObject *tmp_assign_source_8; 717         PyObject *tmp_assign_source_8;
n 861   n
862  
863         tmp_assign_source_8 = MAKE_FUNCTION___main__$$$function__1_calledRepeatedly();
864  
865         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[10], tmp_assign_source_8);
866     }
867     {
868         PyObject *tmp_assign_source_9;
869         PyObject *tmp_name_value_1; 718         PyObject *tmp_name_value_1;
870         PyObject *tmp_globals_arg_value_1; 719         PyObject *tmp_globals_arg_value_1;
871         PyObject *tmp_locals_arg_value_1; 720         PyObject *tmp_locals_arg_value_1;
872         PyObject *tmp_fromlist_value_1; 721         PyObject *tmp_fromlist_value_1;
873         PyObject *tmp_level_value_1; 722         PyObject *tmp_level_value_1;
n 874         tmp_name_value_1 = mod_consts[11]; n 723         tmp_name_value_1 = mod_consts[10];
875         tmp_globals_arg_value_1 = (PyObject *)moduledict___main__; 724         tmp_globals_arg_value_1 = (PyObject *)moduledict___main__;
876         tmp_locals_arg_value_1 = Py_None; 725         tmp_locals_arg_value_1 = Py_None;
877         tmp_fromlist_value_1 = Py_None; 726         tmp_fromlist_value_1 = Py_None;
n 878         tmp_level_value_1 = mod_consts[12]; n 727         tmp_level_value_1 = mod_consts[11];
879         tmp_assign_source_9 = IMPORT_MODULE5(tmp_name_value_1, tmp_globals_arg_value_1, tmp_locals_arg_value_1, tmp_fromlist_value_1, tmp_level_value_1); 728         tmp_assign_source_8 = IMPORT_MODULE5(tmp_name_value_1, tmp_globals_arg_value_1, tmp_locals_arg_value_1, tmp_fromlist_value_1, tmp_level_value_1);
880         assert(!(tmp_assign_source_9 == NULL)); 729         assert(!(tmp_assign_source_8 == NULL));
881         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[11], tmp_assign_source_9); 730         UPDATE_STRING_DICT1(moduledict___main__, (Nuitka_StringObject *)mod_consts[10], tmp_assign_source_8);
882     } 731     }
883     // Frame without reuse. 732     // Frame without reuse.
884     frame_4b4a5de3a547b0f1df5dc44eca05b0ac = MAKE_MODULE_FRAME(codeobj_4b4a5de3a547b0f1df5dc44eca05b0ac, module___main__); 733     frame_4b4a5de3a547b0f1df5dc44eca05b0ac = MAKE_MODULE_FRAME(codeobj_4b4a5de3a547b0f1df5dc44eca05b0ac, module___main__);
885 734
886     // Push the new frame as the currently active one, and we should be exclusively 735     // Push the new frame as the currently active one, and we should be exclusively
888     pushFrameStack(frame_4b4a5de3a547b0f1df5dc44eca05b0ac); 737     pushFrameStack(frame_4b4a5de3a547b0f1df5dc44eca05b0ac);
889     assert(Py_REFCNT(frame_4b4a5de3a547b0f1df5dc44eca05b0ac) == 2); 738     assert(Py_REFCNT(frame_4b4a5de3a547b0f1df5dc44eca05b0ac) == 2);
890 739
891     // Framed code: 740     // Framed code:
892     { 741     {
n 893         PyObject *tmp_assign_source_10; n 742         PyObject *tmp_assign_source_9;
894         PyObject *tmp_iter_arg_1; 743         PyObject *tmp_iter_arg_1;
895         PyObject *tmp_called_instance_1; 744         PyObject *tmp_called_instance_1;
n 896         tmp_called_instance_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[11]); n 745         tmp_called_instance_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[10]);
897 746
898         if (unlikely(tmp_called_instance_1 == NULL)) { 747         if (unlikely(tmp_called_instance_1 == NULL)) {
n 899             tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[11]); n 748             tmp_called_instance_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[10]);
900         } 749         }
901 750
902         assert(!(tmp_called_instance_1 == NULL)); 751         assert(!(tmp_called_instance_1 == NULL));
n 903         frame_4b4a5de3a547b0f1df5dc44eca05b0ac->m_frame.f_lineno = 40; n 752         frame_4b4a5de3a547b0f1df5dc44eca05b0ac->m_frame.f_lineno = 39;
904         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2( 753         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2(
905             tmp_called_instance_1, 754             tmp_called_instance_1,
n 906             mod_consts[13], n 755             mod_consts[12],
907             &PyTuple_GET_ITEM(mod_consts[14], 0) 756             &PyTuple_GET_ITEM(mod_consts[13], 0)
908         ); 757         );
909 758
910         if (tmp_iter_arg_1 == NULL) { 759         if (tmp_iter_arg_1 == NULL) {
911             assert(ERROR_OCCURRED()); 760             assert(ERROR_OCCURRED());
912 761
913             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 762             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
914 763
915 764
n 916             exception_lineno = 40; n 765             exception_lineno = 39;
917 766
918             goto frame_exception_exit_1; 767             goto frame_exception_exit_1;
919         } 768         }
n 920         tmp_assign_source_10 = MAKE_ITERATOR(tmp_iter_arg_1); n 769         tmp_assign_source_9 = MAKE_ITERATOR(tmp_iter_arg_1);
921         Py_DECREF(tmp_iter_arg_1); 770         Py_DECREF(tmp_iter_arg_1);
n 922         if (tmp_assign_source_10 == NULL) { n 771         if (tmp_assign_source_9 == NULL) {
923             assert(ERROR_OCCURRED()); 772             assert(ERROR_OCCURRED());
924 773
925             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 774             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
926 775
927 776
n 928             exception_lineno = 40; n 777             exception_lineno = 39;
929 778
930             goto frame_exception_exit_1; 779             goto frame_exception_exit_1;
931         } 780         }
932         assert(tmp_for_loop_1__for_iterator == NULL); 781         assert(tmp_for_loop_1__for_iterator == NULL);
n 933         tmp_for_loop_1__for_iterator = tmp_assign_source_10; n 782         tmp_for_loop_1__for_iterator = tmp_assign_source_9;
934     } 783     }
935     // Tried code: 784     // Tried code:
936     loop_start_1:; 785     loop_start_1:;
937     { 786     {
938         PyObject *tmp_next_source_1; 787         PyObject *tmp_next_source_1;
n 939         PyObject *tmp_assign_source_11; n 788         PyObject *tmp_assign_source_10;
940         CHECK_OBJECT(tmp_for_loop_1__for_iterator); 789         CHECK_OBJECT(tmp_for_loop_1__for_iterator);
941         tmp_next_source_1 = tmp_for_loop_1__for_iterator; 790         tmp_next_source_1 = tmp_for_loop_1__for_iterator;
n 942         tmp_assign_source_11 = ITERATOR_NEXT(tmp_next_source_1); n 791         tmp_assign_source_10 = ITERATOR_NEXT(tmp_next_source_1);
943         if (tmp_assign_source_11 == NULL) { 792         if (tmp_assign_source_10 == NULL) {
944             if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) { 793             if (CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED()) {
945 794
946                 goto loop_end_1; 795                 goto loop_end_1;
947             } else { 796             } else {
948 797
949                 FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 798                 FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
950 799
n 951                 exception_lineno = 40; n 800                 exception_lineno = 39;
952                 goto try_except_handler_1; 801                 goto try_except_handler_1;
953             } 802             }
954         } 803         }
955 804
956         { 805         {
957             PyObject *old = tmp_for_loop_1__iter_value; 806             PyObject *old = tmp_for_loop_1__iter_value;
n 958             tmp_for_loop_1__iter_value = tmp_assign_source_11; n 807             tmp_for_loop_1__iter_value = tmp_assign_source_10;
959             Py_XDECREF(old); 808             Py_XDECREF(old);
960         } 809         }
961 810
962     } 811     }
963     { 812     {
n 964         PyObject *tmp_assign_source_12; n 813         PyObject *tmp_assign_source_11;
965         CHECK_OBJECT(tmp_for_loop_1__iter_value); 814         CHECK_OBJECT(tmp_for_loop_1__iter_value);
n 966         tmp_assign_source_12 = tmp_for_loop_1__iter_value; n 815         tmp_assign_source_11 = tmp_for_loop_1__iter_value;
967         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[15], tmp_assign_source_12); 816         UPDATE_STRING_DICT0(moduledict___main__, (Nuitka_StringObject *)mod_consts[14], tmp_assign_source_11);
968     } 817     }
969     { 818     {
970         PyObject *tmp_called_value_1; 819         PyObject *tmp_called_value_1;
971         PyObject *tmp_call_result_1; 820         PyObject *tmp_call_result_1;
n 972         tmp_called_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[10]); n 821         tmp_called_value_1 = GET_STRING_DICT_VALUE(moduledict___main__, (Nuitka_StringObject *)mod_consts[9]);
973 822
974         if (unlikely(tmp_called_value_1 == NULL)) { 823         if (unlikely(tmp_called_value_1 == NULL)) {
n 975             tmp_called_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[10]); n 824             tmp_called_value_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[9]);
976         } 825         }
977 826
978         if (tmp_called_value_1 == NULL) { 827         if (tmp_called_value_1 == NULL) {
979             assert(ERROR_OCCURRED()); 828             assert(ERROR_OCCURRED());
980 829
981             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 830             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
982 831
983 832
n 984             exception_lineno = 41; n 833             exception_lineno = 40;
985 834
986             goto try_except_handler_1; 835             goto try_except_handler_1;
987         } 836         }
n 988         frame_4b4a5de3a547b0f1df5dc44eca05b0ac->m_frame.f_lineno = 41; n 837         frame_4b4a5de3a547b0f1df5dc44eca05b0ac->m_frame.f_lineno = 40;
989         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS(tmp_called_value_1); 838         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS(tmp_called_value_1);
990         if (tmp_call_result_1 == NULL) { 839         if (tmp_call_result_1 == NULL) {
991             assert(ERROR_OCCURRED()); 840             assert(ERROR_OCCURRED());
992 841
993             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 842             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
994 843
995 844
n 996             exception_lineno = 41; n 845             exception_lineno = 40;
997 846
998             goto try_except_handler_1; 847             goto try_except_handler_1;
999         } 848         }
1000         Py_DECREF(tmp_call_result_1); 849         Py_DECREF(tmp_call_result_1);
1001     } 850     }
1003         assert(ERROR_OCCURRED()); 852         assert(ERROR_OCCURRED());
1004 853
1005         FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 854         FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1006 855
1007 856
n 1008         exception_lineno = 40; n 857         exception_lineno = 39;
1009 858
1010         goto try_except_handler_1; 859         goto try_except_handler_1;
1011     } 860     }
1012     goto loop_start_1; 861     goto loop_start_1;
1013     loop_end_1:; 862     loop_end_1:;
1043     Py_DECREF(tmp_for_loop_1__for_iterator); 892     Py_DECREF(tmp_for_loop_1__for_iterator);
1044     tmp_for_loop_1__for_iterator = NULL; 893     tmp_for_loop_1__for_iterator = NULL;
1045     { 894     {
1046         PyObject *tmp_called_value_2; 895         PyObject *tmp_called_value_2;
1047         PyObject *tmp_call_result_2; 896         PyObject *tmp_call_result_2;
n 1048         tmp_called_value_2 = LOOKUP_BUILTIN(mod_consts[16]); n 897         tmp_called_value_2 = LOOKUP_BUILTIN(mod_consts[15]);
1049         assert(tmp_called_value_2 != NULL); 898         assert(tmp_called_value_2 != NULL);
n 1050         frame_4b4a5de3a547b0f1df5dc44eca05b0ac->m_frame.f_lineno = 43; n 899         frame_4b4a5de3a547b0f1df5dc44eca05b0ac->m_frame.f_lineno = 42;
1051         tmp_call_result_2 = CALL_FUNCTION_WITH_POSARGS1(tmp_called_value_2, mod_consts[17]); 900         tmp_call_result_2 = CALL_FUNCTION_WITH_POSARGS1(tmp_called_value_2, mod_consts[16]);
1052 901
1053         if (tmp_call_result_2 == NULL) { 902         if (tmp_call_result_2 == NULL) {
1054             assert(ERROR_OCCURRED()); 903             assert(ERROR_OCCURRED());
1055 904
1056             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 905             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
1057 906
1058 907
t 1059             exception_lineno = 43; t 908             exception_lineno = 42;
1060 909
1061             goto frame_exception_exit_1; 910             goto frame_exception_exit_1;
1062         } 911         }
1063         Py_DECREF(tmp_call_result_2); 912         Py_DECREF(tmp_call_result_2);
1064     } 913     }