@@ -3769,9 +3769,6 @@ maybe_optimize_function_call(compiler *c, expr_ty e, jump_target_label end)
37693769 if (const_oparg == CONSTANT_BUILTIN_TUPLE ) {
37703770 ADDOP_I (c , loc , BUILD_LIST , 0 );
37713771 }
3772- else {
3773- ADDOP_LOAD_CONST (c , loc , initial_res );
3774- }
37753772 expr_ty generator_exp = asdl_seq_GET (args , 0 );
37763773 VISIT (c , expr , generator_exp );
37773774
@@ -3791,7 +3788,6 @@ maybe_optimize_function_call(compiler *c, expr_ty e, jump_target_label end)
37913788
37923789 ADDOP (c , NO_LOCATION , POP_ITER );
37933790 if (const_oparg != CONSTANT_BUILTIN_TUPLE ) {
3794- ADDOP (c , loc , POP_TOP );
37953791 ADDOP_LOAD_CONST (c , loc , initial_res == Py_True ? Py_False : Py_True );
37963792 }
37973793 ADDOP_JUMP (c , loc , JUMP , end );
@@ -3802,6 +3798,9 @@ maybe_optimize_function_call(compiler *c, expr_ty e, jump_target_label end)
38023798 if (const_oparg == CONSTANT_BUILTIN_TUPLE ) {
38033799 ADDOP_I (c , loc , CALL_INTRINSIC_1 , INTRINSIC_LIST_TO_TUPLE );
38043800 }
3801+ else {
3802+ ADDOP_LOAD_CONST (c , loc , initial_res );
3803+ }
38053804
38063805 optimized = 1 ;
38073806 ADDOP_JUMP (c , loc , JUMP , end );
0 commit comments