Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[3.14] GH-135171: Bug fix 2, all related changes in codegen.c are rev…
…erted
  • Loading branch information
efimov-mikhail committed Jun 10, 2025
commit 75e6184c8b924178fbbbb9fea32f201573b0840f
5 changes: 1 addition & 4 deletions Python/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4411,7 +4411,6 @@ codegen_sync_comprehension_generator(compiler *c, location loc,

comprehension_ty gen = (comprehension_ty)asdl_seq_GET(generators,
gen_index);
int is_outer_genexpr = gen_index == 0 && type == COMP_GENEXP;
if (!iter_on_stack) {
if (gen_index == 0) {
assert(METADATA(c)->u_argcount == 1);
Expand Down Expand Up @@ -4442,15 +4441,13 @@ codegen_sync_comprehension_generator(compiler *c, location loc,
}
if (IS_JUMP_TARGET_LABEL(start)) {
VISIT(c, expr, gen->iter);
ADDOP(c, LOC(gen->iter), GET_ITER);
}
}
}

if (IS_JUMP_TARGET_LABEL(start)) {
depth++;
if (!is_outer_genexpr) {
ADDOP(c, LOC(gen->iter), GET_ITER);
}
USE_LABEL(c, start);
ADDOP_JUMP(c, LOC(gen->iter), FOR_ITER, anchor);
}
Expand Down