Construct ListContraction

Performance Diagrams

Construct ListContraction 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000CPython 2.7Nuitka (historic)Nuitka (master)Nuitka (develop)Nuitka (factory)18036872072.9230769230769257.0CPython 2.785779716194.46153846153845386.5923046071744Nuitka (historic)80689777316.0393.56580995585045Nuitka (master)80681681437.53846153846143393.5769019354012Nuitka (develop)80796577559.0769230769231393.4194878935942Nuitka (factory)Construct ListContractionTicks Construct ListContraction 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000200000000200000000220000000220000000240000000240000000260000000260000000280000000280000000CPython 3.5Nuitka (historic)Nuitka (master)Nuitka (develop)Nuitka (factory)29009757872.9230769230769257.0CPython 3.50194.46153846153845504.11538461538464Nuitka (historic)99365799316.0419.47208008734754Nuitka (master)99166645437.53846153846143419.64172651337765Nuitka (develop)101938144559.0769230769231417.2808655711117Nuitka (factory)Construct ListContractionTicks

Source Code with Construct

module_value1 = 1000

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

# construct_begin
    l = [
        x
        for x in
        range(7)
    ]
# construct_alternative



    return l, x

for x in xrange(50000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

module_value1 = 1000

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

# construct_begin





# construct_alternative
    l = 1
# construct_end

    return l, x

for x in xrange(50000):
    calledRepeatedly()

print("OK.")

Context Diff of Source Code


Construct
Baseline
22 def calledRepeatedly(): 22 def calledRepeatedly():
23     # Force frame and eliminate forward propagation (currently). 23     # Force frame and eliminate forward propagation (currently).
24     module_value1 24     module_value1
25 25
26 # construct_begin 26 # construct_begin
n 27     l = [ n
28         x
29         for x in
30         range(7)
31     ]
32 # construct_alternative
33 27
34 28
t t 29  
30  
31  
32 # construct_alternative
33     l = 1
34 # construct_end
35 35
36     return l, x 36     return l, x
37 37
38 for x in xrange(50000): 38 for x in xrange(50000):
39     calledRepeatedly() 39     calledRepeatedly()

Context Diff of Generated Code


Construct
Baseline
30 PyObject *module___main__; 30 PyObject *module___main__;
31 PyDictObject *moduledict___main__; 31 PyDictObject *moduledict___main__;
32 32
33 /* The module constants used, if any. */ 33 /* The module constants used, if any. */
34 static PyObject *const_tuple_str_plain_l_tuple; 34 static PyObject *const_tuple_str_plain_l_tuple;
n 35 static PyObject *const_xrange_0_7; n
36 static PyObject *const_str_plain___package__; 35 static PyObject *const_str_plain___package__;
37 extern PyObject *const_int_pos_1; 36 extern PyObject *const_int_pos_1;
38 extern PyObject *const_dict_empty; 37 extern PyObject *const_dict_empty;
39 extern PyObject *const_str_plain___file__; 38 extern PyObject *const_str_plain___file__;
n 40 static PyObject *const_str_digest_b9c4baf879ebd882d40843df3a4dead7; n
41 extern PyObject *const_int_0; 39 extern PyObject *const_int_0;
n 42 static PyObject *const_str_angle_listcontraction; n
43 static PyObject *const_xrange_0_50000; 40 static PyObject *const_xrange_0_50000;
44 extern PyObject *const_str_plain_print; 41 extern PyObject *const_str_plain_print;
45 static PyObject *const_int_pos_50000; 42 static PyObject *const_int_pos_50000;
46 static PyObject *const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple; 43 static PyObject *const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple;
47 static PyObject *const_int_pos_1000; 44 static PyObject *const_int_pos_1000;
48 static PyObject *const_str_plain_module_value1; 45 static PyObject *const_str_plain_module_value1;
49 static PyObject *const_str_plain_calledRepeatedly; 46 static PyObject *const_str_plain_calledRepeatedly;
50 static PyObject *const_str_angle_module; 47 static PyObject *const_str_angle_module;
n 51 static PyObject *const_int_pos_7; n
52 static PyObject *const_str_plain_x; 48 static PyObject *const_str_plain_x;
53 static PyObject *const_str_plain_l; 49 static PyObject *const_str_plain_l;
54 extern PyObject *const_tuple_empty; 50 extern PyObject *const_tuple_empty;
55 static PyObject *const_str_digest_5ed1392909ad16e6227b8230f4582352; 51 static PyObject *const_str_digest_5ed1392909ad16e6227b8230f4582352;
56 static PyObject *const_str_digest_a44ba7fa043d62d4732aeb53cf883b42; 52 static PyObject *const_str_digest_a44ba7fa043d62d4732aeb53cf883b42;
n 57 static PyObject *const_tuple_str_digest_b9c4baf879ebd882d40843df3a4dead7_str_plain_x_tuple; n
58 extern PyObject *const_str_plain___loader__; 53 extern PyObject *const_str_plain___loader__;
59 extern PyObject *const_str_plain___main__; 54 extern PyObject *const_str_plain___main__;
60 extern PyObject *const_str_plain___doc__; 55 extern PyObject *const_str_plain___doc__;
61 extern PyObject *const_str_plain___cached__; 56 extern PyObject *const_str_plain___cached__;
62 static PyObject *module_filename_obj; 57 static PyObject *module_filename_obj;
66 static void createModuleConstants( void ) 61 static void createModuleConstants( void )
67 { 62 {
68     const_tuple_str_plain_l_tuple = PyTuple_New( 1 ); 63     const_tuple_str_plain_l_tuple = PyTuple_New( 1 );
69     const_str_plain_l = UNSTREAM_STRING( &constant_bin[ 0 ], 1, 1 ); 64     const_str_plain_l = UNSTREAM_STRING( &constant_bin[ 0 ], 1, 1 );
70     PyTuple_SET_ITEM( const_tuple_str_plain_l_tuple, 0, const_str_plain_l ); Py_INCREF( const_str_plain_l ); 65     PyTuple_SET_ITEM( const_tuple_str_plain_l_tuple, 0, const_str_plain_l ); Py_INCREF( const_str_plain_l );
n 71     const_int_pos_7 = PyLong_FromUnsignedLong( 7ul ); n
72     const_xrange_0_7 = BUILTIN_XRANGE3( const_int_0, const_int_pos_7, const_int_pos_1 );
73     const_str_plain___package__ = UNSTREAM_STRING( &constant_bin[ 1 ], 11, 1 ); 66     const_str_plain___package__ = UNSTREAM_STRING( &constant_bin[ 1 ], 11, 1 );
n 74     const_str_digest_b9c4baf879ebd882d40843df3a4dead7 = UNSTREAM_STRING( &constant_bin[ 12 ], 2, 1 ); n
75     const_str_angle_listcontraction = UNSTREAM_STRING( &constant_bin[ 14 ], 17, 0 );
76     const_int_pos_50000 = PyLong_FromUnsignedLong( 50000ul ); 67     const_int_pos_50000 = PyLong_FromUnsignedLong( 50000ul );
77     const_xrange_0_50000 = BUILTIN_XRANGE3( const_int_0, const_int_pos_50000, const_int_pos_1 ); 68     const_xrange_0_50000 = BUILTIN_XRANGE3( const_int_0, const_int_pos_50000, const_int_pos_1 );
78     const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple = PyTuple_New( 1 ); 69     const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple = PyTuple_New( 1 );
n 79     const_str_digest_5ed1392909ad16e6227b8230f4582352 = UNSTREAM_STRING( &constant_bin[ 31 ], 3, 0 ); n 70     const_str_digest_5ed1392909ad16e6227b8230f4582352 = UNSTREAM_STRING( &constant_bin[ 12 ], 3, 0 );
80     PyTuple_SET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0, const_str_digest_5ed1392909ad16e6227b8230f4582352 ); Py_INCREF( const_str_digest_5ed1392909ad16e6227b8230f4582352 ); 71     PyTuple_SET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0, const_str_digest_5ed1392909ad16e6227b8230f4582352 ); Py_INCREF( const_str_digest_5ed1392909ad16e6227b8230f4582352 );
81     const_int_pos_1000 = PyLong_FromUnsignedLong( 1000ul ); 72     const_int_pos_1000 = PyLong_FromUnsignedLong( 1000ul );
n 82     const_str_plain_module_value1 = UNSTREAM_STRING( &constant_bin[ 34 ], 13, 1 ); n 73     const_str_plain_module_value1 = UNSTREAM_STRING( &constant_bin[ 15 ], 13, 1 );
83     const_str_plain_calledRepeatedly = UNSTREAM_STRING( &constant_bin[ 47 ], 16, 1 ); 74     const_str_plain_calledRepeatedly = UNSTREAM_STRING( &constant_bin[ 28 ], 16, 1 );
84     const_str_angle_module = UNSTREAM_STRING( &constant_bin[ 63 ], 8, 0 ); 75     const_str_angle_module = UNSTREAM_STRING( &constant_bin[ 44 ], 8, 0 );
85     const_str_plain_x = UNSTREAM_STRING( &constant_bin[ 71 ], 1, 1 ); 76     const_str_plain_x = UNSTREAM_STRING( &constant_bin[ 52 ], 1, 1 );
86     const_str_digest_a44ba7fa043d62d4732aeb53cf883b42 = UNSTREAM_STRING( &constant_bin[ 72 ], 73, 0 ); 77     const_str_digest_a44ba7fa043d62d4732aeb53cf883b42 = UNSTREAM_STRING( &constant_bin[ 53 ], 73, 0 );
87     const_tuple_str_digest_b9c4baf879ebd882d40843df3a4dead7_str_plain_x_tuple = PyTuple_New( 2 );
88     PyTuple_SET_ITEM( const_tuple_str_digest_b9c4baf879ebd882d40843df3a4dead7_str_plain_x_tuple, 0, const_str_digest_b9c4baf879ebd882d40843df3a4dead7 ); Py_INCREF( const_str_digest_b9c4baf879ebd882d40843df3a4dead7 );
89     PyTuple_SET_ITEM( const_tuple_str_digest_b9c4baf879ebd882d40843df3a4dead7_str_plain_x_tuple, 1, const_str_plain_x ); Py_INCREF( const_str_plain_x );
90 78
91     constants_created = true; 79     constants_created = true;
92 } 80 }
93 81
94 #ifndef __NUITKA_NO_ASSERT__ 82 #ifndef __NUITKA_NO_ASSERT__
100 88
101 } 89 }
102 #endif 90 #endif
103 91
104 // The module code objects. 92 // The module code objects.
n 105 static PyCodeObject *codeobj_86a25cec390a8797d03de54a5a1963e5; n
106 static PyCodeObject *codeobj_a294f210f9cdf7ca43457ae3dbaf1722; 93 static PyCodeObject *codeobj_a294f210f9cdf7ca43457ae3dbaf1722;
107 static PyCodeObject *codeobj_c65ba0a445c5a839bae3e224f22bbe17; 94 static PyCodeObject *codeobj_c65ba0a445c5a839bae3e224f22bbe17;
108 /* For use in "MainProgram.c". */ 95 /* For use in "MainProgram.c". */
109 PyCodeObject *codeobj_main = NULL; 96 PyCodeObject *codeobj_main = NULL;
110 97
111 static void createModuleCodeObjects(void) 98 static void createModuleCodeObjects(void)
112 { 99 {
113     module_filename_obj = const_str_digest_a44ba7fa043d62d4732aeb53cf883b42; 100     module_filename_obj = const_str_digest_a44ba7fa043d62d4732aeb53cf883b42;
n 114     codeobj_86a25cec390a8797d03de54a5a1963e5 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_listcontraction, 28, const_tuple_str_digest_b9c4baf879ebd882d40843df3a4dead7_str_plain_x_tuple, 1, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE ); n
115     codeobj_a294f210f9cdf7ca43457ae3dbaf1722 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE ); 101     codeobj_a294f210f9cdf7ca43457ae3dbaf1722 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE );
116     codeobj_main = codeobj_a294f210f9cdf7ca43457ae3dbaf1722; 102     codeobj_main = codeobj_a294f210f9cdf7ca43457ae3dbaf1722;
117     codeobj_c65ba0a445c5a839bae3e224f22bbe17 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_calledRepeatedly, 22, const_tuple_str_plain_l_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE ); 103     codeobj_c65ba0a445c5a839bae3e224f22bbe17 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_calledRepeatedly, 22, const_tuple_str_plain_l_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
118 } 104 }
119 105
120 // The module function declarations. 106 // The module function declarations.
n 121 NUITKA_LOCAL_MODULE PyObject *impl___main__$$$function_1_calledRepeatedly$$$function_1_listcontraction( PyObject **python_pars ); n
122  
123  
124 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ); 107 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  );
125 108
126 109
127 // The module function definitions. 110 // The module function definitions.
128 static PyObject *impl___main__$$$function_1_calledRepeatedly( struct Nuitka_FunctionObject const *self, PyObject **python_pars ) 111 static PyObject *impl___main__$$$function_1_calledRepeatedly( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
131 #ifndef __NUITKA_NO_ASSERT__ 114 #ifndef __NUITKA_NO_ASSERT__
132     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 115     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
133 #endif 116 #endif
134 117
135     // Local variable declarations. 118     // Local variable declarations.
n 136     PyObject *var_l = NULL; n
137     PyObject *exception_type = NULL, *exception_value = NULL; 119     PyObject *exception_type = NULL, *exception_value = NULL;
138     PyTracebackObject *exception_tb = NULL; 120     PyTracebackObject *exception_tb = NULL;
139     NUITKA_MAY_BE_UNUSED int exception_lineno = -1; 121     NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
140     PyObject *exception_keeper_type_1; 122     PyObject *exception_keeper_type_1;
141     PyObject *exception_keeper_value_1; 123     PyObject *exception_keeper_value_1;
142     PyTracebackObject *exception_keeper_tb_1; 124     PyTracebackObject *exception_keeper_tb_1;
143     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; 125     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
n 144     PyObject *tmp_assign_source_1; n
145     PyObject *tmp_dircall_arg1_1;
146     PyObject *tmp_iter_arg_1;
147     PyObject *tmp_return_value; 126     PyObject *tmp_return_value;
148     PyObject *tmp_tuple_element_1; 127     PyObject *tmp_tuple_element_1;
149     NUITKA_MAY_BE_UNUSED PyObject *tmp_unused; 128     NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
150     static struct Nuitka_FrameObject *cache_frame_function = NULL; 129     static struct Nuitka_FrameObject *cache_frame_function = NULL;
151 130
154     char const *type_description; 133     char const *type_description;
155     tmp_return_value = NULL; 134     tmp_return_value = NULL;
156 135
157     // Actual function code. 136     // Actual function code.
158     // Tried code: 137     // Tried code:
n 159     MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_c65ba0a445c5a839bae3e224f22bbe17, module___main__, sizeof(PyObject *) ); n 138     MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_c65ba0a445c5a839bae3e224f22bbe17, module___main__, sizeof(void *) );
160     frame_function = cache_frame_function; 139     frame_function = cache_frame_function;
161 140
162     // Push the new frame as the currently active one. 141     // Push the new frame as the currently active one.
163     pushFrameStack( frame_function ); 142     pushFrameStack( frame_function );
164 143
182         exception_tb = NULL; 161         exception_tb = NULL;
183         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 162         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
184         CHAIN_EXCEPTION( exception_value ); 163         CHAIN_EXCEPTION( exception_value );
185 164
186         exception_lineno = 24; 165         exception_lineno = 24;
n 187         type_description = "o"; n 166         type_description = "N";
188         goto frame_exception_exit_1; 167         goto frame_exception_exit_1;
189     } 168     }
190 169
n 191     tmp_iter_arg_1 = const_xrange_0_7; n
192     tmp_dircall_arg1_1 = MAKE_ITERATOR( tmp_iter_arg_1 );
193     assert( tmp_dircall_arg1_1 != NULL );
194  
195     {
196         PyObject *dir_call_args[] = {tmp_dircall_arg1_1};
197         tmp_assign_source_1 = impl___main__$$$function_1_calledRepeatedly$$$function_1_listcontraction( dir_call_args );
198     }
199     if ( tmp_assign_source_1 == NULL )
200     {
201         assert( ERROR_OCCURRED() );
202  
203         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
204  
205  
206         exception_lineno = 28;
207         type_description = "o";
208         goto frame_exception_exit_1;
209     }
210     assert( var_l == NULL );
211     var_l = tmp_assign_source_1;
212  
213     tmp_return_value = PyTuple_New( 2 ); 170     tmp_return_value = PyTuple_New( 2 );
n 214     tmp_tuple_element_1 = var_l; n 171     tmp_tuple_element_1 = const_int_pos_1;
215  
216     Py_INCREF( tmp_tuple_element_1 ); 172     Py_INCREF( tmp_tuple_element_1 );
217     PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 ); 173     PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
218     tmp_tuple_element_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_x ); 174     tmp_tuple_element_1 = GET_STRING_DICT_VALUE( moduledict___main__, (Nuitka_StringObject *)const_str_plain_x );
219 175
220     if (unlikely( tmp_tuple_element_1 == NULL )) 176     if (unlikely( tmp_tuple_element_1 == NULL ))
231         exception_tb = NULL; 187         exception_tb = NULL;
232         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 188         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
233         CHAIN_EXCEPTION( exception_value ); 189         CHAIN_EXCEPTION( exception_value );
234 190
235         exception_lineno = 36; 191         exception_lineno = 36;
n 236         type_description = "o"; n 192         type_description = "N";
237         goto frame_exception_exit_1; 193         goto frame_exception_exit_1;
238     } 194     }
239 195
240     Py_INCREF( tmp_tuple_element_1 ); 196     Py_INCREF( tmp_tuple_element_1 );
241     PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 ); 197     PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
256 #endif 212 #endif
257 213
258     // Put the previous frame back on top. 214     // Put the previous frame back on top.
259     popFrameStack(); 215     popFrameStack();
260 216
n 261     goto try_return_handler_1; n 217     goto function_return_exit;
262 218
263     frame_exception_exit_1:; 219     frame_exception_exit_1:;
264 220
265 #if 0 221 #if 0
266     RESTORE_FRAME_EXCEPTION( frame_function ); 222     RESTORE_FRAME_EXCEPTION( frame_function );
273     else if ( exception_tb->tb_frame != &frame_function->m_frame ) 229     else if ( exception_tb->tb_frame != &frame_function->m_frame )
274     { 230     {
275         exception_tb = ADD_TRACEBACK( exception_tb, frame_function, exception_lineno ); 231         exception_tb = ADD_TRACEBACK( exception_tb, frame_function, exception_lineno );
276     } 232     }
277 233
n 278     Nuitka_Frame_AttachLocals( (struct Nuitka_FrameObject *)frame_function, type_description ,var_l ); n 234     Nuitka_Frame_AttachLocals( (struct Nuitka_FrameObject *)frame_function, type_description ,NULL );
279 235
280     // Release cached frame. 236     // Release cached frame.
281     if ( frame_function == cache_frame_function ) 237     if ( frame_function == cache_frame_function )
282     { 238     {
283         Py_DECREF( frame_function ); 239         Py_DECREF( frame_function );
296     frame_no_exception_1:; 252     frame_no_exception_1:;
297 253
298     // tried codes exits in all cases 254     // tried codes exits in all cases
299     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly ); 255     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
300     return NULL; 256     return NULL;
n 301     // Return handler code: n
302     try_return_handler_1:;
303     CHECK_OBJECT( (PyObject *)var_l );
304     Py_DECREF( var_l );
305     var_l = NULL;
306  
307     goto function_return_exit;
308     // Exception handler code: 257     // Exception handler code:
309     try_except_handler_1:; 258     try_except_handler_1:;
310     exception_keeper_type_1 = exception_type; 259     exception_keeper_type_1 = exception_type;
311     exception_keeper_value_1 = exception_value; 260     exception_keeper_value_1 = exception_value;
312     exception_keeper_tb_1 = exception_tb; 261     exception_keeper_tb_1 = exception_tb;
314     exception_type = NULL; 263     exception_type = NULL;
315     exception_value = NULL; 264     exception_value = NULL;
316     exception_tb = NULL; 265     exception_tb = NULL;
317     exception_lineno = -1; 266     exception_lineno = -1;
318 267
n 319     Py_XDECREF( var_l ); n
320     var_l = NULL;
321  
322     // Re-raise. 268     // Re-raise.
323     exception_type = exception_keeper_type_1; 269     exception_type = exception_keeper_type_1;
324     exception_value = exception_keeper_value_1; 270     exception_value = exception_keeper_value_1;
325     exception_tb = exception_keeper_tb_1; 271     exception_tb = exception_keeper_tb_1;
326     exception_lineno = exception_keeper_lineno_1; 272     exception_lineno = exception_keeper_lineno_1;
328     goto function_exception_exit; 274     goto function_exception_exit;
329     // End of try: 275     // End of try:
330 276
331     // Return statement must have exited already. 277     // Return statement must have exited already.
332     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly ); 278     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
t 333     return NULL; t
334  
335 function_exception_exit:
336     assert( exception_type );
337     RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
338  
339     return NULL;
340     function_return_exit:
341  
342     CHECK_OBJECT( tmp_return_value );
343     assert( had_error || !ERROR_OCCURRED() );
344     return tmp_return_value;
345  
346 }
347  
348  
349 NUITKA_LOCAL_MODULE PyObject *impl___main__$$$function_1_calledRepeatedly$$$function_1_listcontraction( PyObject **python_pars )
350 {
351 #ifndef __NUITKA_NO_ASSERT__
352     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
353     assert(!had_error); // Do not enter inlined functions with error set.
354 #endif
355  
356     // Local variable declarations.
357     PyObject *par_$0 = python_pars[ 0 ];
358     PyObject *var_x = NULL;
359     PyObject *tmp_contraction_result = NULL;
360     PyObject *tmp_iter_value_0 = NULL;
361     PyObject *exception_type = NULL, *exception_value = NULL;
362     PyTracebackObject *exception_tb = NULL;
363     NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
364     PyObject *exception_keeper_type_1;
365     PyObject *exception_keeper_value_1;
366     PyTracebackObject *exception_keeper_tb_1;
367     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
368     PyObject *exception_keeper_type_2;
369     PyObject *exception_keeper_value_2;
370     PyTracebackObject *exception_keeper_tb_2;
371     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
372     PyObject *tmp_append_list_1;
373     PyObject *tmp_append_value_1;
374     PyObject *tmp_assign_source_1;
375     PyObject *tmp_assign_source_2;
376     PyObject *tmp_assign_source_3;
377     PyObject *tmp_next_source_1;
378     int tmp_res;
379     PyObject *tmp_return_value;
380     static struct Nuitka_FrameObject *cache_frame_function = NULL;
381  
382     struct Nuitka_FrameObject *frame_function;
383  
384     char const *type_description;
385     tmp_return_value = NULL;
386  
387     // Actual function code.
388     tmp_assign_source_1 = PyList_New( 0 );
389     assert( tmp_contraction_result == NULL );
390     tmp_contraction_result = tmp_assign_source_1;
391  
392     // Tried code:
393     MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_86a25cec390a8797d03de54a5a1963e5, module___main__, sizeof(PyObject *)+sizeof(PyObject *) );
394     frame_function = cache_frame_function;
395  
396     // Push the new frame as the currently active one.
397     pushFrameStack( frame_function );
398  
399     // Mark the frame object as in use, ref count 1 will be up for reuse.
400     assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
401  
402     // Framed code:
403     // Tried code:
404     loop_start_1:;
405     tmp_next_source_1 = par_$0;
406  
407     tmp_assign_source_2 = ITERATOR_NEXT( tmp_next_source_1 );
408     if ( tmp_assign_source_2 == NULL )
409     {
410         if ( CHECK_AND_CLEAR_STOP_ITERATION_OCCURRED() )
411         {
412  
413             goto loop_end_1;
414         }
415         else
416         {
417  
418             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
419             type_description = "oo";
420             frame_function->m_frame.f_lineno = 28;
421             goto try_except_handler_2;
422         }
423     }
424  
425     {
426         PyObject *old = tmp_iter_value_0;
427         tmp_iter_value_0 = tmp_assign_source_2;
428         Py_XDECREF( old );
429     }
430  
431     tmp_assign_source_3 = tmp_iter_value_0;
432  
433     {
434         PyObject *old = var_x;
435         var_x = tmp_assign_source_3;
436         Py_INCREF( var_x );
437         Py_XDECREF( old );
438     }
439  
440     tmp_append_list_1 = tmp_contraction_result;
441  
442     tmp_append_value_1 = var_x;
443  
444     assert( PyList_Check( tmp_append_list_1 ) );
445     tmp_res = PyList_Append( tmp_append_list_1, tmp_append_value_1 );
446     if ( tmp_res == -1 )
447     {
448         assert( ERROR_OCCURRED() );
449  
450         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
451  
452  
453         exception_lineno = 28;
454         type_description = "oo";
455         goto try_except_handler_2;
456     }
457     if ( CONSIDER_THREADING() == false )
458     {
459         assert( ERROR_OCCURRED() );
460  
461         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
462  
463  
464         exception_lineno = 28;
465         type_description = "oo";
466         goto try_except_handler_2;
467     }
468     goto loop_start_1;
469     loop_end_1:;
470     tmp_return_value = tmp_contraction_result;
471  
472     Py_INCREF( tmp_return_value );
473     goto try_return_handler_2;
474     // tried codes exits in all cases
475     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly$$$function_1_listcontraction );
476     return NULL;
477     // Return handler code:
478     try_return_handler_2:;
479     Py_XDECREF( tmp_contraction_result );
480     tmp_contraction_result = NULL;
481  
482     Py_XDECREF( tmp_iter_value_0 );
483     tmp_iter_value_0 = NULL;
484  
485     goto frame_return_exit_1;
486     // Exception handler code:
487     try_except_handler_2:;
488     exception_keeper_type_1 = exception_type;
489     exception_keeper_value_1 = exception_value;
490     exception_keeper_tb_1 = exception_tb;
491     exception_keeper_lineno_1 = exception_lineno;
492     exception_type = NULL;
493     exception_value = NULL;
494     exception_tb = NULL;
495     exception_lineno = -1;
496  
497     Py_XDECREF( tmp_contraction_result );
498     tmp_contraction_result = NULL;
499  
500     Py_XDECREF( tmp_iter_value_0 );
501     tmp_iter_value_0 = NULL;
502  
503     // Re-raise.
504     exception_type = exception_keeper_type_1;
505     exception_value = exception_keeper_value_1;
506     exception_tb = exception_keeper_tb_1;
507     exception_lineno = exception_keeper_lineno_1;
508  
509     goto frame_exception_exit_1;
510     // End of try:
511  
512 #if 0
513     RESTORE_FRAME_EXCEPTION( frame_function );
514 #endif
515  
516     // Put the previous frame back on top.
517     popFrameStack();
518  
519     goto frame_no_exception_1;
520  
521     frame_return_exit_1:;
522 #if 0
523     RESTORE_FRAME_EXCEPTION( frame_function );
524 #endif
525  
526     // Put the previous frame back on top.
527     popFrameStack();
528  
529     goto try_return_handler_1;
530  
531     frame_exception_exit_1:;
532  
533 #if 0
534     RESTORE_FRAME_EXCEPTION( frame_function );
535 #endif
536  
537     if ( exception_tb == NULL )
538     {
539         exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
540     }
541     else if ( exception_tb->tb_frame != &frame_function->m_frame )
542     {
543         exception_tb = ADD_TRACEBACK( exception_tb, frame_function, exception_lineno );
544     }
545  
546     Nuitka_Frame_AttachLocals( (struct Nuitka_FrameObject *)frame_function, type_description ,par_$0, var_x );
547  
548     // Release cached frame.
549     if ( frame_function == cache_frame_function )
550     {
551         Py_DECREF( frame_function );
552     }
553     cache_frame_function = NULL;
554  
555     assertFrameObject( frame_function );
556  
557  
558     // Put the previous frame back on top.
559     popFrameStack();
560  
561     // Return the error.
562     goto try_except_handler_1;
563  
564     frame_no_exception_1:;
565  
566     // tried codes exits in all cases
567     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly$$$function_1_listcontraction );
568     return NULL;
569     // Return handler code:
570     try_return_handler_1:;
571     Py_XDECREF( par_$0 );
572     par_$0 = NULL;
573  
574     Py_XDECREF( var_x );
575     var_x = NULL;
576  
577     goto function_return_exit;
578     // Exception handler code:
579     try_except_handler_1:;
580     exception_keeper_type_2 = exception_type;
581     exception_keeper_value_2 = exception_value;
582     exception_keeper_tb_2 = exception_tb;
583     exception_keeper_lineno_2 = exception_lineno;
584     exception_type = NULL;
585     exception_value = NULL;
586     exception_tb = NULL;
587     exception_lineno = -1;
588  
589     Py_XDECREF( par_$0 );
590     par_$0 = NULL;
591  
592     Py_XDECREF( var_x );
593     var_x = NULL;
594  
595     // Re-raise.
596     exception_type = exception_keeper_type_2;
597     exception_value = exception_keeper_value_2;
598     exception_tb = exception_keeper_tb_2;
599     exception_lineno = exception_keeper_lineno_2;
600  
601     goto function_exception_exit;
602     // End of try:
603  
604     // Return statement must have exited already.
605     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly$$$function_1_listcontraction );
606     return NULL; 279     return NULL;
607 280
608 function_exception_exit: 281 function_exception_exit:
609     assert( exception_type ); 282     assert( exception_type );
610     RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb ); 283     RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );