Construct LoopSmallXrange

Performance Diagrams

Construct LoopSmallXrange 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)10502843088.11538461538461257.0CPython 2.730633408240.03846153846155432.0397913688703Nuitka (master)30633652391.96153846153845432.03921727522874Nuitka (develop)30634096543.8846153846154432.03817261302856Nuitka (factory)Construct LoopSmallXrangeTicks Construct LoopSmallXrange 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000110000000110000000120000000120000000130000000130000000140000000140000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)14028547788.11538461538461257.0CPython 3.588999287240.03846153846155347.3415438171671Nuitka (master)88997416391.96153846153845347.3448396172349Nuitka (develop)88996653543.8846153846154347.34618365542406Nuitka (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
48 static PyObject *const_str_plain_x; 48 static PyObject *const_str_plain_x;
49 extern PyObject *const_tuple_empty; 49 extern PyObject *const_tuple_empty;
50 static PyObject *const_str_digest_5ed1392909ad16e6227b8230f4582352; 50 static PyObject *const_str_digest_5ed1392909ad16e6227b8230f4582352;
51 static PyObject *const_int_pos_5; 51 static PyObject *const_int_pos_5;
52 static PyObject *const_str_plain_repeat; 52 static PyObject *const_str_plain_repeat;
n 53 static PyObject *const_int_pos_2; n
54 static PyObject *const_tuple_none_int_pos_50000_tuple; 53 static PyObject *const_tuple_none_int_pos_50000_tuple;
55 static PyObject *const_tuple_str_plain_x_str_plain_local_value_tuple; 54 static PyObject *const_tuple_str_plain_x_str_plain_local_value_tuple;
n 56 static PyObject *const_str_digest_da2e8b823a4e4e969a9d6eaaa56344f1; n
57 extern PyObject *const_str_plain___main__; 55 extern PyObject *const_str_plain___main__;
58 extern PyObject *const_str_plain___doc__; 56 extern PyObject *const_str_plain___doc__;
59 extern PyObject *const_str_plain___cached__; 57 extern PyObject *const_str_plain___cached__;
60 static PyObject *module_filename_obj; 58 static PyObject *module_filename_obj;
61 59
79     const_str_angle_module = UNSTREAM_STRING_ASCII( &constant_bin[ 131 ], 8, 0 ); 77     const_str_angle_module = UNSTREAM_STRING_ASCII( &constant_bin[ 131 ], 8, 0 );
80     const_str_plain_None = UNSTREAM_STRING_ASCII( &constant_bin[ 139 ], 4, 1 ); 78     const_str_plain_None = UNSTREAM_STRING_ASCII( &constant_bin[ 139 ], 4, 1 );
81     const_str_plain_x = UNSTREAM_STRING_ASCII( &constant_bin[ 34 ], 1, 1 ); 79     const_str_plain_x = UNSTREAM_STRING_ASCII( &constant_bin[ 34 ], 1, 1 );
82     const_int_pos_5 = PyLong_FromUnsignedLong( 5ul ); 80     const_int_pos_5 = PyLong_FromUnsignedLong( 5ul );
83     const_str_plain_repeat = UNSTREAM_STRING_ASCII( &constant_bin[ 143 ], 6, 1 ); 81     const_str_plain_repeat = UNSTREAM_STRING_ASCII( &constant_bin[ 143 ], 6, 1 );
n 84     const_int_pos_2 = PyLong_FromUnsignedLong( 2ul ); n
85     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 ); 82     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 );
86     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 0, Py_None ); Py_INCREF( Py_None ); 83     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 0, Py_None ); Py_INCREF( Py_None );
87     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 ); 84     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 );
88     const_tuple_str_plain_x_str_plain_local_value_tuple = PyTuple_New( 2 ); 85     const_tuple_str_plain_x_str_plain_local_value_tuple = PyTuple_New( 2 );
89     PyTuple_SET_ITEM( const_tuple_str_plain_x_str_plain_local_value_tuple, 0, const_str_plain_x ); Py_INCREF( const_str_plain_x ); 86     PyTuple_SET_ITEM( const_tuple_str_plain_x_str_plain_local_value_tuple, 0, const_str_plain_x ); Py_INCREF( const_str_plain_x );
90     PyTuple_SET_ITEM( const_tuple_str_plain_x_str_plain_local_value_tuple, 1, const_str_plain_local_value ); Py_INCREF( const_str_plain_local_value ); 87     PyTuple_SET_ITEM( const_tuple_str_plain_x_str_plain_local_value_tuple, 1, const_str_plain_local_value ); Py_INCREF( const_str_plain_local_value );
n 91     const_str_digest_da2e8b823a4e4e969a9d6eaaa56344f1 = UNSTREAM_STRING_ASCII( &constant_bin[ 149 ], 49, 0 ); n
92 88
93     constants_created = true; 89     constants_created = true;
94 } 90 }
95 91
96 /* Function to verify module private constants for non-corruption. */ 92 /* Function to verify module private constants for non-corruption. */
104 } 100 }
105 #endif 101 #endif
106 102
107 // The module code objects. 103 // The module code objects.
108 static PyCodeObject *codeobj_78e8e05bcddd6dbab6585a945fc17221; 104 static PyCodeObject *codeobj_78e8e05bcddd6dbab6585a945fc17221;
n 109 static PyCodeObject *codeobj_8564ba67f3ee87ae4e2e0da9982552db; n 105 static PyCodeObject *codeobj_aca509f4a41d612893965e63d90ec3a4;
110 /* For use in "MainProgram.c". */ 106 /* For use in "MainProgram.c". */
111 PyCodeObject *codeobj_main = NULL; 107 PyCodeObject *codeobj_main = NULL;
112 108
113 static void createModuleCodeObjects(void) 109 static void createModuleCodeObjects(void)
114 { 110 {
115     module_filename_obj = const_str_digest_5f05209d89cd9db5ddb7ff52525d599d; 111     module_filename_obj = const_str_digest_5f05209d89cd9db5ddb7ff52525d599d;
116     codeobj_78e8e05bcddd6dbab6585a945fc17221 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE ); 112     codeobj_78e8e05bcddd6dbab6585a945fc17221 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE );
117     codeobj_main = codeobj_78e8e05bcddd6dbab6585a945fc17221; 113     codeobj_main = codeobj_78e8e05bcddd6dbab6585a945fc17221;
n 118     codeobj_8564ba67f3ee87ae4e2e0da9982552db = MAKE_CODEOBJ( module_filename_obj, const_str_plain_calledRepeatedly, 25, const_tuple_str_plain_x_str_plain_local_value_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE ); n 114     codeobj_aca509f4a41d612893965e63d90ec3a4 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_calledRepeatedly, 24, const_tuple_str_plain_x_str_plain_local_value_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
119 } 115 }
120 116
121 // The module function declarations. 117 // The module function declarations.
122 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ); 118 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  );
123 119
129 #ifndef __NUITKA_NO_ASSERT__ 125 #ifndef __NUITKA_NO_ASSERT__
130     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 126     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
131 #endif 127 #endif
132 128
133     // Local variable declarations. 129     // Local variable declarations.
n 134     PyObject *var_x = NULL; n
135     PyObject *var_local_value = NULL; 130     PyObject *var_local_value = NULL;
n 136     PyObject *tmp_for_loop_1__for_iterator = NULL; n 131     struct Nuitka_FrameObject *frame_aca509f4a41d612893965e63d90ec3a4;
137     PyObject *tmp_for_loop_1__iter_value = NULL;
138     struct Nuitka_FrameObject *frame_8564ba67f3ee87ae4e2e0da9982552db;
139     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; 132     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
140     PyObject *exception_type = NULL; 133     PyObject *exception_type = NULL;
141     PyObject *exception_value = NULL; 134     PyObject *exception_value = NULL;
142     PyTracebackObject *exception_tb = NULL; 135     PyTracebackObject *exception_tb = NULL;
143     NUITKA_MAY_BE_UNUSED int exception_lineno = 0; 136     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
n n 137     static struct Nuitka_FrameObject *cache_frame_aca509f4a41d612893965e63d90ec3a4 = NULL;
138     PyObject *tmp_return_value = NULL;
144     PyObject *exception_keeper_type_1; 139     PyObject *exception_keeper_type_1;
145     PyObject *exception_keeper_value_1; 140     PyObject *exception_keeper_value_1;
146     PyTracebackObject *exception_keeper_tb_1; 141     PyTracebackObject *exception_keeper_tb_1;
147     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; 142     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
n 148     static struct Nuitka_FrameObject *cache_frame_8564ba67f3ee87ae4e2e0da9982552db = NULL; n
149     PyObject *tmp_return_value = NULL;
150     PyObject *exception_keeper_type_2;
151     PyObject *exception_keeper_value_2;
152     PyTracebackObject *exception_keeper_tb_2;
153     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
154 143
155     // Actual function body. 144     // Actual function body.
156     // Tried code: 145     // Tried code:
n 157     MAKE_OR_REUSE_FRAME( cache_frame_8564ba67f3ee87ae4e2e0da9982552db, codeobj_8564ba67f3ee87ae4e2e0da9982552db, module___main__, sizeof(void *)+sizeof(void *) ); n 146     MAKE_OR_REUSE_FRAME( cache_frame_aca509f4a41d612893965e63d90ec3a4, codeobj_aca509f4a41d612893965e63d90ec3a4, module___main__, sizeof(void *)+sizeof(void *) );
158     frame_8564ba67f3ee87ae4e2e0da9982552db = cache_frame_8564ba67f3ee87ae4e2e0da9982552db; 147     frame_aca509f4a41d612893965e63d90ec3a4 = cache_frame_aca509f4a41d612893965e63d90ec3a4;
159 148
160     // Push the new frame as the currently active one. 149     // Push the new frame as the currently active one.
n 161     pushFrameStack( frame_8564ba67f3ee87ae4e2e0da9982552db ); n 150     pushFrameStack( frame_aca509f4a41d612893965e63d90ec3a4 );
162 151
163     // Mark the frame object as in use, ref count 1 will be up for reuse. 152     // Mark the frame object as in use, ref count 1 will be up for reuse.
n 164     assert( Py_REFCNT( frame_8564ba67f3ee87ae4e2e0da9982552db ) == 2 ); // Frame stack n 153     assert( Py_REFCNT( frame_aca509f4a41d612893965e63d90ec3a4 ) == 2 ); // Frame stack
165 154
166     // Framed code: 155     // Framed code:
167     { 156     {
168         PyObject *tmp_mvar_value_1; 157         PyObject *tmp_mvar_value_1;
169         tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 ); 158         tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 );
181             exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" ); 170             exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" );
182             exception_tb = NULL; 171             exception_tb = NULL;
183             NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 172             NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
184             CHAIN_EXCEPTION( exception_value ); 173             CHAIN_EXCEPTION( exception_value );
185 174
n 186             exception_lineno = 27; n 175             exception_lineno = 26;
187             type_description_1 = "oo"; 176             type_description_1 = "No";
188             goto frame_exception_exit_1; 177             goto frame_exception_exit_1;
189         } 178         }
190 179
191     } 180     }
192     { 181     {
193         PyObject *tmp_assign_source_1; 182         PyObject *tmp_assign_source_1;
n 194         tmp_assign_source_1 = const_int_pos_2; n
195         assert( var_x == NULL );
196         Py_INCREF( tmp_assign_source_1 );
197         var_x = tmp_assign_source_1;
198     }
199     {
200         PyObject *tmp_assign_source_2;
201         PyObject *tmp_mvar_value_2; 183         PyObject *tmp_mvar_value_2;
202         tmp_mvar_value_2 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 ); 184         tmp_mvar_value_2 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 );
203 185
204         if (unlikely( tmp_mvar_value_2 == NULL )) 186         if (unlikely( tmp_mvar_value_2 == NULL ))
205         { 187         {
214             exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" ); 196             exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" );
215             exception_tb = NULL; 197             exception_tb = NULL;
216             NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 198             NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
217             CHAIN_EXCEPTION( exception_value ); 199             CHAIN_EXCEPTION( exception_value );
218 200
n 219             exception_lineno = 32; n 201             exception_lineno = 31;
220             type_description_1 = "oo"; 202             type_description_1 = "No";
221             goto frame_exception_exit_1; 203             goto frame_exception_exit_1;
222         } 204         }
223 205
n 224         tmp_assign_source_2 = tmp_mvar_value_2; n 206         tmp_assign_source_1 = tmp_mvar_value_2;
225         assert( var_local_value == NULL ); 207         assert( var_local_value == NULL );
n 226         Py_INCREF( tmp_assign_source_2 ); n 208         Py_INCREF( tmp_assign_source_1 );
227         var_local_value = tmp_assign_source_2; 209         var_local_value = tmp_assign_source_1;
228     }
229     { 210     }
230         PyObject *tmp_assign_source_3;
231         PyObject *tmp_iter_arg_1;
232         PyObject *tmp_xrange_low_1;
233         PyObject *tmp_xrange_high_1;
234         PyObject *tmp_left_name_1;
235         PyObject *tmp_right_name_1;
236         CHECK_OBJECT( var_local_value );
237         tmp_xrange_low_1 = var_local_value;
238         CHECK_OBJECT( var_local_value );
239         tmp_left_name_1 = var_local_value;
240         tmp_right_name_1 = const_int_pos_3;
241         tmp_xrange_high_1 = BINARY_OPERATION_ADD_OBJECT_LONG( tmp_left_name_1, tmp_right_name_1 );
242         if ( tmp_xrange_high_1 == NULL )
243         {
244             assert( ERROR_OCCURRED() );
245 211
n 246             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); n 212 #if 0
213     RESTORE_FRAME_EXCEPTION( frame_aca509f4a41d612893965e63d90ec3a4 );
214 #endif
247 215
n n 216     // Put the previous frame back on top.
217     popFrameStack();
248 218
n 249             exception_lineno = 35; n 219     goto frame_no_exception_1;
250             type_description_1 = "oo"; 220  
251             goto frame_exception_exit_1; 221     frame_exception_exit_1:;
252         }
253         tmp_iter_arg_1 = BUILTIN_XRANGE2( tmp_xrange_low_1, tmp_xrange_high_1 );
254         Py_DECREF( tmp_xrange_high_1 );
255         if ( tmp_iter_arg_1 == NULL )
256         {
257             assert( ERROR_OCCURRED() );
258 222
n 259             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); n 223 #if 0
224     RESTORE_FRAME_EXCEPTION( frame_aca509f4a41d612893965e63d90ec3a4 );
225 #endif
260 226
n 261   n 227     if ( exception_tb == NULL )
262             exception_lineno = 35;
263             type_description_1 = "oo";
264             goto frame_exception_exit_1;
265         }
266         tmp_assign_source_3 = MAKE_ITERATOR( tmp_iter_arg_1 );
267         Py_DECREF( tmp_iter_arg_1 );
268         if ( tmp_assign_source_3 == NULL )
269         {
270             assert( ERROR_OCCURRED() );
271  
272             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
273  
274  
275             exception_lineno = 35;
276             type_description_1 = "oo";
277             goto frame_exception_exit_1;
278         }
279         assert( tmp_for_loop_1__for_iterator == NULL );
280         tmp_for_loop_1__for_iterator = tmp_assign_source_3;
281     } 228     {
282     // Tried code: 229         exception_tb = MAKE_TRACEBACK( frame_aca509f4a41d612893965e63d90ec3a4, exception_lineno );
283     loop_start_1:;
284     { 230     }
285         PyObject *tmp_next_source_1; 231     else if ( exception_tb->tb_frame != &frame_aca509f4a41d612893965e63d90ec3a4->m_frame )
286         PyObject *tmp_assign_source_4;
287         CHECK_OBJECT( tmp_for_loop_1__for_iterator );
288         tmp_next_source_1 = tmp_for_loop_1__for_iterator;
289         tmp_assign_source_4 = ITERATOR_NEXT( tmp_next_source_1 );
290         if ( tmp_assign_source_4 == NULL )
291         {
292             if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
293             {
294  
295                 goto loop_end_1;
296             }
297             else
298             {
299  
300                 FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
301                 type_description_1 = "oo";
302                 exception_lineno = 35;
303                 goto try_except_handler_2;
304             }
305         }
306  
307         {
308             PyObject *old = tmp_for_loop_1__iter_value;
309             tmp_for_loop_1__iter_value = tmp_assign_source_4;
310             Py_XDECREF( old );
311         }
312  
313     } 232     {
233         exception_tb = ADD_TRACEBACK( exception_tb, frame_aca509f4a41d612893965e63d90ec3a4, exception_lineno );
314     { 234     }
315         PyObject *tmp_assign_source_5;
316         CHECK_OBJECT( tmp_for_loop_1__iter_value );
317         tmp_assign_source_5 = tmp_for_loop_1__iter_value;
318         {
319             PyObject *old = var_x;
320             assert( old != NULL );
321             var_x = tmp_assign_source_5;
322             Py_INCREF( var_x );
323             Py_DECREF( old );
324         }
325 235
n 326     } n 236     // Attachs locals to frame if any.
327     if ( CONSIDER_THREADING() == false ) 237     Nuitka_Frame_AttachLocals(
328     { 238         (struct Nuitka_FrameObject *)frame_aca509f4a41d612893965e63d90ec3a4,
329         assert( ERROR_OCCURRED() );
330  
331         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
332  
333  
334         exception_lineno = 35;
335         type_description_1 = "oo"; 239         type_description_1,
240         NULL,
241         var_local_value
242     );
243  
244  
245     // Release cached frame.
246     if ( frame_aca509f4a41d612893965e63d90ec3a4 == cache_frame_aca509f4a41d612893965e63d90ec3a4 )
247     {
248         Py_DECREF( frame_aca509f4a41d612893965e63d90ec3a4 );
249     }
250     cache_frame_aca509f4a41d612893965e63d90ec3a4 = NULL;
251  
252     assertFrameObject( frame_aca509f4a41d612893965e63d90ec3a4 );
253  
254     // Put the previous frame back on top.
255     popFrameStack();
256  
257     // Return the error.
336         goto try_except_handler_2; 258     goto try_except_handler_1;
337     } 259  
338     goto loop_start_1; 260     frame_no_exception_1:;
339     loop_end_1:; 261     tmp_return_value = Py_None;
262     Py_INCREF( tmp_return_value );
340     goto try_end_1; 263     goto try_return_handler_1;
264     // tried codes exits in all cases
265     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
266     return NULL;
267     // Return handler code:
268     try_return_handler_1:;
269     CHECK_OBJECT( (PyObject *)var_local_value );
270     Py_DECREF( var_local_value );
271     var_local_value = NULL;
272  
273     goto function_return_exit;
341     // Exception handler code: 274     // Exception handler code:
n 342     try_except_handler_2:; n 275     try_except_handler_1:;
343     exception_keeper_type_1 = exception_type; 276     exception_keeper_type_1 = exception_type;
344     exception_keeper_value_1 = exception_value; 277     exception_keeper_value_1 = exception_value;
345     exception_keeper_tb_1 = exception_tb; 278     exception_keeper_tb_1 = exception_tb;
346     exception_keeper_lineno_1 = exception_lineno; 279     exception_keeper_lineno_1 = exception_lineno;
347     exception_type = NULL; 280     exception_type = NULL;
348     exception_value = NULL; 281     exception_value = NULL;
349     exception_tb = NULL; 282     exception_tb = NULL;
350     exception_lineno = 0; 283     exception_lineno = 0;
351 284
n 352     Py_XDECREF( tmp_for_loop_1__iter_value ); n
353     tmp_for_loop_1__iter_value = NULL;
354  
355     CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
356     Py_DECREF( tmp_for_loop_1__for_iterator );
357     tmp_for_loop_1__for_iterator = NULL;
358  
359     // Re-raise. 285     // Re-raise.
360     exception_type = exception_keeper_type_1; 286     exception_type = exception_keeper_type_1;
361     exception_value = exception_keeper_value_1; 287     exception_value = exception_keeper_value_1;
362     exception_tb = exception_keeper_tb_1; 288     exception_tb = exception_keeper_tb_1;
363     exception_lineno = exception_keeper_lineno_1; 289     exception_lineno = exception_keeper_lineno_1;
n 364   n
365     goto frame_exception_exit_1;
366     // End of try:
367     try_end_1:;
368  
369 #if 0
370     RESTORE_FRAME_EXCEPTION( frame_8564ba67f3ee87ae4e2e0da9982552db );
371 #endif
372  
373     // Put the previous frame back on top.
374     popFrameStack();
375  
376     goto frame_no_exception_1;
377  
378     frame_exception_exit_1:;
379  
380 #if 0
381     RESTORE_FRAME_EXCEPTION( frame_8564ba67f3ee87ae4e2e0da9982552db );
382 #endif
383  
384     if ( exception_tb == NULL )
385     {
386         exception_tb = MAKE_TRACEBACK( frame_8564ba67f3ee87ae4e2e0da9982552db, exception_lineno );
387     }
388     else if ( exception_tb->tb_frame != &frame_8564ba67f3ee87ae4e2e0da9982552db->m_frame )
389     {
390         exception_tb = ADD_TRACEBACK( exception_tb, frame_8564ba67f3ee87ae4e2e0da9982552db, exception_lineno );
391     }
392  
393     // Attachs locals to frame if any.
394     Nuitka_Frame_AttachLocals(
395         (struct Nuitka_FrameObject *)frame_8564ba67f3ee87ae4e2e0da9982552db,
396         type_description_1,
397         var_x,
398         var_local_value
399     );
400  
401  
402     // Release cached frame.
403     if ( frame_8564ba67f3ee87ae4e2e0da9982552db == cache_frame_8564ba67f3ee87ae4e2e0da9982552db )
404     {
405         Py_DECREF( frame_8564ba67f3ee87ae4e2e0da9982552db );
406     }
407     cache_frame_8564ba67f3ee87ae4e2e0da9982552db = NULL;
408  
409     assertFrameObject( frame_8564ba67f3ee87ae4e2e0da9982552db );
410  
411     // Put the previous frame back on top.
412     popFrameStack();
413  
414     // Return the error.
415     goto try_except_handler_1;
416  
417     frame_no_exception_1:;
418     Py_XDECREF( tmp_for_loop_1__iter_value );
419     tmp_for_loop_1__iter_value = NULL;
420  
421     CHECK_OBJECT( (PyObject *)tmp_for_loop_1__for_iterator );
422     Py_DECREF( tmp_for_loop_1__for_iterator );
423     tmp_for_loop_1__for_iterator = NULL;
424  
425     tmp_return_value = Py_None;
426     Py_INCREF( tmp_return_value );
427     goto try_return_handler_1;
428     // tried codes exits in all cases
429     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
430     return NULL;
431     // Return handler code:
432     try_return_handler_1:;
433     CHECK_OBJECT( (PyObject *)var_x );
434     Py_DECREF( var_x );
435     var_x = NULL;
436  
437     CHECK_OBJECT( (PyObject *)var_local_value );
438     Py_DECREF( var_local_value );
439     var_local_value = NULL;
440  
441     goto function_return_exit;
442     // Exception handler code:
443     try_except_handler_1:;
444     exception_keeper_type_2 = exception_type;
445     exception_keeper_value_2 = exception_value;
446     exception_keeper_tb_2 = exception_tb;
447     exception_keeper_lineno_2 = exception_lineno;
448     exception_type = NULL;
449     exception_value = NULL;
450     exception_tb = NULL;
451     exception_lineno = 0;
452  
453     Py_XDECREF( var_x );
454     var_x = NULL;
455  
456     Py_XDECREF( var_local_value );
457     var_local_value = NULL;
458  
459     // Re-raise.
460     exception_type = exception_keeper_type_2;
461     exception_value = exception_keeper_value_2;
462     exception_tb = exception_keeper_tb_2;
463     exception_lineno = exception_keeper_lineno_2;
464 290
465     goto function_exception_exit; 291     goto function_exception_exit;
466     // End of try: 292     // End of try:
467 293
468     // Return statement must have exited already. 294     // Return statement must have exited already.
494         impl___main__$$$function_1_calledRepeatedly, 320         impl___main__$$$function_1_calledRepeatedly,
495         const_str_plain_calledRepeatedly, 321         const_str_plain_calledRepeatedly,
496 #if PYTHON_VERSION >= 300 322 #if PYTHON_VERSION >= 300
497         NULL, 323         NULL,
498 #endif 324 #endif
n 499         codeobj_8564ba67f3ee87ae4e2e0da9982552db, n 325         codeobj_aca509f4a41d612893965e63d90ec3a4,
500         NULL, 326         NULL,
501 #if PYTHON_VERSION >= 300 327 #if PYTHON_VERSION >= 300
502         NULL, 328         NULL,
503         NULL, 329         NULL,
504 #endif 330 #endif
810         tmp_assign_source_3 = Py_None; 636         tmp_assign_source_3 = Py_None;
811         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_3 ); 637         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_3 );
812     } 638     }
813     { 639     {
814         PyObject *tmp_assign_source_4; 640         PyObject *tmp_assign_source_4;
n 815         tmp_assign_source_4 = const_str_digest_da2e8b823a4e4e969a9d6eaaa56344f1; n 641         tmp_assign_source_4 = const_int_pos_5;
816         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___file__, tmp_assign_source_4 ); 642         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1, tmp_assign_source_4 );
817     } 643     }
818     { 644     {
819         PyObject *tmp_assign_source_5; 645         PyObject *tmp_assign_source_5;
n 820         tmp_assign_source_5 = const_int_pos_5; n 646         tmp_assign_source_5 = const_int_pos_3;
821         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1, tmp_assign_source_5 ); 647         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value2, tmp_assign_source_5 );
822     } 648     }
823     { 649     {
824         PyObject *tmp_assign_source_6; 650         PyObject *tmp_assign_source_6;
n 825         tmp_assign_source_6 = const_int_pos_3; n 651         tmp_assign_source_6 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  );
652  
653  
654  
826         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value2, tmp_assign_source_6 ); 655         UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_calledRepeatedly, tmp_assign_source_6 );
827     } 656     }
828     { 657     {
829         PyObject *tmp_assign_source_7; 658         PyObject *tmp_assign_source_7;
n 830         tmp_assign_source_7 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ); n
831  
832  
833  
834         UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_calledRepeatedly, tmp_assign_source_7 );
835     }
836     {
837         PyObject *tmp_assign_source_8;
838         PyObject *tmp_name_name_1; 659         PyObject *tmp_name_name_1;
839         PyObject *tmp_globals_name_1; 660         PyObject *tmp_globals_name_1;
840         PyObject *tmp_locals_name_1; 661         PyObject *tmp_locals_name_1;
841         PyObject *tmp_fromlist_name_1; 662         PyObject *tmp_fromlist_name_1;
842         PyObject *tmp_level_name_1; 663         PyObject *tmp_level_name_1;
843         tmp_name_name_1 = const_str_plain_itertools; 664         tmp_name_name_1 = const_str_plain_itertools;
844         tmp_globals_name_1 = (PyObject *)moduledict___main__; 665         tmp_globals_name_1 = (PyObject *)moduledict___main__;
845         tmp_locals_name_1 = Py_None; 666         tmp_locals_name_1 = Py_None;
846         tmp_fromlist_name_1 = Py_None; 667         tmp_fromlist_name_1 = Py_None;
847         tmp_level_name_1 = const_int_0; 668         tmp_level_name_1 = const_int_0;
n 848         tmp_assign_source_8 = IMPORT_MODULE5( tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1 ); n 669         tmp_assign_source_7 = IMPORT_MODULE5( tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1 );
849         assert( !(tmp_assign_source_8 == NULL) ); 670         assert( !(tmp_assign_source_7 == NULL) );
850         UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_itertools, tmp_assign_source_8 ); 671         UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_itertools, tmp_assign_source_7 );
851     } 672     }
852     // Frame without reuse. 673     // Frame without reuse.
853     frame_78e8e05bcddd6dbab6585a945fc17221 = MAKE_MODULE_FRAME( codeobj_78e8e05bcddd6dbab6585a945fc17221, module___main__ ); 674     frame_78e8e05bcddd6dbab6585a945fc17221 = MAKE_MODULE_FRAME( codeobj_78e8e05bcddd6dbab6585a945fc17221, module___main__ );
854 675
855     // Push the new frame as the currently active one, and we should be exclusively 676     // Push the new frame as the currently active one, and we should be exclusively
857     pushFrameStack( frame_78e8e05bcddd6dbab6585a945fc17221 ); 678     pushFrameStack( frame_78e8e05bcddd6dbab6585a945fc17221 );
858     assert( Py_REFCNT( frame_78e8e05bcddd6dbab6585a945fc17221 ) == 2 ); 679     assert( Py_REFCNT( frame_78e8e05bcddd6dbab6585a945fc17221 ) == 2 );
859 680
860     // Framed code: 681     // Framed code:
861     { 682     {
n 862         PyObject *tmp_assign_source_9; n 683         PyObject *tmp_assign_source_8;
863         PyObject *tmp_iter_arg_1; 684         PyObject *tmp_iter_arg_1;
864         PyObject *tmp_called_instance_1; 685         PyObject *tmp_called_instance_1;
865         PyObject *tmp_mvar_value_1; 686         PyObject *tmp_mvar_value_1;
866         tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_itertools ); 687         tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_itertools );
867 688
870             tmp_mvar_value_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_itertools ); 691             tmp_mvar_value_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_itertools );
871         } 692         }
872 693
873         CHECK_OBJECT( tmp_mvar_value_1 ); 694         CHECK_OBJECT( tmp_mvar_value_1 );
874         tmp_called_instance_1 = tmp_mvar_value_1; 695         tmp_called_instance_1 = tmp_mvar_value_1;
n 875         frame_78e8e05bcddd6dbab6585a945fc17221->m_frame.f_lineno = 40; n 696         frame_78e8e05bcddd6dbab6585a945fc17221->m_frame.f_lineno = 39;
876         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2( tmp_called_instance_1, const_str_plain_repeat, &PyTuple_GET_ITEM( const_tuple_none_int_pos_50000_tuple, 0 ) ); 697         tmp_iter_arg_1 = CALL_METHOD_WITH_ARGS2( tmp_called_instance_1, const_str_plain_repeat, &PyTuple_GET_ITEM( const_tuple_none_int_pos_50000_tuple, 0 ) );
877 698
878         if ( tmp_iter_arg_1 == NULL ) 699         if ( tmp_iter_arg_1 == NULL )
879         { 700         {
880             assert( ERROR_OCCURRED() ); 701             assert( ERROR_OCCURRED() );
881 702
882             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 703             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
883 704
884 705
n 885             exception_lineno = 40; n 706             exception_lineno = 39;
886 707
887             goto frame_exception_exit_1; 708             goto frame_exception_exit_1;
888         } 709         }
n 889         tmp_assign_source_9 = MAKE_ITERATOR( tmp_iter_arg_1 ); n 710         tmp_assign_source_8 = MAKE_ITERATOR( tmp_iter_arg_1 );
890         Py_DECREF( tmp_iter_arg_1 ); 711         Py_DECREF( tmp_iter_arg_1 );
n 891         if ( tmp_assign_source_9 == NULL ) n 712         if ( tmp_assign_source_8 == NULL )
892         { 713         {
893             assert( ERROR_OCCURRED() ); 714             assert( ERROR_OCCURRED() );
894 715
895             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 716             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
896 717
897 718
n 898             exception_lineno = 40; n 719             exception_lineno = 39;
899 720
900             goto frame_exception_exit_1; 721             goto frame_exception_exit_1;
901         } 722         }
902         assert( tmp_for_loop_1__for_iterator == NULL ); 723         assert( tmp_for_loop_1__for_iterator == NULL );
n 903         tmp_for_loop_1__for_iterator = tmp_assign_source_9; n 724         tmp_for_loop_1__for_iterator = tmp_assign_source_8;
904     } 725     }
905     // Tried code: 726     // Tried code:
906     loop_start_1:; 727     loop_start_1:;
907     { 728     {
908         PyObject *tmp_next_source_1; 729         PyObject *tmp_next_source_1;
n 909         PyObject *tmp_assign_source_10; n 730         PyObject *tmp_assign_source_9;
910         CHECK_OBJECT( tmp_for_loop_1__for_iterator ); 731         CHECK_OBJECT( tmp_for_loop_1__for_iterator );
911         tmp_next_source_1 = tmp_for_loop_1__for_iterator; 732         tmp_next_source_1 = tmp_for_loop_1__for_iterator;
n 912         tmp_assign_source_10 = ITERATOR_NEXT( tmp_next_source_1 ); n 733         tmp_assign_source_9 = ITERATOR_NEXT( tmp_next_source_1 );
913         if ( tmp_assign_source_10 == NULL ) 734         if ( tmp_assign_source_9 == NULL )
914         { 735         {
915             if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() ) 736             if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
916             { 737             {
917 738
918                 goto loop_end_1; 739                 goto loop_end_1;
920             else 741             else
921             { 742             {
922 743
923                 FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 744                 FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
924 745
n 925                 exception_lineno = 40; n 746                 exception_lineno = 39;
926                 goto try_except_handler_1; 747                 goto try_except_handler_1;
927             } 748             }
928         } 749         }
929 750
930         { 751         {
931             PyObject *old = tmp_for_loop_1__iter_value; 752             PyObject *old = tmp_for_loop_1__iter_value;
n 932             tmp_for_loop_1__iter_value = tmp_assign_source_10; n 753             tmp_for_loop_1__iter_value = tmp_assign_source_9;
933             Py_XDECREF( old ); 754             Py_XDECREF( old );
934         } 755         }
935 756
936     } 757     }
937     { 758     {
n 938         PyObject *tmp_assign_source_11; n 759         PyObject *tmp_assign_source_10;
939         CHECK_OBJECT( tmp_for_loop_1__iter_value ); 760         CHECK_OBJECT( tmp_for_loop_1__iter_value );
n 940         tmp_assign_source_11 = tmp_for_loop_1__iter_value; n 761         tmp_assign_source_10 = tmp_for_loop_1__iter_value;
941         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_x, tmp_assign_source_11 ); 762         UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_x, tmp_assign_source_10 );
942     } 763     }
943     { 764     {
944         PyObject *tmp_called_name_1; 765         PyObject *tmp_called_name_1;
945         PyObject *tmp_mvar_value_2; 766         PyObject *tmp_mvar_value_2;
946         PyObject *tmp_call_result_1; 767         PyObject *tmp_call_result_1;
959             exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "calledRepeatedly" ); 780             exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "calledRepeatedly" );
960             exception_tb = NULL; 781             exception_tb = NULL;
961             NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 782             NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
962             CHAIN_EXCEPTION( exception_value ); 783             CHAIN_EXCEPTION( exception_value );
963 784
n 964             exception_lineno = 41; n 785             exception_lineno = 40;
965 786
966             goto try_except_handler_1; 787             goto try_except_handler_1;
967         } 788         }
968 789
969         tmp_called_name_1 = tmp_mvar_value_2; 790         tmp_called_name_1 = tmp_mvar_value_2;
n 970         frame_78e8e05bcddd6dbab6585a945fc17221->m_frame.f_lineno = 41; n 791         frame_78e8e05bcddd6dbab6585a945fc17221->m_frame.f_lineno = 40;
971         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS( tmp_called_name_1 ); 792         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS( tmp_called_name_1 );
972         if ( tmp_call_result_1 == NULL ) 793         if ( tmp_call_result_1 == NULL )
973         { 794         {
974             assert( ERROR_OCCURRED() ); 795             assert( ERROR_OCCURRED() );
975 796
976             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 797             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
977 798
978 799
n 979             exception_lineno = 41; n 800             exception_lineno = 40;
980 801
981             goto try_except_handler_1; 802             goto try_except_handler_1;
982         } 803         }
983         Py_DECREF( tmp_call_result_1 ); 804         Py_DECREF( tmp_call_result_1 );
984     } 805     }
987         assert( ERROR_OCCURRED() ); 808         assert( ERROR_OCCURRED() );
988 809
989         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 810         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
990 811
991 812
n 992         exception_lineno = 40; n 813         exception_lineno = 39;
993 814
994         goto try_except_handler_1; 815         goto try_except_handler_1;
995     } 816     }
996     goto loop_start_1; 817     goto loop_start_1;
997     loop_end_1:; 818     loop_end_1:;
1033     { 854     {
1034         PyObject *tmp_called_name_2; 855         PyObject *tmp_called_name_2;
1035         PyObject *tmp_call_result_2; 856         PyObject *tmp_call_result_2;
1036         tmp_called_name_2 = LOOKUP_BUILTIN( const_str_plain_print ); 857         tmp_called_name_2 = LOOKUP_BUILTIN( const_str_plain_print );
1037         assert( tmp_called_name_2 != NULL ); 858         assert( tmp_called_name_2 != NULL );
n 1038         frame_78e8e05bcddd6dbab6585a945fc17221->m_frame.f_lineno = 43; n 859         frame_78e8e05bcddd6dbab6585a945fc17221->m_frame.f_lineno = 42;
1039         tmp_call_result_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, &PyTuple_GET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0 ) ); 860         tmp_call_result_2 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, &PyTuple_GET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0 ) );
1040 861
1041         if ( tmp_call_result_2 == NULL ) 862         if ( tmp_call_result_2 == NULL )
1042         { 863         {
1043             assert( ERROR_OCCURRED() ); 864             assert( ERROR_OCCURRED() );
1044 865
1045             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 866             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
1046 867
1047 868
t 1048             exception_lineno = 43; t 869             exception_lineno = 42;
1049 870
1050             goto frame_exception_exit_1; 871             goto frame_exception_exit_1;
1051         } 872         }
1052         Py_DECREF( tmp_call_result_2 ); 873         Py_DECREF( tmp_call_result_2 );
1053     } 874     }