summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-02-14 17:48:45 (GMT)
committerGitHub <noreply@github.com>2022-02-14 17:48:45 (GMT)
commit3b799d7448588d28de09ef9e3cc30c72c17db334 (patch)
treed8cb33e5fc85469e58bdcb058ead27e755ce096d /Python/compile.c
parent96084f4256d2d523b0a4d7d900322b032326e3ed (diff)
downloadcpython-3b799d7448588d28de09ef9e3cc30c72c17db334.zip
cpython-3b799d7448588d28de09ef9e3cc30c72c17db334.tar.gz
cpython-3b799d7448588d28de09ef9e3cc30c72c17db334.tar.bz2
Remove unnecessary basic block from comprehensions (GH-31263)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/compile.c b/Python/compile.c
index bfe451b..ac4960b 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -5034,17 +5034,16 @@ compiler_sync_comprehension_generator(struct compiler *c,
and then write to the element */
comprehension_ty gen;
- basicblock *start, *anchor, *skip, *if_cleanup;
+ basicblock *start, *anchor, *if_cleanup;
Py_ssize_t i, n;
start = compiler_new_block(c);
- skip = compiler_new_block(c);
if_cleanup = compiler_new_block(c);
anchor = compiler_new_block(c);
- if (start == NULL || skip == NULL || if_cleanup == NULL ||
- anchor == NULL)
+ if (start == NULL || if_cleanup == NULL || anchor == NULL) {
return 0;
+ }
gen = (comprehension_ty)asdl_seq_GET(generators, gen_index);
@@ -5131,8 +5130,6 @@ compiler_sync_comprehension_generator(struct compiler *c,
default:
return 0;
}
-
- compiler_use_next_block(c, skip);
}
compiler_use_next_block(c, if_cleanup);
if (start) {