aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-06-17 14:40:11 +0100
committerGitHub <noreply@github.com>2024-06-17 14:40:11 +0100
commit274f844830898355f14d6edb6e71894a2f37e53c (patch)
tree0f6ef2d7e7fd30f42fe83bbc05859314ac1c230a /Python/executor_cases.c.h
parent79e09e60d865b7b3fcde9ccee86a502da82bb2b3 (diff)
downloadcpython-274f844830898355f14d6edb6e71894a2f37e53c.tar.gz
cpython-274f844830898355f14d6edb6e71894a2f37e53c.zip
GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624)
* Rename _POP_FRAME to _RETURN_VALUE as it returns a value as well as popping a frame. * Remove remaining _POP_FRAMEs
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 470c82d938a..d390c9fc2f6 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -971,8 +971,9 @@
break;
}
- case _POP_FRAME: {
+ case _RETURN_VALUE: {
PyObject *retval;
+ PyObject *res;
retval = stack_pointer[-1];
#if TIER_ONE
assert(frame != &entry_frame);
@@ -985,10 +986,12 @@
_PyInterpreterFrame *dying = frame;
frame = tstate->current_frame = dying->previous;
_PyEval_FrameClearAndPop(tstate, dying);
- _PyFrame_StackPush(frame, retval);
LOAD_SP();
LOAD_IP(frame->return_offset);
+ res = retval;
LLTRACE_RESUME_FRAME();
+ stack_pointer[0] = res;
+ stack_pointer += 1;
break;
}