summaryrefslogtreecommitdiffstats
path: root/Python/optimizer_analysis.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-04-25 10:32:47 (GMT)
committerGitHub <noreply@github.com>2024-04-25 10:32:47 (GMT)
commitf180b31e7629d36265fa36f1560365358b4fd47c (patch)
tree3a887125f428f481fd85753d3f6b896843e84b3a /Python/optimizer_analysis.c
parent10bb90ed49a81a525b126ce8e4d8564c1616d0b3 (diff)
downloadcpython-f180b31e7629d36265fa36f1560365358b4fd47c.zip
cpython-f180b31e7629d36265fa36f1560365358b4fd47c.tar.gz
cpython-f180b31e7629d36265fa36f1560365358b4fd47c.tar.bz2
GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)
Diffstat (limited to 'Python/optimizer_analysis.c')
-rw-r--r--Python/optimizer_analysis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c
index a76edd6..9315d72 100644
--- a/Python/optimizer_analysis.c
+++ b/Python/optimizer_analysis.c
@@ -369,7 +369,7 @@ eliminate_pop_guard(_PyUOpInstruction *this_instr, bool exit)
static PyCodeObject *
get_code(_PyUOpInstruction *op)
{
- assert(op->opcode == _PUSH_FRAME || op->opcode == _POP_FRAME);
+ assert(op->opcode == _PUSH_FRAME || op->opcode == _POP_FRAME || op->opcode == _RETURN_GENERATOR);
PyCodeObject *co = NULL;
uint64_t operand = op->operand;
if (operand == 0) {