Construct GeneratorExit

Performance Diagrams

Construct GeneratorExit 0040000000400000008000000080000000120000000120000000160000000160000000200000000200000000240000000240000000280000000280000000320000000320000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)34737831688.11538461538461257.0CPython 2.7163504068240.03846153846155387.8030853468258Nuitka (master)163504050391.96153846153845387.803098151531Nuitka (develop)163504074543.8846153846154387.8030810785907Nuitka (factory)Construct GeneratorExitTicks Construct GeneratorExit 0010000000100000002000000020000000300000003000000040000000400000005000000050000000600000006000000070000000700000008000000080000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)8307019888.95192307692307257.0CPython 3.566596992242.31730769230768306.0041282499226Nuitka (master)66602671395.6826923076923305.98723448653914Nuitka (develop)66603957549.0480769230769305.98340892223007Nuitka (factory)Construct GeneratorExitTicks

Source Code with Construct

def calledRepeatedly():
    # We measure making a generator iterator step or not.
    def generator():
        yield 1
        yield 2
        yield 3

    gen = generator()

    next(gen)

    # Take attribute lookup out of it, and built-in lookup too.
    throw = gen.throw
    exc = GeneratorExit

    try:
# construct_begin
        throw(exc)
# construct_alternative


    except exc:
        pass

    return throw, exc


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

print("OK.")

Source Code without Construct

def calledRepeatedly():
    # We measure making a generator iterator step or not.
    def generator():
        yield 1
        yield 2
        yield 3

    gen = generator()

    next(gen)

    # Take attribute lookup out of it, and built-in lookup too.
    throw = gen.throw
    exc = GeneratorExit

    try:
# construct_begin

# construct_alternative
        pass
# construct_end
    except exc:
        pass

    return throw, exc


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

print("OK.")

Context Diff of Source Code


Construct
Baseline
32     throw = gen.throw 32     throw = gen.throw
33     exc = GeneratorExit 33     exc = GeneratorExit
34 34
35     try: 35     try:
36 # construct_begin 36 # construct_begin
n 37         throw(exc) n 37  
38 # construct_alternative 38 # construct_alternative
t 39   t 39         pass
40   40 # construct_end
41     except exc: 41     except exc:
42         pass 42         pass
43 43
44     return throw, exc 44     return throw, exc
45 45

Context Diff of Generated Code


Construct
Baseline
54 static PyObject *const_str_plain_generator; 54 static PyObject *const_str_plain_generator;
55 static PyObject *const_str_plain_repeat; 55 static PyObject *const_str_plain_repeat;
56 static PyObject *const_int_pos_2; 56 static PyObject *const_int_pos_2;
57 static PyObject *const_tuple_none_int_pos_50000_tuple; 57 static PyObject *const_tuple_none_int_pos_50000_tuple;
58 extern PyObject *const_str_plain___main__; 58 extern PyObject *const_str_plain___main__;
n 59 static PyObject *const_tuple_type_GeneratorExit_tuple; n
60 extern PyObject *const_str_plain___doc__; 59 extern PyObject *const_str_plain___doc__;
61 extern PyObject *const_str_plain___cached__; 60 extern PyObject *const_str_plain___cached__;
62 static PyObject *module_filename_obj; 61 static PyObject *module_filename_obj;
63 62
64 static bool constants_created = false; 63 static bool constants_created = false;
88     const_str_plain_repeat = UNSTREAM_STRING_ASCII( &constant_bin[ 138 ], 6, 1 ); 87     const_str_plain_repeat = UNSTREAM_STRING_ASCII( &constant_bin[ 138 ], 6, 1 );
89     const_int_pos_2 = PyLong_FromUnsignedLong( 2ul ); 88     const_int_pos_2 = PyLong_FromUnsignedLong( 2ul );
90     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 ); 89     const_tuple_none_int_pos_50000_tuple = PyTuple_New( 2 );
91     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, 0, Py_None ); Py_INCREF( Py_None );
92     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 ); 91     PyTuple_SET_ITEM( const_tuple_none_int_pos_50000_tuple, 1, const_int_pos_50000 ); Py_INCREF( const_int_pos_50000 );
n 93     const_tuple_type_GeneratorExit_tuple = PyTuple_New( 1 ); n
94     PyTuple_SET_ITEM( const_tuple_type_GeneratorExit_tuple, 0, (PyObject *)PyExc_GeneratorExit ); Py_INCREF( (PyObject *)PyExc_GeneratorExit );
95 92
96     constants_created = true; 93     constants_created = true;
97 } 94 }
98 95
99 #ifndef __NUITKA_NO_ASSERT__ 96 #ifndef __NUITKA_NO_ASSERT__
140     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); 137     NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
141 #endif 138 #endif
142 139
143     // Local variable declarations. 140     // Local variable declarations.
144     PyObject *var_gen = NULL; 141     PyObject *var_gen = NULL;
n 145     PyObject *var_exc = NULL; n
146     PyObject *var_throw = NULL; 142     PyObject *var_throw = NULL;
147     PyObject *var_generator = NULL; 143     PyObject *var_generator = NULL;
148     struct Nuitka_FrameObject *frame_1fb222be1407851fb4076637e74ceee6; 144     struct Nuitka_FrameObject *frame_1fb222be1407851fb4076637e74ceee6;
149     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; 145     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
150     PyObject *exception_type = NULL; 146     PyObject *exception_type = NULL;
151     PyObject *exception_value = NULL; 147     PyObject *exception_value = NULL;
152     PyTracebackObject *exception_tb = NULL; 148     PyTracebackObject *exception_tb = NULL;
153     NUITKA_MAY_BE_UNUSED int exception_lineno = 0; 149     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
n n 150     static struct Nuitka_FrameObject *cache_frame_1fb222be1407851fb4076637e74ceee6 = NULL;
151     PyObject *tmp_return_value = NULL;
154     PyObject *exception_keeper_type_1; 152     PyObject *exception_keeper_type_1;
155     PyObject *exception_keeper_value_1; 153     PyObject *exception_keeper_value_1;
156     PyTracebackObject *exception_keeper_tb_1; 154     PyTracebackObject *exception_keeper_tb_1;
157     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; 155     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
n 158     PyObject *exception_preserved_type_1; n
159     PyObject *exception_preserved_value_1;
160     PyTracebackObject *exception_preserved_tb_1;
161     int tmp_res;
162     bool tmp_result;
163     PyObject *exception_keeper_type_2;
164     PyObject *exception_keeper_value_2;
165     PyTracebackObject *exception_keeper_tb_2;
166     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2;
167     PyObject *tmp_return_value = NULL;
168     static struct Nuitka_FrameObject *cache_frame_1fb222be1407851fb4076637e74ceee6 = NULL;
169     PyObject *exception_keeper_type_3;
170     PyObject *exception_keeper_value_3;
171     PyTracebackObject *exception_keeper_tb_3;
172     NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3;
173 156
174     // Actual function code. 157     // Actual function code.
175     { 158     {
176     PyObject *tmp_assign_source_1; 159     PyObject *tmp_assign_source_1;
177     tmp_assign_source_1 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_generator(  ); 160     tmp_assign_source_1 = MAKE_FUNCTION___main__$$$function_1_calledRepeatedly$$$function_1_generator(  );
207 190
208         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 191         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
209 192
210 193
211         exception_lineno = 27; 194         exception_lineno = 27;
n 212         type_description_1 = "oooo"; n 195         type_description_1 = "oNoo";
213         goto frame_exception_exit_1; 196         goto frame_exception_exit_1;
214     } 197     }
215     assert( var_gen == NULL ); 198     assert( var_gen == NULL );
216     var_gen = tmp_assign_source_2; 199     var_gen = tmp_assign_source_2;
217 200
235         { 218         {
236             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 219             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
237         } 220         }
238 221
239 222
n 240         type_description_1 = "oooo"; n 223         type_description_1 = "oNoo";
241         exception_lineno = 29; 224         exception_lineno = 29;
242         goto frame_exception_exit_1; 225         goto frame_exception_exit_1;
243     } 226     }
244     Py_DECREF( tmp_next_value_1 ); 227     Py_DECREF( tmp_next_value_1 );
245     } 228     }
255         exception_tb = NULL; 238         exception_tb = NULL;
256         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); 239         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
257         CHAIN_EXCEPTION( exception_value ); 240         CHAIN_EXCEPTION( exception_value );
258 241
259         exception_lineno = 32; 242         exception_lineno = 32;
n 260         type_description_1 = "oooo"; n 243         type_description_1 = "oNoo";
261         goto frame_exception_exit_1; 244         goto frame_exception_exit_1;
262     } 245     }
263 246
264     tmp_source_name_1 = var_gen; 247     tmp_source_name_1 = var_gen;
265     tmp_assign_source_3 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_throw ); 248     tmp_assign_source_3 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_throw );
269 252
270         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 253         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
271 254
272 255
273         exception_lineno = 32; 256         exception_lineno = 32;
n 274         type_description_1 = "oooo"; n 257         type_description_1 = "oNoo";
275         goto frame_exception_exit_1; 258         goto frame_exception_exit_1;
276     } 259     }
277     assert( var_throw == NULL ); 260     assert( var_throw == NULL );
278     var_throw = tmp_assign_source_3; 261     var_throw = tmp_assign_source_3;
279 262
280     } 263     }
n 281     { n
282     PyObject *tmp_assign_source_4;
283     tmp_assign_source_4 = PyExc_GeneratorExit;
284     assert( var_exc == NULL );
285     Py_INCREF( tmp_assign_source_4 );
286     var_exc = tmp_assign_source_4;
287 264
n n 265 #if 0
266     RESTORE_FRAME_EXCEPTION( frame_1fb222be1407851fb4076637e74ceee6 );
267 #endif
268  
269     // Put the previous frame back on top.
270     popFrameStack();
271  
272     goto frame_no_exception_1;
273  
274     frame_exception_exit_1:;
275  
276 #if 0
277     RESTORE_FRAME_EXCEPTION( frame_1fb222be1407851fb4076637e74ceee6 );
278 #endif
279  
280     if ( exception_tb == NULL )
288     } 281     {
282         exception_tb = MAKE_TRACEBACK( frame_1fb222be1407851fb4076637e74ceee6, exception_lineno );
289     { 283     }
290     // Tried code: 284     else if ( exception_tb->tb_frame != &frame_1fb222be1407851fb4076637e74ceee6->m_frame )
285     {
286         exception_tb = ADD_TRACEBACK( exception_tb, frame_1fb222be1407851fb4076637e74ceee6, exception_lineno );
291     { 287     }
288  
289     // Attachs locals to frame if any.
290     Nuitka_Frame_AttachLocals(
291         (struct Nuitka_FrameObject *)frame_1fb222be1407851fb4076637e74ceee6,
292         type_description_1,
293         var_gen,
294         NULL,
295         var_throw,
296         var_generator
297     );
298  
299  
300     // Release cached frame.
301     if ( frame_1fb222be1407851fb4076637e74ceee6 == cache_frame_1fb222be1407851fb4076637e74ceee6 )
302     {
303         Py_DECREF( frame_1fb222be1407851fb4076637e74ceee6 );
304     }
305     cache_frame_1fb222be1407851fb4076637e74ceee6 = NULL;
306  
307     assertFrameObject( frame_1fb222be1407851fb4076637e74ceee6 );
308  
309     // Put the previous frame back on top.
310     popFrameStack();
311  
312     // Return the error.
313     goto try_except_handler_1;
314  
315     frame_no_exception_1:;
316     {
292     PyObject *tmp_called_name_2; 317     PyObject *tmp_tuple_element_1;
293     PyObject *tmp_call_result_1;
294     CHECK_OBJECT( var_throw ); 318     CHECK_OBJECT( var_throw );
n 295     tmp_called_name_2 = var_throw; n 319     tmp_tuple_element_1 = var_throw;
296     frame_1fb222be1407851fb4076637e74ceee6->m_frame.f_lineno = 37; 320     tmp_return_value = PyTuple_New( 2 );
297     tmp_call_result_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, &PyTuple_GET_ITEM( const_tuple_type_GeneratorExit_tuple, 0 ) ); 321     Py_INCREF( tmp_tuple_element_1 );
298   322     PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
299     if ( tmp_call_result_1 == NULL ) 323     tmp_tuple_element_1 = PyExc_GeneratorExit;
324     Py_INCREF( tmp_tuple_element_1 );
325     PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
326     goto try_return_handler_1;
300     { 327     }
301         assert( ERROR_OCCURRED() ); 328     // tried codes exits in all cases
302   329     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
303         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 330     return NULL;
304   331     // Return handler code:
305   332     try_return_handler_1:;
306         exception_lineno = 37;
307         type_description_1 = "oooo";
308         goto try_except_handler_2;
309     } 333     {
310     Py_DECREF( tmp_call_result_1 ); 334     Py_XDECREF( var_gen );
335     var_gen = NULL;
336  
337     }
311     } 338     {
312     goto try_end_1; 339     Py_XDECREF( var_throw );
340     var_throw = NULL;
341  
342     }
343     {
344     Py_XDECREF( var_generator );
345     var_generator = NULL;
346  
347     }
348     {
349     goto function_return_exit;
350     }
313     // Exception handler code: 351     // Exception handler code:
n 314     try_except_handler_2:; n 352     try_except_handler_1:;
315     exception_keeper_type_1 = exception_type; 353     exception_keeper_type_1 = exception_type;
316     exception_keeper_value_1 = exception_value; 354     exception_keeper_value_1 = exception_value;
317     exception_keeper_tb_1 = exception_tb; 355     exception_keeper_tb_1 = exception_tb;
318     exception_keeper_lineno_1 = exception_lineno; 356     exception_keeper_lineno_1 = exception_lineno;
319     exception_type = NULL; 357     exception_type = NULL;
320     exception_value = NULL; 358     exception_value = NULL;
321     exception_tb = NULL; 359     exception_tb = NULL;
322     exception_lineno = 0; 360     exception_lineno = 0;
323 361
324     { 362     {
n 325     // Preserve existing published exception. n
326     exception_preserved_type_1 = EXC_TYPE(PyThreadState_GET());
327     Py_XINCREF( exception_preserved_type_1 );
328     exception_preserved_value_1 = EXC_VALUE(PyThreadState_GET());
329     Py_XINCREF( exception_preserved_value_1 );
330     exception_preserved_tb_1 = (PyTracebackObject *)EXC_TRACEBACK(PyThreadState_GET());
331     Py_XINCREF( exception_preserved_tb_1 );
332  
333     }
334     {
335     if ( exception_keeper_tb_1 == NULL )
336     {
337         exception_keeper_tb_1 = MAKE_TRACEBACK( frame_1fb222be1407851fb4076637e74ceee6, exception_keeper_lineno_1 );
338     }
339     else if ( exception_keeper_lineno_1 != 0 )
340     {
341         exception_keeper_tb_1 = ADD_TRACEBACK( exception_keeper_tb_1, frame_1fb222be1407851fb4076637e74ceee6, exception_keeper_lineno_1 );
342     }
343  
344     NORMALIZE_EXCEPTION( &exception_keeper_type_1, &exception_keeper_value_1, &exception_keeper_tb_1 );
345     PyException_SetTraceback( exception_keeper_value_1, (PyObject *)exception_keeper_tb_1 );
346     PUBLISH_EXCEPTION( &exception_keeper_type_1, &exception_keeper_value_1, &exception_keeper_tb_1 );
347     }
348     {
349     // Tried code:
350     {
351     nuitka_bool tmp_condition_result_1;
352     PyObject *tmp_operand_name_1;
353     PyObject *tmp_compexpr_left_1;
354     PyObject *tmp_compexpr_right_1;
355     tmp_compexpr_left_1 = EXC_TYPE(PyThreadState_GET());
356     if ( var_exc == NULL )
357     {
358  
359         exception_type = PyExc_UnboundLocalError;
360         Py_INCREF( exception_type );
361         exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "exc" );
362         exception_tb = NULL;
363         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
364         CHAIN_EXCEPTION( exception_value );
365  
366         exception_lineno = 41;
367         type_description_1 = "oooo";
368         goto try_except_handler_3;
369     }
370  
371     tmp_compexpr_right_1 = var_exc;
372     tmp_res = EXCEPTION_MATCH_BOOL( tmp_compexpr_left_1, tmp_compexpr_right_1 );
373     if ( tmp_res == -1 )
374     {
375         assert( ERROR_OCCURRED() );
376  
377         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
378  
379  
380         exception_lineno = 41;
381         type_description_1 = "oooo";
382         goto try_except_handler_3;
383     }
384     tmp_operand_name_1 = ( tmp_res != 0 ) ? Py_True : Py_False;
385     tmp_res = CHECK_IF_TRUE( tmp_operand_name_1 );
386     if ( tmp_res == -1 )
387     {
388         assert( ERROR_OCCURRED() );
389  
390         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
391  
392  
393         exception_lineno = 41;
394         type_description_1 = "oooo";
395         goto try_except_handler_3;
396     }
397     tmp_condition_result_1 = ( tmp_res == 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
398     if ( tmp_condition_result_1 == NUITKA_BOOL_TRUE )
399     {
400         goto branch_yes_1;
401     }
402     else
403     {
404         goto branch_no_1;
405     }
406     branch_yes_1:;
407     {
408     tmp_result = RERAISE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
409     if (unlikely( tmp_result == false ))
410     {
411         exception_lineno = 35;
412     }
413  
414     if (exception_tb && exception_tb->tb_frame == &frame_1fb222be1407851fb4076637e74ceee6->m_frame) frame_1fb222be1407851fb4076637e74ceee6->m_frame.f_lineno = exception_tb->tb_lineno;
415     type_description_1 = "oooo";
416     goto try_except_handler_3;
417     }
418     branch_no_1:;
419     }
420     goto try_end_2;
421     // Exception handler code:
422     try_except_handler_3:;
423     exception_keeper_type_2 = exception_type;
424     exception_keeper_value_2 = exception_value;
425     exception_keeper_tb_2 = exception_tb;
426     exception_keeper_lineno_2 = exception_lineno;
427     exception_type = NULL;
428     exception_value = NULL;
429     exception_tb = NULL;
430     exception_lineno = 0;
431  
432     {
433     // Restore previous exception.
434     SET_CURRENT_EXCEPTION( exception_preserved_type_1, exception_preserved_value_1, exception_preserved_tb_1 );
435     }
436     {
437     // Re-raise.
438     exception_type = exception_keeper_type_2;
439     exception_value = exception_keeper_value_2;
440     exception_tb = exception_keeper_tb_2;
441     exception_lineno = exception_keeper_lineno_2;
442  
443     goto frame_exception_exit_1;
444     }
445     // End of try:
446     try_end_2:;
447     }
448     {
449     // Restore previous exception.
450     SET_CURRENT_EXCEPTION( exception_preserved_type_1, exception_preserved_value_1, exception_preserved_tb_1 );
451     }
452     goto try_end_1;
453     // exception handler codes exits in all cases
454     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
455     return NULL;
456     // End of try:
457     try_end_1:;
458     }
459     {
460     PyObject *tmp_tuple_element_1;
461     if ( var_throw == NULL )
462     {
463  
464         exception_type = PyExc_UnboundLocalError;
465         Py_INCREF( exception_type );
466         exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "throw" );
467         exception_tb = NULL;
468         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
469         CHAIN_EXCEPTION( exception_value );
470  
471         exception_lineno = 44;
472         type_description_1 = "oooo";
473         goto frame_exception_exit_1;
474     }
475  
476     tmp_tuple_element_1 = var_throw;
477     tmp_return_value = PyTuple_New( 2 );
478     Py_INCREF( tmp_tuple_element_1 );
479     PyTuple_SET_ITEM( tmp_return_value, 0, tmp_tuple_element_1 );
480     if ( var_exc == NULL )
481     {
482         Py_DECREF( tmp_return_value );
483         exception_type = PyExc_UnboundLocalError;
484         Py_INCREF( exception_type );
485         exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "exc" );
486         exception_tb = NULL;
487         NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
488         CHAIN_EXCEPTION( exception_value );
489  
490         exception_lineno = 44;
491         type_description_1 = "oooo";
492         goto frame_exception_exit_1;
493     }
494  
495     tmp_tuple_element_1 = var_exc;
496     Py_INCREF( tmp_tuple_element_1 );
497     PyTuple_SET_ITEM( tmp_return_value, 1, tmp_tuple_element_1 );
498     goto frame_return_exit_1;
499     }
500  
501 #if 0
502     RESTORE_FRAME_EXCEPTION( frame_1fb222be1407851fb4076637e74ceee6 );
503 #endif
504  
505     // Put the previous frame back on top.
506     popFrameStack();
507  
508     goto frame_no_exception_1;
509  
510     frame_return_exit_1:;
511 #if 0
512     RESTORE_FRAME_EXCEPTION( frame_1fb222be1407851fb4076637e74ceee6 );
513 #endif
514  
515     // Put the previous frame back on top.
516     popFrameStack();
517  
518     goto try_return_handler_1;
519  
520     frame_exception_exit_1:;
521  
522 #if 0
523     RESTORE_FRAME_EXCEPTION( frame_1fb222be1407851fb4076637e74ceee6 );
524 #endif
525  
526     if ( exception_tb == NULL )
527     {
528         exception_tb = MAKE_TRACEBACK( frame_1fb222be1407851fb4076637e74ceee6, exception_lineno );
529     }
530     else if ( exception_tb->tb_frame != &frame_1fb222be1407851fb4076637e74ceee6->m_frame )
531     {
532         exception_tb = ADD_TRACEBACK( exception_tb, frame_1fb222be1407851fb4076637e74ceee6, exception_lineno );
533     }
534  
535     // Attachs locals to frame if any.
536     Nuitka_Frame_AttachLocals(
537         (struct Nuitka_FrameObject *)frame_1fb222be1407851fb4076637e74ceee6,
538         type_description_1,
539         var_gen,
540         var_exc,
541         var_throw,
542         var_generator
543     );
544  
545  
546     // Release cached frame.
547     if ( frame_1fb222be1407851fb4076637e74ceee6 == cache_frame_1fb222be1407851fb4076637e74ceee6 )
548     {
549         Py_DECREF( frame_1fb222be1407851fb4076637e74ceee6 );
550     }
551     cache_frame_1fb222be1407851fb4076637e74ceee6 = NULL;
552  
553     assertFrameObject( frame_1fb222be1407851fb4076637e74ceee6 );
554  
555     // Put the previous frame back on top.
556     popFrameStack();
557  
558     // Return the error.
559     goto try_except_handler_1;
560  
561     frame_no_exception_1:;
562     // tried codes exits in all cases
563     NUITKA_CANNOT_GET_HERE( __main__$$$function_1_calledRepeatedly );
564     return NULL;
565     // Return handler code:
566     try_return_handler_1:;
567     {
568     Py_XDECREF( var_gen ); 363     Py_XDECREF( var_gen );
569     var_gen = NULL; 364     var_gen = NULL;
570 365
571     } 366     }
572     { 367     {
n 573     Py_XDECREF( var_exc ); n
574     var_exc = NULL;
575  
576     }
577     {
578     Py_XDECREF( var_throw );
579     var_throw = NULL;
580  
581     }
582     {
583     Py_XDECREF( var_generator ); 368     Py_XDECREF( var_generator );
584     var_generator = NULL; 369     var_generator = NULL;
585 370
586     } 371     }
587     { 372     {
n 588     goto function_return_exit; n
589     }
590     // Exception handler code:
591     try_except_handler_1:;
592     exception_keeper_type_3 = exception_type;
593     exception_keeper_value_3 = exception_value;
594     exception_keeper_tb_3 = exception_tb;
595     exception_keeper_lineno_3 = exception_lineno;
596     exception_type = NULL;
597     exception_value = NULL;
598     exception_tb = NULL;
599     exception_lineno = 0;
600  
601     {
602     Py_XDECREF( var_gen );
603     var_gen = NULL;
604  
605     }
606     {
607     Py_XDECREF( var_exc );
608     var_exc = NULL;
609  
610     }
611     {
612     Py_XDECREF( var_throw );
613     var_throw = NULL;
614  
615     }
616     {
617     Py_XDECREF( var_generator );
618     var_generator = NULL;
619  
620     }
621     {
622     // Re-raise. 373     // Re-raise.
t 623     exception_type = exception_keeper_type_3; t 374     exception_type = exception_keeper_type_1;
624     exception_value = exception_keeper_value_3; 375     exception_value = exception_keeper_value_1;
625     exception_tb = exception_keeper_tb_3; 376     exception_tb = exception_keeper_tb_1;
626     exception_lineno = exception_keeper_lineno_3; 377     exception_lineno = exception_keeper_lineno_1;
627 378
628     goto function_exception_exit; 379     goto function_exception_exit;
629     } 380     }
630     // End of try: 381     // End of try:
631     } 382     }