Construct LoopSmallXrange

Performance Diagrams

Construct LoopSmallXrange 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)9147532988.95192307692307257.0CPython 2.730706105242.31730769230768421.16459307337897Nuitka (master)30705962395.6826923076923421.16497937972395Nuitka (develop)30705914549.0480769230769421.16510904898655Nuitka (factory)Construct LoopSmallXrangeTicks Construct LoopSmallXrange 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000110000000110000000120000000120000000130000000130000000140000000140000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)14521877888.11538461538461257.0CPython 3.587823009240.03846153846155354.669032387332Nuitka (master)87823706391.96153846153845354.6678463187983Nuitka (develop)87817070543.8846153846154354.67913864417727Nuitka (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
49 static PyObject *const_str_plain_x; 49 static PyObject *const_str_plain_x;
50 extern PyObject *const_tuple_empty; 50 extern PyObject *const_tuple_empty;
51 static PyObject *const_str_digest_5ed1392909ad16e6227b8230f4582352; 51 static PyObject *const_str_digest_5ed1392909ad16e6227b8230f4582352;
52 static PyObject *const_int_pos_5; 52 static PyObject *const_int_pos_5;
53 static PyObject *const_str_plain_repeat; 53 static PyObject *const_str_plain_repeat;
n 54 static PyObject *const_int_pos_2; n
55 static PyObject *const_tuple_none_int_pos_50000_tuple; 54 static PyObject *const_tuple_none_int_pos_50000_tuple;
56 static PyObject *const_tuple_str_plain_x_str_plain_local_value_tuple; 55 static PyObject *const_tuple_str_plain_x_str_plain_local_value_tuple;
57 extern PyObject *const_str_plain___loader__; 56 extern PyObject *const_str_plain___loader__;
58 extern PyObject *const_str_plain___main__; 57 extern PyObject *const_str_plain___main__;
59 static PyObject *const_str_digest_940f9cd0bf3b4d2441f0dc1dbe61b4fd; 58 static PyObject *const_str_digest_940f9cd0bf3b4d2441f0dc1dbe61b4fd;
60 extern PyObject *const_str_plain___doc__; 59 extern PyObject *const_str_plain___doc__;
61 extern PyObject *const_str_plain___cached__; 60 extern PyObject *const_str_plain___cached__;
n 62 static PyObject *const_str_digest_8bfd5d1c4389fd549f2950a82590386c; n
63 static PyObject *module_filename_obj; 61 static PyObject *module_filename_obj;
64 62
65 static bool constants_created = false; 63 static bool constants_created = false;
66 64
67 static void createModuleConstants( void ) 65 static void createModuleConstants( void )
80     const_str_plain_calledRepeatedly = UNSTREAM_STRING( &constant_bin[ 68 ], 16, 1 ); 78     const_str_plain_calledRepeatedly = UNSTREAM_STRING( &constant_bin[ 68 ], 16, 1 );
81     const_str_angle_module = UNSTREAM_STRING( &constant_bin[ 84 ], 8, 0 ); 79     const_str_angle_module = UNSTREAM_STRING( &constant_bin[ 84 ], 8, 0 );
82     const_str_plain_x = UNSTREAM_STRING( &constant_bin[ 92 ], 1, 1 ); 80     const_str_plain_x = UNSTREAM_STRING( &constant_bin[ 92 ], 1, 1 );
83     const_int_pos_5 = PyLong_FromUnsignedLong( 5ul ); 81     const_int_pos_5 = PyLong_FromUnsignedLong( 5ul );
84     const_str_plain_repeat = UNSTREAM_STRING( &constant_bin[ 93 ], 6, 1 ); 82     const_str_plain_repeat = UNSTREAM_STRING( &constant_bin[ 93 ], 6, 1 );
n 85     const_int_pos_2 = PyLong_FromUnsignedLong( 2ul ); n
86     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 ); 83     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 );
87     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 0, Py_None ); Py_INCREF( Py_None ); 84     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 0, Py_None ); Py_INCREF( Py_None );
88     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 ); 85     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 );
89     const_tuple_str_plain_x_str_plain_local_value_tuple = PyTuple_New( 2 ); 86     const_tuple_str_plain_x_str_plain_local_value_tuple = PyTuple_New( 2 );
90     PyTuple_SET_ITEM( const_tuple_str_plain_x_str_plain_local_value_tuple, 0, const_str_plain_x ); Py_INCREF( const_str_plain_x ); 87     PyTuple_SET_ITEM( const_tuple_str_plain_x_str_plain_local_value_tuple, 0, const_str_plain_x ); Py_INCREF( const_str_plain_x );
91     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 ); 88     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 );
92     const_str_digest_940f9cd0bf3b4d2441f0dc1dbe61b4fd = UNSTREAM_STRING( &constant_bin[ 99 ], 73, 0 ); 89     const_str_digest_940f9cd0bf3b4d2441f0dc1dbe61b4fd = UNSTREAM_STRING( &constant_bin[ 99 ], 73, 0 );
n 93     const_str_digest_8bfd5d1c4389fd549f2950a82590386c = UNSTREAM_STRING( &constant_bin[ 172 ], 56, 0 ); n
94 90
95     constants_created = true; 91     constants_created = true;
96 } 92 }
97 93
98 #ifndef __NUITKA_NO_ASSERT__ 94 #ifndef __NUITKA_NO_ASSERT__
105 } 101 }
106 #endif 102 #endif
107 103
108 // The module code objects. 104 // The module code objects.
109 static PyCodeObject *codeobj_70acf507dcd1b51cd056736911dfc747; 105 static PyCodeObject *codeobj_70acf507dcd1b51cd056736911dfc747;
n 110 static PyCodeObject *codeobj_5f2c05ea4a31f86054d12e097805e473; n 106 static PyCodeObject *codeobj_6c507b3171926808c35c2d5398adf9ab;
111 /* For use in "MainProgram.c". */ 107 /* For use in "MainProgram.c". */
112 PyCodeObject *codeobj_main = NULL; 108 PyCodeObject *codeobj_main = NULL;
113 109
114 static void createModuleCodeObjects(void) 110 static void createModuleCodeObjects(void)
115 { 111 {
116     module_filename_obj = const_str_digest_940f9cd0bf3b4d2441f0dc1dbe61b4fd; 112     module_filename_obj = const_str_digest_940f9cd0bf3b4d2441f0dc1dbe61b4fd;
117     codeobj_70acf507dcd1b51cd056736911dfc747 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE ); 113     codeobj_70acf507dcd1b51cd056736911dfc747 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE );
118     codeobj_main = codeobj_70acf507dcd1b51cd056736911dfc747; 114     codeobj_main = codeobj_70acf507dcd1b51cd056736911dfc747;
n 119     codeobj_5f2c05ea4a31f86054d12e097805e473 = 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 115     codeobj_6c507b3171926808c35c2d5398adf9ab = 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 );
120 } 116 }
121 117
122 // The module function declarations. 118 // The module function declarations.
123 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ); 119 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  );
124 120
130 #ifndef __NUITKA_NO_ASSERT__ 126 #ifndef __NUITKA_NO_ASSERT__
131     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 127     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
132 #endif 128 #endif
133 129
134     // Local variable declarations. 130     // Local variable declarations.
n 135     PyObject *var_x = NULL; n
136     PyObject *var_local_value = NULL; 131     PyObject *var_local_value = NULL;
n 137     PyObject *tmp_for_loop_1__for_iterator = NULL; n
138     PyObject *tmp_for_loop_1__iter_value = NULL;
139     PyObject *exception_type = NULL; 132     PyObject *exception_type = NULL;
140     PyObject *exception_value = NULL; 133     PyObject *exception_value = NULL;
141     PyTracebackObject *exception_tb = NULL; 134     PyTracebackObject *exception_tb = NULL;
142     NUITKA_MAY_BE_UNUSED int exception_lineno = 0; 135     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
143     PyObject *exception_keeper_type_1; 136     PyObject *exception_keeper_type_1;
144     PyObject *exception_keeper_value_1; 137     PyObject *exception_keeper_value_1;
145     PyTracebackObject *exception_keeper_tb_1; 138     PyTracebackObject *exception_keeper_tb_1;
146     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; 139     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
n 147     PyObject *exception_keeper_type_2; n
148     PyObject *exception_keeper_value_2;
149     PyTracebackObject *exception_keeper_tb_2;
150     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
151     PyObject *tmp_assign_source_1; 140     PyObject *tmp_assign_source_1;
n 152     PyObject *tmp_assign_source_2; n
153     PyObject *tmp_assign_source_3;
154     PyObject *tmp_assign_source_4;
155     PyObject *tmp_assign_source_5;
156     PyObject *tmp_iter_arg_1;
157     PyObject *tmp_left_name_1;
158     PyObject *tmp_next_source_1;
159     PyObject *tmp_return_value; 141     PyObject *tmp_return_value;
n 160     PyObject *tmp_right_name_1; n
161     NUITKA_MAY_BE_UNUSED PyObject *tmp_unused; 142     NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
n 162     PyObject *tmp_xrange_high_1; n 143     static struct Nuitka_FrameObject *cache_frame_6c507b3171926808c35c2d5398adf9ab = NULL;
163     PyObject *tmp_xrange_low_1;
164     static struct Nuitka_FrameObject *cache_frame_5f2c05ea4a31f86054d12e097805e473 = NULL;
165 144
n 166     struct Nuitka_FrameObject *frame_5f2c05ea4a31f86054d12e097805e473; n 145     struct Nuitka_FrameObject *frame_6c507b3171926808c35c2d5398adf9ab;
167 146
168     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; 147     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
169     tmp_return_value = NULL; 148     tmp_return_value = NULL;
170 149
171     // Actual function code. 150     // Actual function code.
172     // Tried code: 151     // Tried code:
n 173     MAKE_OR_REUSE_FRAME( cache_frame_5f2c05ea4a31f86054d12e097805e473, codeobj_5f2c05ea4a31f86054d12e097805e473, module___main__, sizeof(void *)+sizeof(void *) ); n 152     MAKE_OR_REUSE_FRAME( cache_frame_6c507b3171926808c35c2d5398adf9ab, codeobj_6c507b3171926808c35c2d5398adf9ab, module___main__, sizeof(void *)+sizeof(void *) );
174     frame_5f2c05ea4a31f86054d12e097805e473 = cache_frame_5f2c05ea4a31f86054d12e097805e473; 153     frame_6c507b3171926808c35c2d5398adf9ab = cache_frame_6c507b3171926808c35c2d5398adf9ab;
175 154
176     // Push the new frame as the currently active one. 155     // Push the new frame as the currently active one.
n 177     pushFrameStack( frame_5f2c05ea4a31f86054d12e097805e473 ); n 156     pushFrameStack( frame_6c507b3171926808c35c2d5398adf9ab );
178 157
179     // Mark the frame object as in use, ref count 1 will be up for reuse. 158     // Mark the frame object as in use, ref count 1 will be up for reuse.
n 180     assert( Py_REFCNT( frame_5f2c05ea4a31f86054d12e097805e473 ) == 2 ); // Frame stack n 159     assert( Py_REFCNT( frame_6c507b3171926808c35c2d5398adf9ab ) == 2 ); // Frame stack
181 160
182     // Framed code: 161     // Framed code:
183     tmp_unused = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 ); 162     tmp_unused = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 );
184 163
185     if (unlikely( tmp_unused == NULL )) 164     if (unlikely( tmp_unused == NULL ))
195         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" ); 174         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" );
196         exception_tb = NULL; 175         exception_tb = NULL;
197         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 176         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
198         CHAIN_EXCEPTION( exception_value ); 177         CHAIN_EXCEPTION( exception_value );
199 178
n 200         exception_lineno = 27; n 179         exception_lineno = 26;
201         type_description_1 = "oo"; 180         type_description_1 = "No";
202         goto frame_exception_exit_1; 181         goto frame_exception_exit_1;
203     } 182     }
204 183
n 205     tmp_assign_source_1 = const_int_pos_2; n
206     assert( var_x == NULL );
207     Py_INCREF( tmp_assign_source_1 );
208     var_x = tmp_assign_source_1;
209  
210     tmp_assign_source_2 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 ); 184     tmp_assign_source_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1 );
211 185
n 212     if (unlikely( tmp_assign_source_2 == NULL )) n 186     if (unlikely( tmp_assign_source_1 == NULL ))
213     { 187     {
n 214         tmp_assign_source_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_module_value1 ); n 188         tmp_assign_source_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_module_value1 );
215     } 189     }
216 190
n 217     if ( tmp_assign_source_2 == NULL ) n 191     if ( tmp_assign_source_1 == NULL )
218     { 192     {
219 193
220         exception_type = PyExc_NameError; 194         exception_type = PyExc_NameError;
221         Py_INCREF( exception_type ); 195         Py_INCREF( exception_type );
222         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" ); 196         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "module_value1" );
223         exception_tb = NULL; 197         exception_tb = NULL;
224         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 198         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
225         CHAIN_EXCEPTION( exception_value ); 199         CHAIN_EXCEPTION( exception_value );
226 200
n 227         exception_lineno = 32; n 201         exception_lineno = 31;
228         type_description_1 = "oo"; 202         type_description_1 = "No";
229         goto frame_exception_exit_1; 203         goto frame_exception_exit_1;
230     } 204     }
231 205
232     assert( var_local_value == NULL ); 206     assert( var_local_value == NULL );
n 233     Py_INCREF( tmp_assign_source_2 ); n 207     Py_INCREF( tmp_assign_source_1 );
234     var_local_value = tmp_assign_source_2; 208     var_local_value = tmp_assign_source_1;
235 209
n 236     tmp_xrange_low_1 = var_local_value; n
237 210
n 238     CHECK_OBJECT( tmp_xrange_low_1 ); n 211 #if 0
239     tmp_left_name_1 = var_local_value; 212     RESTORE_FRAME_EXCEPTION( frame_6c507b3171926808c35c2d5398adf9ab );
213 #endif
240 214
n 241     CHECK_OBJECT( tmp_left_name_1 ); n 215     // Put the previous frame back on top.
242     tmp_right_name_1 = const_int_pos_3; 216     popFrameStack();
243     tmp_xrange_high_1 = BINARY_OPERATION_ADD( tmp_left_name_1, tmp_right_name_1 ); 217  
244     if ( tmp_xrange_high_1 == NULL ) 218     goto frame_no_exception_1;
219  
220     frame_exception_exit_1:;
221  
222 #if 0
223     RESTORE_FRAME_EXCEPTION( frame_6c507b3171926808c35c2d5398adf9ab );
224 #endif
225  
226     if ( exception_tb == NULL )
227     {
228         exception_tb = MAKE_TRACEBACK( frame_6c507b3171926808c35c2d5398adf9ab, exception_lineno );
245     { 229     }
246         assert( ERROR_OCCURRED() ); 230     else if ( exception_tb->tb_frame != &frame_6c507b3171926808c35c2d5398adf9ab->m_frame )
231     {
232         exception_tb = ADD_TRACEBACK( exception_tb, frame_6c507b3171926808c35c2d5398adf9ab, exception_lineno );
233     }
247 234
n 248         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); n 235     // Attachs locals to frame if any.
249   236     Nuitka_Frame_AttachLocals(
250   237         (struct Nuitka_FrameObject *)frame_6c507b3171926808c35c2d5398adf9ab,
251         exception_lineno = 35;
252         type_description_1 = "oo"; 238         type_description_1,
253         goto frame_exception_exit_1; 239         NULL,
240         var_local_value
241     );
242  
243  
244     // Release cached frame.
245     if ( frame_6c507b3171926808c35c2d5398adf9ab == cache_frame_6c507b3171926808c35c2d5398adf9ab )
254     } 246     {
255     tmp_iter_arg_1 = BUILTIN_XRANGE2( tmp_xrange_low_1, tmp_xrange_high_1 ); 247         Py_DECREF( frame_6c507b3171926808c35c2d5398adf9ab );
256     Py_DECREF( tmp_xrange_high_1 );
257     if ( tmp_iter_arg_1 == NULL )
258     { 248     }
259         assert( ERROR_OCCURRED() ); 249     cache_frame_6c507b3171926808c35c2d5398adf9ab = NULL;
260 250
n 261         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); n 251     assertFrameObject( frame_6c507b3171926808c35c2d5398adf9ab );
262 252
n n 253     // Put the previous frame back on top.
254     popFrameStack();
263 255
n 264         exception_lineno = 35; n 256     // Return the error.
265         type_description_1 = "oo";
266         goto frame_exception_exit_1;
267     }
268     tmp_assign_source_3 = MAKE_ITERATOR( tmp_iter_arg_1 );
269     Py_DECREF( tmp_iter_arg_1 );
270     if ( tmp_assign_source_3 == NULL )
271     {
272         assert( ERROR_OCCURRED() );
273  
274         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
275  
276  
277         exception_lineno = 35;
278         type_description_1 = "oo";
279         goto frame_exception_exit_1;
280     }
281     assert( tmp_for_loop_1__for_iterator == NULL );
282     tmp_for_loop_1__for_iterator = tmp_assign_source_3;
283  
284     // Tried code:
285     loop_start_1:;
286     tmp_next_source_1 = tmp_for_loop_1__for_iterator;
287  
288     CHECK_OBJECT( tmp_next_source_1 );
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     tmp_assign_source_5 = tmp_for_loop_1__iter_value;
314  
315     CHECK_OBJECT( tmp_assign_source_5 );
316     {
317         PyObject *old = var_x;
318         var_x = tmp_assign_source_5;
319         Py_INCREF( var_x );
320         Py_XDECREF( old );
321     }
322  
323     if ( CONSIDER_THREADING() == false )
324     {
325         assert( ERROR_OCCURRED() );
326  
327         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
328  
329  
330         exception_lineno = 35;
331         type_description_1 = "oo";
332         goto try_except_handler_2; 257     goto try_except_handler_1;
333     } 258  
334     goto loop_start_1; 259     frame_no_exception_1:;
335     loop_end_1:; 260  
261     tmp_return_value = Py_None;
262     Py_INCREF( tmp_return_value );
336     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;
337     // Exception handler code: 274     // Exception handler code:
n 338     try_except_handler_2:; n 275     try_except_handler_1:;
339     exception_keeper_type_1 = exception_type; 276     exception_keeper_type_1 = exception_type;
340     exception_keeper_value_1 = exception_value; 277     exception_keeper_value_1 = exception_value;
341     exception_keeper_tb_1 = exception_tb; 278     exception_keeper_tb_1 = exception_tb;
342     exception_keeper_lineno_1 = exception_lineno; 279     exception_keeper_lineno_1 = exception_lineno;
343     exception_type = NULL; 280     exception_type = NULL;
344     exception_value = NULL; 281     exception_value = NULL;
345     exception_tb = NULL; 282     exception_tb = NULL;
346     exception_lineno = 0; 283     exception_lineno = 0;
347 284
n 348     Py_XDECREF( tmp_for_loop_1__iter_value ); n
349     tmp_for_loop_1__iter_value = NULL;
350  
351     Py_XDECREF( tmp_for_loop_1__for_iterator );
352     tmp_for_loop_1__for_iterator = NULL;
353  
354     // Re-raise. 285     // Re-raise.
355     exception_type = exception_keeper_type_1; 286     exception_type = exception_keeper_type_1;
356     exception_value = exception_keeper_value_1; 287     exception_value = exception_keeper_value_1;
357     exception_tb = exception_keeper_tb_1; 288     exception_tb = exception_keeper_tb_1;
358     exception_lineno = exception_keeper_lineno_1; 289     exception_lineno = exception_keeper_lineno_1;
n 359   n
360     goto frame_exception_exit_1;
361     // End of try:
362     try_end_1:;
363  
364 #if 0
365     RESTORE_FRAME_EXCEPTION( frame_5f2c05ea4a31f86054d12e097805e473 );
366 #endif
367  
368     // Put the previous frame back on top.
369     popFrameStack();
370  
371     goto frame_no_exception_1;
372  
373     frame_exception_exit_1:;
374  
375 #if 0
376     RESTORE_FRAME_EXCEPTION( frame_5f2c05ea4a31f86054d12e097805e473 );
377 #endif
378  
379     if ( exception_tb == NULL )
380     {
381         exception_tb = MAKE_TRACEBACK( frame_5f2c05ea4a31f86054d12e097805e473, exception_lineno );
382     }
383     else if ( exception_tb->tb_frame != &frame_5f2c05ea4a31f86054d12e097805e473->m_frame )
384     {
385         exception_tb = ADD_TRACEBACK( exception_tb, frame_5f2c05ea4a31f86054d12e097805e473, exception_lineno );
386     }
387  
388     // Attachs locals to frame if any.
389     Nuitka_Frame_AttachLocals(
390         (struct Nuitka_FrameObject *)frame_5f2c05ea4a31f86054d12e097805e473,
391         type_description_1,
392         var_x,
393         var_local_value
394     );
395  
396  
397     // Release cached frame.
398     if ( frame_5f2c05ea4a31f86054d12e097805e473 == cache_frame_5f2c05ea4a31f86054d12e097805e473 )
399     {
400         Py_DECREF( frame_5f2c05ea4a31f86054d12e097805e473 );
401     }
402     cache_frame_5f2c05ea4a31f86054d12e097805e473 = NULL;
403  
404     assertFrameObject( frame_5f2c05ea4a31f86054d12e097805e473 );
405  
406     // Put the previous frame back on top.
407     popFrameStack();
408  
409     // Return the error.
410     goto try_except_handler_1;
411  
412     frame_no_exception_1:;
413  
414     Py_XDECREF( tmp_for_loop_1__iter_value );
415     tmp_for_loop_1__iter_value = NULL;
416  
417     Py_XDECREF( tmp_for_loop_1__for_iterator );
418     tmp_for_loop_1__for_iterator = NULL;
419  
420     tmp_return_value = Py_None;
421     Py_INCREF( tmp_return_value );
422     goto try_return_handler_1;
423     // tried codes exits in all cases
424     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
425     return NULL;
426     // Return handler code:
427     try_return_handler_1:;
428     Py_XDECREF( var_x );
429     var_x = NULL;
430  
431     Py_XDECREF( var_local_value );
432     var_local_value = NULL;
433  
434     goto function_return_exit;
435     // Exception handler code:
436     try_except_handler_1:;
437     exception_keeper_type_2 = exception_type;
438     exception_keeper_value_2 = exception_value;
439     exception_keeper_tb_2 = exception_tb;
440     exception_keeper_lineno_2 = exception_lineno;
441     exception_type = NULL;
442     exception_value = NULL;
443     exception_tb = NULL;
444     exception_lineno = 0;
445  
446     Py_XDECREF( var_x );
447     var_x = NULL;
448  
449     Py_XDECREF( var_local_value );
450     var_local_value = NULL;
451  
452     // Re-raise.
453     exception_type = exception_keeper_type_2;
454     exception_value = exception_keeper_value_2;
455     exception_tb = exception_keeper_tb_2;
456     exception_lineno = exception_keeper_lineno_2;
457 290
458     goto function_exception_exit; 291     goto function_exception_exit;
459     // End of try: 292     // End of try:
460 293
461     // Return statement must have exited already. 294     // Return statement must have exited already.
483         impl___main__$$$function_1_calledRepeatedly, 316         impl___main__$$$function_1_calledRepeatedly,
484         const_str_plain_calledRepeatedly, 317         const_str_plain_calledRepeatedly,
485 #if PYTHON_VERSION >= 330 318 #if PYTHON_VERSION >= 330
486         NULL, 319         NULL,
487 #endif 320 #endif
n 488         codeobj_5f2c05ea4a31f86054d12e097805e473, n 321         codeobj_6c507b3171926808c35c2d5398adf9ab,
489         NULL, 322         NULL,
490 #if PYTHON_VERSION >= 300 323 #if PYTHON_VERSION >= 300
491         NULL, 324         NULL,
492         const_dict_empty, 325         const_dict_empty,
493 #endif 326 #endif
687     PyObject *tmp_assign_source_9; 520     PyObject *tmp_assign_source_9;
688     PyObject *tmp_assign_source_10; 521     PyObject *tmp_assign_source_10;
689     PyObject *tmp_assign_source_11; 522     PyObject *tmp_assign_source_11;
690     PyObject *tmp_assign_source_12; 523     PyObject *tmp_assign_source_12;
691     PyObject *tmp_assign_source_13; 524     PyObject *tmp_assign_source_13;
n 692     PyObject *tmp_assign_source_14; n
693     PyObject *tmp_called_instance_1; 525     PyObject *tmp_called_instance_1;
694     PyObject *tmp_called_name_1; 526     PyObject *tmp_called_name_1;
695     PyObject *tmp_called_name_2; 527     PyObject *tmp_called_name_2;
696     PyObject *tmp_fromlist_name_1; 528     PyObject *tmp_fromlist_name_1;
697     PyObject *tmp_globals_name_1; 529     PyObject *tmp_globals_name_1;
716     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___spec__, tmp_assign_source_4 ); 548     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___spec__, tmp_assign_source_4 );
717     tmp_assign_source_5 = Py_None; 549     tmp_assign_source_5 = Py_None;
718     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_5 ); 550     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_5 );
719     tmp_assign_source_6 = Py_None; 551     tmp_assign_source_6 = Py_None;
720     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___package__, tmp_assign_source_6 ); 552     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___package__, tmp_assign_source_6 );
n 721     tmp_assign_source_7 = const_str_digest_8bfd5d1c4389fd549f2950a82590386c; n
722     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain___file__, tmp_assign_source_7 );
723     tmp_assign_source_8 = const_int_pos_5; 553     tmp_assign_source_7 = const_int_pos_5;
724     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1, tmp_assign_source_8 ); 554     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value1, tmp_assign_source_7 );
725     tmp_assign_source_9 = const_int_pos_3; 555     tmp_assign_source_8 = const_int_pos_3;
726     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value2, tmp_assign_source_9 ); 556     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_module_value2, tmp_assign_source_8 );
727     tmp_assign_source_10 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ); 557     tmp_assign_source_9 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  );
728     UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_calledRepeatedly, tmp_assign_source_10 ); 558     UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_calledRepeatedly, tmp_assign_source_9 );
729     tmp_name_name_1 = const_str_plain_itertools; 559     tmp_name_name_1 = const_str_plain_itertools;
730     tmp_globals_name_1 = (PyObject *)moduledict___main__; 560     tmp_globals_name_1 = (PyObject *)moduledict___main__;
731     tmp_locals_name_1 = Py_None; 561     tmp_locals_name_1 = Py_None;
732     tmp_fromlist_name_1 = Py_None; 562     tmp_fromlist_name_1 = Py_None;
733     tmp_level_name_1 = const_int_0; 563     tmp_level_name_1 = const_int_0;
n 734     tmp_assign_source_11 = IMPORT_MODULE5( tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1 ); n 564     tmp_assign_source_10 = IMPORT_MODULE5( tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1 );
735     assert( tmp_assign_source_11 != NULL ); 565     assert( tmp_assign_source_10 != NULL );
736     UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_itertools, tmp_assign_source_11 ); 566     UPDATE_STRING_DICT1( moduledict___main__, (Nuitka_StringObject *)const_str_plain_itertools, tmp_assign_source_10 );
737     // Frame without reuse. 567     // Frame without reuse.
738     frame_70acf507dcd1b51cd056736911dfc747 = MAKE_MODULE_FRAME( codeobj_70acf507dcd1b51cd056736911dfc747, module___main__ ); 568     frame_70acf507dcd1b51cd056736911dfc747 = MAKE_MODULE_FRAME( codeobj_70acf507dcd1b51cd056736911dfc747, module___main__ );
739 569
740     // Push the new frame as the currently active one, and we should be exclusively 570     // Push the new frame as the currently active one, and we should be exclusively
741     // owning it. 571     // owning it.
758         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "itertools" ); 588         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "itertools" );
759         exception_tb = NULL; 589         exception_tb = NULL;
760         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 590         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
761         CHAIN_EXCEPTION( exception_value ); 591         CHAIN_EXCEPTION( exception_value );
762 592
n 763         exception_lineno = 40; n 593         exception_lineno = 39;
764 594
765         goto frame_exception_exit_1; 595         goto frame_exception_exit_1;
766     } 596     }
767 597
n 768     frame_70acf507dcd1b51cd056736911dfc747->m_frame.f_lineno = 40; n 598     frame_70acf507dcd1b51cd056736911dfc747->m_frame.f_lineno = 39;
769     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 ) ); 599     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 ) );
770 600
771     if ( tmp_iter_arg_1 == NULL ) 601     if ( tmp_iter_arg_1 == NULL )
772     { 602     {
773         assert( ERROR_OCCURRED() ); 603         assert( ERROR_OCCURRED() );
774 604
775         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 605         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
776 606
777 607
n 778         exception_lineno = 40; n 608         exception_lineno = 39;
779 609
780         goto frame_exception_exit_1; 610         goto frame_exception_exit_1;
781     } 611     }
n 782     tmp_assign_source_12 = MAKE_ITERATOR( tmp_iter_arg_1 ); n 612     tmp_assign_source_11 = MAKE_ITERATOR( tmp_iter_arg_1 );
783     Py_DECREF( tmp_iter_arg_1 ); 613     Py_DECREF( tmp_iter_arg_1 );
n 784     if ( tmp_assign_source_12 == NULL ) n 614     if ( tmp_assign_source_11 == NULL )
785     { 615     {
786         assert( ERROR_OCCURRED() ); 616         assert( ERROR_OCCURRED() );
787 617
788         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 618         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
789 619
790 620
n 791         exception_lineno = 40; n 621         exception_lineno = 39;
792 622
793         goto frame_exception_exit_1; 623         goto frame_exception_exit_1;
794     } 624     }
795     assert( tmp_for_loop_1__for_iterator == NULL ); 625     assert( tmp_for_loop_1__for_iterator == NULL );
n 796     tmp_for_loop_1__for_iterator = tmp_assign_source_12; n 626     tmp_for_loop_1__for_iterator = tmp_assign_source_11;
797 627
798     // Tried code: 628     // Tried code:
799     loop_start_1:; 629     loop_start_1:;
800     tmp_next_source_1 = tmp_for_loop_1__for_iterator; 630     tmp_next_source_1 = tmp_for_loop_1__for_iterator;
801 631
802     CHECK_OBJECT( tmp_next_source_1 ); 632     CHECK_OBJECT( tmp_next_source_1 );
n 803     tmp_assign_source_13 = ITERATOR_NEXT( tmp_next_source_1 ); n 633     tmp_assign_source_12 = ITERATOR_NEXT( tmp_next_source_1 );
804     if ( tmp_assign_source_13 == NULL ) 634     if ( tmp_assign_source_12 == NULL )
805     { 635     {
806         if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() ) 636         if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
807         { 637         {
808 638
809             goto loop_end_1; 639             goto loop_end_1;
811         else 641         else
812         { 642         {
813 643
814             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 644             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
815 645
n 816             exception_lineno = 40; n 646             exception_lineno = 39;
817             goto try_except_handler_1; 647             goto try_except_handler_1;
818         } 648         }
819     } 649     }
820 650
821     { 651     {
822         PyObject *old = tmp_for_loop_1__iter_value; 652         PyObject *old = tmp_for_loop_1__iter_value;
n 823         tmp_for_loop_1__iter_value = tmp_assign_source_13; n 653         tmp_for_loop_1__iter_value = tmp_assign_source_12;
824         Py_XDECREF( old ); 654         Py_XDECREF( old );
825     } 655     }
826 656
n 827     tmp_assign_source_14 = tmp_for_loop_1__iter_value; n 657     tmp_assign_source_13 = tmp_for_loop_1__iter_value;
828 658
n 829     CHECK_OBJECT( tmp_assign_source_14 ); n 659     CHECK_OBJECT( tmp_assign_source_13 );
830     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_x, tmp_assign_source_14 ); 660     UPDATE_STRING_DICT0( moduledict___main__, (Nuitka_StringObject *)const_str_plain_x, tmp_assign_source_13 );
831     tmp_called_name_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_calledRepeatedly ); 661     tmp_called_name_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_calledRepeatedly );
832 662
833     if (unlikely( tmp_called_name_1 == NULL )) 663     if (unlikely( tmp_called_name_1 == NULL ))
834     { 664     {
835         tmp_called_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_calledRepeatedly ); 665         tmp_called_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_calledRepeatedly );
843         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "calledRepeatedly" ); 673         exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "calledRepeatedly" );
844         exception_tb = NULL; 674         exception_tb = NULL;
845         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 675         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
846         CHAIN_EXCEPTION( exception_value ); 676         CHAIN_EXCEPTION( exception_value );
847 677
n 848         exception_lineno = 41; n 678         exception_lineno = 40;
849 679
850         goto try_except_handler_1; 680         goto try_except_handler_1;
851     } 681     }
852 682
n 853     frame_70acf507dcd1b51cd056736911dfc747->m_frame.f_lineno = 41; n 683     frame_70acf507dcd1b51cd056736911dfc747->m_frame.f_lineno = 40;
854     tmp_unused = CALL_FUNCTION_NO_ARGS( tmp_called_name_1 ); 684     tmp_unused = CALL_FUNCTION_NO_ARGS( tmp_called_name_1 );
855     if ( tmp_unused == NULL ) 685     if ( tmp_unused == NULL )
856     { 686     {
857         assert( ERROR_OCCURRED() ); 687         assert( ERROR_OCCURRED() );
858 688
859         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 689         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
860 690
861 691
n 862         exception_lineno = 41; n 692         exception_lineno = 40;
863 693
864         goto try_except_handler_1; 694         goto try_except_handler_1;
865     } 695     }
866     Py_DECREF( tmp_unused ); 696     Py_DECREF( tmp_unused );
867     if ( CONSIDER_THREADING() == false ) 697     if ( CONSIDER_THREADING() == false )
869         assert( ERROR_OCCURRED() ); 699         assert( ERROR_OCCURRED() );
870 700
871         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 701         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
872 702
873 703
n 874         exception_lineno = 40; n 704         exception_lineno = 39;
875 705
876         goto try_except_handler_1; 706         goto try_except_handler_1;
877     } 707     }
878     goto loop_start_1; 708     goto loop_start_1;
879     loop_end_1:; 709     loop_end_1:;
910     Py_XDECREF( tmp_for_loop_1__for_iterator ); 740     Py_XDECREF( tmp_for_loop_1__for_iterator );
911     tmp_for_loop_1__for_iterator = NULL; 741     tmp_for_loop_1__for_iterator = NULL;
912 742
913     tmp_called_name_2 = LOOKUP_BUILTIN( const_str_plain_print ); 743     tmp_called_name_2 = LOOKUP_BUILTIN( const_str_plain_print );
914     assert( tmp_called_name_2 != NULL ); 744     assert( tmp_called_name_2 != NULL );
n 915     frame_70acf507dcd1b51cd056736911dfc747->m_frame.f_lineno = 43; n 745     frame_70acf507dcd1b51cd056736911dfc747->m_frame.f_lineno = 42;
916     tmp_unused = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, &PyTuple_GET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0 ) ); 746     tmp_unused = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, &PyTuple_GET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0 ) );
917 747
918     if ( tmp_unused == NULL ) 748     if ( tmp_unused == NULL )
919     { 749     {
920         assert( ERROR_OCCURRED() ); 750         assert( ERROR_OCCURRED() );
921 751
922         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 752         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
923 753
924 754
t 925         exception_lineno = 43; t 755         exception_lineno = 42;
926 756
927         goto frame_exception_exit_1; 757         goto frame_exception_exit_1;
928     } 758     }
929     Py_DECREF( tmp_unused ); 759     Py_DECREF( tmp_unused );
930 760