summaryrefslogtreecommitdiffstats
path: root/Python/optimizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/optimizer.c')
-rw-r--r--Python/optimizer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c
index fcd7d18..a9a35fc 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -704,7 +704,7 @@ top: // Jump here after _PUSH_FRAME or likely branches
int nuops = expansion->nuops;
RESERVE(nuops + 1); /* One extra for exit */
int16_t last_op = expansion->uops[nuops-1].uop;
- if (last_op == _POP_FRAME || last_op == _RETURN_GENERATOR) {
+ if (last_op == _POP_FRAME || last_op == _RETURN_GENERATOR || last_op == _YIELD_VALUE) {
// Check for trace stack underflow now:
// We can't bail e.g. in the middle of
// LOAD_CONST + _POP_FRAME.
@@ -763,7 +763,7 @@ top: // Jump here after _PUSH_FRAME or likely branches
Py_FatalError("garbled expansion");
}
- if (uop == _POP_FRAME || uop == _RETURN_GENERATOR) {
+ if (uop == _POP_FRAME || uop == _RETURN_GENERATOR || uop == _YIELD_VALUE) {
TRACE_STACK_POP();
/* Set the operand to the function or code object returned to,
* to assist optimization passes. (See _PUSH_FRAME below.)