Construct LoopSmallXrange

Performance Diagrams

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