Construct FunctionCreationClosure

Performance Diagrams

Construct FunctionCreationClosure 001000000010000000200000002000000030000000300000004000000040000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)4496650088.95192307692307257.0CPython 2.712602274242.31730769230768434.8590318519171Nuitka (master)12603674395.6826923076923434.8513380901509Nuitka (develop)12603644549.0480769230769434.85150295647446Nuitka (factory)Construct FunctionCreationClosureTicks Construct FunctionCreationClosure 0010000000100000002000000020000000300000003000000040000000400000005000000050000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)5639230188.95192307692307257.0CPython 3.515853030242.31730769230768434.6461922557888Nuitka (master)15844526395.6826923076923434.68345743549423Nuitka (develop)15843907549.0480769230769434.6861699409314Nuitka (factory)Construct FunctionCreationClosureTicks

Source Code with Construct

module_var = None

def calledRepeatedly():
    # We measure making a local function that will remain unused.
    closure_var = module_var

# construct_begin
    def empty():
        return closure_var

# construct_alternative



    return empty, closure_var


import itertools
for x in itertools.repeat(None, 50000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

module_var = None

def calledRepeatedly():
    # We measure making a local function that will remain unused.
    closure_var = module_var

# construct_begin



# construct_alternative
    empty = 1
# construct_end

    return empty, closure_var


import itertools
for x in itertools.repeat(None, 50000):
    calledRepeatedly()

print("OK.")

Context Diff of Source Code


Construct
Baseline
23 def calledRepeatedly(): 23 def calledRepeatedly():
24     # We measure making a local function that will remain unused. 24     # We measure making a local function that will remain unused.
25     closure_var = module_var 25     closure_var = module_var
26 26
27 # construct_begin 27 # construct_begin
n 28     def empty(): n 28  
29         return closure_var 29  
30 30
31 # construct_alternative 31 # construct_alternative
t 32   t 32     empty = 1
33   33 # construct_end
34 34
35     return empty, closure_var 35     return empty, closure_var
36 36
37 37
38 import itertools 38 import itertools

Context Diff of Generated Code


Construct
Baseline
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_str_plain___package__; 35 static PyObject *const_str_plain___package__;
36 static PyObject *const_str_plain___spec__; 36 static PyObject *const_str_plain___spec__;
37 static PyObject *const_str_digest_c407088a203a520c45daf6c3a291f89e; 37 static PyObject *const_str_digest_c407088a203a520c45daf6c3a291f89e;
n 38 static PyObject *const_tuple_str_plain_closure_var_tuple; n
39 static PyObject *const_str_plain_module_var; 38 static PyObject *const_str_plain_module_var;
n n 39 extern PyObject *const_int_pos_1;
40 extern PyObject *const_dict_empty; 40 extern PyObject *const_dict_empty;
41 extern PyObject *const_str_plain___file__; 41 extern PyObject *const_str_plain___file__;
42 static PyObject *const_str_plain_closure_var; 42 static PyObject *const_str_plain_closure_var;
43 extern PyObject *const_int_0; 43 extern PyObject *const_int_0;
44 static PyObject *const_tuple_str_plain_closure_var_str_plain_empty_tuple; 44 static PyObject *const_tuple_str_plain_closure_var_str_plain_empty_tuple;
45 static PyObject *const_str_plain_empty; 45 static PyObject *const_str_plain_empty;
46 extern PyObject *const_str_plain_print; 46 extern PyObject *const_str_plain_print;
n 47 static PyObject *const_str_digest_30e4724e0d508bc0c811d26a46d4b6cd; n
48 static PyObject *const_int_pos_50000; 47 static PyObject *const_int_pos_50000;
49 static PyObject *const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple; 48 static PyObject *const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple;
50 static PyObject *const_str_plain_calledRepeatedly; 49 static PyObject *const_str_plain_calledRepeatedly;
51 static PyObject *const_str_angle_module; 50 static PyObject *const_str_angle_module;
52 static PyObject *const_str_plain_x; 51 static PyObject *const_str_plain_x;
66 { 65 {
67     const_str_plain_itertools = UNSTREAM_STRING( &constant_bin[ 0 ], 9, 1 ); 66     const_str_plain_itertools = UNSTREAM_STRING( &constant_bin[ 0 ], 9, 1 );
68     const_str_plain___package__ = UNSTREAM_STRING( &constant_bin[ 9 ], 11, 1 ); 67     const_str_plain___package__ = UNSTREAM_STRING( &constant_bin[ 9 ], 11, 1 );
69     const_str_plain___spec__ = UNSTREAM_STRING( &constant_bin[ 20 ], 8, 1 ); 68     const_str_plain___spec__ = UNSTREAM_STRING( &constant_bin[ 20 ], 8, 1 );
70     const_str_digest_c407088a203a520c45daf6c3a291f89e = UNSTREAM_STRING( &constant_bin[ 28 ], 81, 0 ); 69     const_str_digest_c407088a203a520c45daf6c3a291f89e = UNSTREAM_STRING( &constant_bin[ 28 ], 81, 0 );
n 71     const_tuple_str_plain_closure_var_tuple = PyTuple_New( 1 ); n 70     const_str_plain_module_var = UNSTREAM_STRING( &constant_bin[ 109 ], 10, 1 );
72     const_str_plain_closure_var = UNSTREAM_STRING( &constant_bin[ 109 ], 11, 1 ); 71     const_str_plain_closure_var = UNSTREAM_STRING( &constant_bin[ 119 ], 11, 1 );
73     PyTuple_SET_ITEM( const_tuple_str_plain_closure_var_tuple, 0, const_str_plain_closure_var ); Py_INCREF( const_str_plain_closure_var );
74     const_str_plain_module_var = UNSTREAM_STRING( &constant_bin[ 120 ], 10, 1 );
75     const_tuple_str_plain_closure_var_str_plain_empty_tuple = PyTuple_New( 2 ); 72     const_tuple_str_plain_closure_var_str_plain_empty_tuple = PyTuple_New( 2 );
76     PyTuple_SET_ITEM( const_tuple_str_plain_closure_var_str_plain_empty_tuple, 0, const_str_plain_closure_var ); Py_INCREF( const_str_plain_closure_var ); 73     PyTuple_SET_ITEM( const_tuple_str_plain_closure_var_str_plain_empty_tuple, 0, const_str_plain_closure_var ); Py_INCREF( const_str_plain_closure_var );
77     const_str_plain_empty = UNSTREAM_STRING( &constant_bin[ 130 ], 5, 1 ); 74     const_str_plain_empty = UNSTREAM_STRING( &constant_bin[ 130 ], 5, 1 );
78     PyTuple_SET_ITEM( const_tuple_str_plain_closure_var_str_plain_empty_tuple, 1, const_str_plain_empty ); Py_INCREF( const_str_plain_empty ); 75     PyTuple_SET_ITEM( const_tuple_str_plain_closure_var_str_plain_empty_tuple, 1, const_str_plain_empty ); Py_INCREF( const_str_plain_empty );
n 79     const_str_digest_30e4724e0d508bc0c811d26a46d4b6cd = UNSTREAM_STRING( &constant_bin[ 135 ], 31, 0 ); n
80     const_int_pos_50000 = PyLong_FromUnsignedLong( 50000ul ); 76     const_int_pos_50000 = PyLong_FromUnsignedLong( 50000ul );
81     const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple = PyTuple_New( 1 ); 77     const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple = PyTuple_New( 1 );
n 82     const_str_digest_5ed1392909ad16e6227b8230f4582352 = UNSTREAM_STRING( &constant_bin[ 166 ], 3, 0 ); n 78     const_str_digest_5ed1392909ad16e6227b8230f4582352 = UNSTREAM_STRING( &constant_bin[ 135 ], 3, 0 );
83     PyTuple_SET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0, const_str_digest_5ed1392909ad16e6227b8230f4582352 ); Py_INCREF( const_str_digest_5ed1392909ad16e6227b8230f4582352 ); 79     PyTuple_SET_ITEM( const_tuple_str_digest_5ed1392909ad16e6227b8230f4582352_tuple, 0, const_str_digest_5ed1392909ad16e6227b8230f4582352 ); Py_INCREF( const_str_digest_5ed1392909ad16e6227b8230f4582352 );
n 84     const_str_plain_calledRepeatedly = UNSTREAM_STRING( &constant_bin[ 135 ], 16, 1 ); n 80     const_str_plain_calledRepeatedly = UNSTREAM_STRING( &constant_bin[ 138 ], 16, 1 );
85     const_str_angle_module = UNSTREAM_STRING( &constant_bin[ 169 ], 8, 0 ); 81     const_str_angle_module = UNSTREAM_STRING( &constant_bin[ 154 ], 8, 0 );
86     const_str_plain_x = UNSTREAM_STRING( &constant_bin[ 53 ], 1, 1 ); 82     const_str_plain_x = UNSTREAM_STRING( &constant_bin[ 53 ], 1, 1 );
n 87     const_str_plain_repeat = UNSTREAM_STRING( &constant_bin[ 177 ], 6, 1 ); n 83     const_str_plain_repeat = UNSTREAM_STRING( &constant_bin[ 162 ], 6, 1 );
88     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 ); 84     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 );
89     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 0, Py_None ); Py_INCREF( Py_None ); 85     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 0, Py_None ); Py_INCREF( Py_None );
90     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 ); 86     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 );
91 87
92     constants_created = true; 88     constants_created = true;
103 #endif 99 #endif
104 100
105 // The module code objects. 101 // The module code objects.
106 static PyCodeObject *codeobj_57c74261b3c506d78f1da709386d6ef3; 102 static PyCodeObject *codeobj_57c74261b3c506d78f1da709386d6ef3;
107 static PyCodeObject *codeobj_45dd567781e2c325783e6bd71d4a68c6; 103 static PyCodeObject *codeobj_45dd567781e2c325783e6bd71d4a68c6;
n 108 static PyCodeObject *codeobj_d76161a749de9e4c4e3842393c07dd85; n
109 /* For use in "MainProgram.c". */ 104 /* For use in "MainProgram.c". */
110 PyCodeObject *codeobj_main = NULL; 105 PyCodeObject *codeobj_main = NULL;
111 106
112 static void createModuleCodeObjects(void) 107 static void createModuleCodeObjects(void)
113 { 108 {
114     module_filename_obj = const_str_digest_c407088a203a520c45daf6c3a291f89e; 109     module_filename_obj = const_str_digest_c407088a203a520c45daf6c3a291f89e;
115     codeobj_57c74261b3c506d78f1da709386d6ef3 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE ); 110     codeobj_57c74261b3c506d78f1da709386d6ef3 = MAKE_CODEOBJ( module_filename_obj, const_str_angle_module, 1, const_tuple_empty, 0, 0, CO_NOFREE );
116     codeobj_main = codeobj_57c74261b3c506d78f1da709386d6ef3; 111     codeobj_main = codeobj_57c74261b3c506d78f1da709386d6ef3;
117     codeobj_45dd567781e2c325783e6bd71d4a68c6 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_calledRepeatedly, 23, const_tuple_str_plain_closure_var_str_plain_empty_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE ); 112     codeobj_45dd567781e2c325783e6bd71d4a68c6 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_calledRepeatedly, 23, const_tuple_str_plain_closure_var_str_plain_empty_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
n 118     codeobj_d76161a749de9e4c4e3842393c07dd85 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_empty, 28, const_tuple_str_plain_closure_var_tuple, 0, 0, CO_OPTIMIZED | CO_NEWLOCALS ); n
119 } 113 }
120 114
121 // The module function declarations. 115 // The module function declarations.
122 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ); 116 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  );
n 123   n
124  
125 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty( struct Nuitka_CellObject *closure_closure_var );
126 117
127 118
128 // The module function definitions. 119 // The module function definitions.
129 static PyObject *impl___main__$$$function_1_calledRepeatedly( struct Nuitka_FunctionObject const *self, PyObject **python_pars ) 120 static PyObject *impl___main__$$$function_1_calledRepeatedly( struct Nuitka_FunctionObject const *self, PyObject **python_pars )
130 { 121 {
132 #ifndef __NUITKA_NO_ASSERT__ 123 #ifndef __NUITKA_NO_ASSERT__
133     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 124     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
134 #endif 125 #endif
135 126
136     // Local variable declarations. 127     // Local variable declarations.
n 137     struct Nuitka_CellObject *var_closure_var = PyCell_EMPTY(); n
138     PyObject *var_empty = NULL; 128     PyObject *var_closure_var = NULL;
139     PyObject *exception_type = NULL; 129     PyObject *exception_type = NULL;
140     PyObject *exception_value = NULL; 130     PyObject *exception_value = NULL;
141     PyTracebackObject *exception_tb = NULL; 131     PyTracebackObject *exception_tb = NULL;
142     NUITKA_MAY_BE_UNUSED int exception_lineno = 0; 132     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
143     PyObject *exception_keeper_type_1; 133     PyObject *exception_keeper_type_1;
144     PyObject *exception_keeper_value_1; 134     PyObject *exception_keeper_value_1;
145     PyTracebackObject *exception_keeper_tb_1; 135     PyTracebackObject *exception_keeper_tb_1;
146     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; 136     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
147     PyObject *tmp_assign_source_1; 137     PyObject *tmp_assign_source_1;
n 148     PyObject *tmp_assign_source_2; n
149     PyObject *tmp_return_value; 138     PyObject *tmp_return_value;
150     PyObject *tmp_tuple_element_1; 139     PyObject *tmp_tuple_element_1;
151     static struct Nuitka_FrameObject *cache_frame_45dd567781e2c325783e6bd71d4a68c6 = NULL; 140     static struct Nuitka_FrameObject *cache_frame_45dd567781e2c325783e6bd71d4a68c6 = NULL;
152 141
153     struct Nuitka_FrameObject *frame_45dd567781e2c325783e6bd71d4a68c6; 142     struct Nuitka_FrameObject *frame_45dd567781e2c325783e6bd71d4a68c6;
155     char const *type_description; 144     char const *type_description;
156     tmp_return_value = NULL; 145     tmp_return_value = NULL;
157 146
158     // Actual function code. 147     // Actual function code.
159     // Tried code: 148     // Tried code:
n 160     MAKE_OR_REUSE_FRAME( cache_frame_45dd567781e2c325783e6bd71d4a68c6, codeobj_45dd567781e2c325783e6bd71d4a68c6, module___main__, sizeof(struct Nuitka_CellObject *)+sizeof(PyObject *) ); n 149     MAKE_OR_REUSE_FRAME( cache_frame_45dd567781e2c325783e6bd71d4a68c6, codeobj_45dd567781e2c325783e6bd71d4a68c6, module___main__, sizeof(void *)+sizeof(PyObject *) );
161     frame_45dd567781e2c325783e6bd71d4a68c6 = cache_frame_45dd567781e2c325783e6bd71d4a68c6; 150     frame_45dd567781e2c325783e6bd71d4a68c6 = cache_frame_45dd567781e2c325783e6bd71d4a68c6;
162 151
163     // Push the new frame as the currently active one. 152     // Push the new frame as the currently active one.
164     pushFrameStack( frame_45dd567781e2c325783e6bd71d4a68c6 ); 153     pushFrameStack( frame_45dd567781e2c325783e6bd71d4a68c6 );
165 154
183         exception_tb = NULL; 172         exception_tb = NULL;
184         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 173         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
185         CHAIN_EXCEPTION( exception_value ); 174         CHAIN_EXCEPTION( exception_value );
186 175
187         exception_lineno = 25; 176         exception_lineno = 25;
n 188         type_description = "co"; n 177         type_description = "oN";
189         goto frame_exception_exit_1; 178         goto frame_exception_exit_1;
190     } 179     }
191 180
n 192     { n 181     assert( var_closure_var == NULL );
193         PyObject *old = PyCell_GET( var_closure_var );
194         PyCell_SET( var_closure_var, tmp_assign_source_1 );
195         Py_INCREF( tmp_assign_source_1 ); 182     Py_INCREF( tmp_assign_source_1 );
196         Py_XDECREF( old ); 183     var_closure_var = tmp_assign_source_1;
197     }
198 184
199 185
200 #if 0 186 #if 0
201     RESTORE_FRAME_EXCEPTION( frame_45dd567781e2c325783e6bd71d4a68c6 ); 187     RESTORE_FRAME_EXCEPTION( frame_45dd567781e2c325783e6bd71d4a68c6 );
202 #endif 188 #endif
219     else if ( exception_tb->tb_frame != &frame_45dd567781e2c325783e6bd71d4a68c6->m_frame ) 205     else if ( exception_tb->tb_frame != &frame_45dd567781e2c325783e6bd71d4a68c6->m_frame )
220     { 206     {
221         exception_tb = ADD_TRACEBACK( exception_tb, frame_45dd567781e2c325783e6bd71d4a68c6, exception_lineno ); 207         exception_tb = ADD_TRACEBACK( exception_tb, frame_45dd567781e2c325783e6bd71d4a68c6, exception_lineno );
222     } 208     }
223 209
n 224     Nuitka_Frame_AttachLocals( (struct Nuitka_FrameObject *)frame_45dd567781e2c325783e6bd71d4a68c6, type_description ,var_closure_var, var_empty ); n 210     Nuitka_Frame_AttachLocals( (struct Nuitka_FrameObject *)frame_45dd567781e2c325783e6bd71d4a68c6, type_description ,var_closure_var, NULL );
225 211
226     // Release cached frame. 212     // Release cached frame.
227     if ( frame_45dd567781e2c325783e6bd71d4a68c6 == cache_frame_45dd567781e2c325783e6bd71d4a68c6 ) 213     if ( frame_45dd567781e2c325783e6bd71d4a68c6 == cache_frame_45dd567781e2c325783e6bd71d4a68c6 )
228     { 214     {
229         Py_DECREF( frame_45dd567781e2c325783e6bd71d4a68c6 ); 215         Py_DECREF( frame_45dd567781e2c325783e6bd71d4a68c6 );
239     // Return the error. 225     // Return the error.
240     goto try_except_handler_1; 226     goto try_except_handler_1;
241 227
242     frame_no_exception_1:; 228     frame_no_exception_1:;
243 229
n 244     tmp_assign_source_2 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty( var_closure_var ); n
245     assert( var_empty == NULL );
246     var_empty = tmp_assign_source_2;
247  
248     tmp_return_value = PyTuple_New( 2 ); 230     tmp_return_value = PyTuple_New( 2 );
n 249     tmp_tuple_element_1 = var_empty; n 231     tmp_tuple_element_1 = const_int_pos_1;
250  
251     CHECK_OBJECT( tmp_tuple_element_1 );
252     Py_INCREF( tmp_tuple_element_1 ); 232     Py_INCREF( tmp_tuple_element_1 );
253     PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 ); 233     PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
n 254     if ( var_closure_var == NULL ) n
255     {
256         tmp_tuple_element_1 = NULL;
257     }
258     else
259     {
260         tmp_tuple_element_1 = PyCell_GET( var_closure_var ); 234     tmp_tuple_element_1 = var_closure_var;
261     }
262 235
n 263     if ( tmp_tuple_element_1 == NULL ) n 236     CHECK_OBJECT( tmp_tuple_element_1 );
264     {
265         Py_DECREF( tmp_return_value );
266         exception_type = PyExc_UnboundLocalError;
267         Py_INCREF( exception_type );
268         exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "closure_var" );
269         exception_tb = NULL;
270         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
271         CHAIN_EXCEPTION( exception_value );
272  
273  
274  
275         goto try_except_handler_1;
276     }
277  
278     Py_INCREF( tmp_tuple_element_1 ); 237     Py_INCREF( tmp_tuple_element_1 );
279     PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 ); 238     PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
280     goto try_return_handler_1; 239     goto try_return_handler_1;
281     // tried codes exits in all cases 240     // tried codes exits in all cases
282     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly ); 241     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
285     try_return_handler_1:; 244     try_return_handler_1:;
286     CHECK_OBJECT( (PyObject *)var_closure_var ); 245     CHECK_OBJECT( (PyObject *)var_closure_var );
287     Py_DECREF( var_closure_var ); 246     Py_DECREF( var_closure_var );
288     var_closure_var = NULL; 247     var_closure_var = NULL;
289 248
n 290     Py_XDECREF( var_empty ); n
291     var_empty = NULL;
292  
293     goto function_return_exit; 249     goto function_return_exit;
294     // Exception handler code: 250     // Exception handler code:
295     try_except_handler_1:; 251     try_except_handler_1:;
296     exception_keeper_type_1 = exception_type; 252     exception_keeper_type_1 = exception_type;
297     exception_keeper_value_1 = exception_value; 253     exception_keeper_value_1 = exception_value;
327     return tmp_return_value; 283     return tmp_return_value;
328 284
329 } 285 }
330 286
331 287
n 332 static PyObject *impl___main__$$$function_1_calledRepeatedly$$$function_1_empty( struct Nuitka_FunctionObject const *self, PyObject **python_pars ) n
333 {
334     // Preserve error status for checks
335 #ifndef __NUITKA_NO_ASSERT__
336     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
337 #endif
338  
339     // Local variable declarations.
340     PyObject *exception_type = NULL;
341     PyObject *exception_value = NULL;
342     PyTracebackObject *exception_tb = NULL;
343     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
344     PyObject *tmp_return_value;
345     static struct Nuitka_FrameObject *cache_frame_d76161a749de9e4c4e3842393c07dd85 = NULL;
346  
347     struct Nuitka_FrameObject *frame_d76161a749de9e4c4e3842393c07dd85;
348  
349     char const *type_description;
350     tmp_return_value = NULL;
351  
352     // Actual function code.
353     MAKE_OR_REUSE_FRAME( cache_frame_d76161a749de9e4c4e3842393c07dd85, codeobj_d76161a749de9e4c4e3842393c07dd85, module___main__, sizeof(struct Nuitka_CellObject *) );
354     frame_d76161a749de9e4c4e3842393c07dd85 = cache_frame_d76161a749de9e4c4e3842393c07dd85;
355  
356     // Push the new frame as the currently active one.
357     pushFrameStack( frame_d76161a749de9e4c4e3842393c07dd85 );
358  
359     // Mark the frame object as in use, ref count 1 will be up for reuse.
360     assert( Py_REFCNT( frame_d76161a749de9e4c4e3842393c07dd85 ) == 2 ); // Frame stack
361  
362     // Framed code:
363     if ( self->m_closure[0] == NULL )
364     {
365         tmp_return_value = NULL;
366     }
367     else
368     {
369         tmp_return_value = PyCell_GET( self->m_closure[0] );
370     }
371  
372     if ( tmp_return_value == NULL )
373     {
374  
375         exception_type = PyExc_NameError;
376         Py_INCREF( exception_type );
377         exception_value = PyUnicode_FromFormat( "free variable '%s' referenced before assignment in enclosing scope", "closure_var" );
378         exception_tb = NULL;
379         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
380         CHAIN_EXCEPTION( exception_value );
381  
382         exception_lineno = 29;
383         type_description = "c";
384         goto frame_exception_exit_1;
385     }
386  
387     Py_INCREF( tmp_return_value );
388     goto frame_return_exit_1;
389  
390 #if 0
391     RESTORE_FRAME_EXCEPTION( frame_d76161a749de9e4c4e3842393c07dd85 );
392 #endif
393  
394     // Put the previous frame back on top.
395     popFrameStack();
396  
397     goto frame_no_exception_1;
398  
399     frame_return_exit_1:;
400 #if 0
401     RESTORE_FRAME_EXCEPTION( frame_d76161a749de9e4c4e3842393c07dd85 );
402 #endif
403  
404     // Put the previous frame back on top.
405     popFrameStack();
406  
407     goto function_return_exit;
408  
409     frame_exception_exit_1:;
410  
411 #if 0
412     RESTORE_FRAME_EXCEPTION( frame_d76161a749de9e4c4e3842393c07dd85 );
413 #endif
414  
415     if ( exception_tb == NULL )
416     {
417         exception_tb = MAKE_TRACEBACK( frame_d76161a749de9e4c4e3842393c07dd85, exception_lineno );
418     }
419     else if ( exception_tb->tb_frame != &frame_d76161a749de9e4c4e3842393c07dd85->m_frame )
420     {
421         exception_tb = ADD_TRACEBACK( exception_tb, frame_d76161a749de9e4c4e3842393c07dd85, exception_lineno );
422     }
423  
424     Nuitka_Frame_AttachLocals( (struct Nuitka_FrameObject *)frame_d76161a749de9e4c4e3842393c07dd85, type_description ,self->m_closure[0] );
425  
426     // Release cached frame.
427     if ( frame_d76161a749de9e4c4e3842393c07dd85 == cache_frame_d76161a749de9e4c4e3842393c07dd85 )
428     {
429         Py_DECREF( frame_d76161a749de9e4c4e3842393c07dd85 );
430     }
431     cache_frame_d76161a749de9e4c4e3842393c07dd85 = NULL;
432  
433     assertFrameObject( frame_d76161a749de9e4c4e3842393c07dd85 );
434  
435  
436     // Put the previous frame back on top.
437     popFrameStack();
438  
439     // Return the error.
440     goto function_exception_exit;
441  
442     frame_no_exception_1:;
443  
444  
445     // Return statement must have exited already.
446     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly$$$function_1_empty );
447     return NULL;
448  
449 function_exception_exit:
450     assert( exception_type );
451     RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
452  
453     return NULL;
454     function_return_exit:
455  
456     CHECK_OBJECT( tmp_return_value );
457     assert( had_error || !ERROR_OCCURRED() );
458     return tmp_return_value;
459  
460 }
461  
462  
463 288
464 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  ) 289 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly(  )
465 { 290 {
466     struct Nuitka_FunctionObject *result = Nuitka_Function_New( 291     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
467         impl___main__$$$function_1_calledRepeatedly, 292         impl___main__$$$function_1_calledRepeatedly,
478         module___main__, 303         module___main__,
479         Py_None, 304         Py_None,
480         0 305         0
481     ); 306     );
482 307
t 483   t
484     return (PyObject *)result;
485 }
486  
487  
488  
489 static PyObject *MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_empty( struct Nuitka_CellObject *closure_closure_var )
490 {
491     struct Nuitka_FunctionObject *result = Nuitka_Function_New(
492         impl___main__$$$function_1_calledRepeatedly$$$function_1_empty,
493         const_str_plain_empty,
494 #if PYTHON_VERSION >= 330
495         const_str_digest_30e4724e0d508bc0c811d26a46d4b6cd,
496 #endif
497         codeobj_d76161a749de9e4c4e3842393c07dd85,
498         NULL,
499 #if PYTHON_VERSION >= 300
500         NULL,
501         const_dict_empty,
502 #endif
503         module___main__,
504         Py_None,
505         1
506     );
507  
508 result->m_closure[0] = closure_closure_var;
509 Py_INCREF( result->m_closure[0] );
510 308
511     return (PyObject *)result; 309     return (PyObject *)result;
512 } 310 }
513 311
514 312