Construct ListContraction

Performance Diagrams

Construct ListContraction 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)18096937988.11538461538461257.0CPython 2.780781987240.03846153846155393.80682358805194Nuitka (master)80782216391.96153846153845393.80651088640377Nuitka (develop)80782174543.8846153846154393.80656823779776Nuitka (factory)Construct ListContractionTicks Construct ListContraction 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000200000000200000000220000000220000000240000000240000000260000000260000000280000000280000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)28862821888.11538461538461257.0CPython 3.5101801666240.03846153846155416.9556535870175Nuitka (master)101806396391.96153846153845416.95160389368766Nuitka (develop)101806417543.8846153846154416.95158591407665Nuitka (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

import itertools
for x in itertools.repeat(None, 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

import itertools
for x in itertools.repeat(None, 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 import itertools 38 import itertools
39 for x in itertools.repeat(None, 50000): 39 for x in itertools.repeat(None, 50000):

Context Diff of Generated Code


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