summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-02-13 11:24:55 (GMT)
committerGitHub <noreply@github.com>2023-02-13 11:24:55 (GMT)
commit160f2fe2b90ed5ec7838cb4141dd35768422891f (patch)
tree2d9617e40227da45aa8e3c4452eaa0f389a0d879 /Python/compile.c
parenta1f08f5f19753c7c9295f51b5ae1262c7a1c838f (diff)
downloadcpython-160f2fe2b90ed5ec7838cb4141dd35768422891f.zip
cpython-160f2fe2b90ed5ec7838cb4141dd35768422891f.tar.gz
cpython-160f2fe2b90ed5ec7838cb4141dd35768422891f.tar.bz2
GH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (GH-101788)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index a3c915c..b49eda3 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1789,6 +1789,8 @@ compiler_add_yield_from(struct compiler *c, location loc, int await)
ADDOP(c, loc, CLEANUP_THROW);
USE_LABEL(c, exit);
+ ADDOP_I(c, loc, SWAP, 2);
+ ADDOP(c, loc, POP_TOP);
return SUCCESS;
}