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
This commit is contained in:
Mark Shannon 2024-06-17 14:40:11 +01:00 committed by GitHub
parent 79e09e60d8
commit 274f844830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 67 additions and 61 deletions

View file

@ -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;
}