aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-08-31 11:34:52 +0100
committerGitHub <noreply@github.com>2023-08-31 11:34:52 +0100
commit059bd4d299b384d2b434ccb106f91cb4bb03bbb1 (patch)
tree0d5dfb60b2d62ebbca1a13788fc2ca64d457354c /Python/generated_cases.c.h
parent194c6fb85e02ecbb1eedb26601e9d503c4d25174 (diff)
downloadcpython-059bd4d299b384d2b434ccb106f91cb4bb03bbb1.tar.gz
cpython-059bd4d299b384d2b434ccb106f91cb4bb03bbb1.zip
GH-108614: Remove non-debug uses of `#if TIER_ONE` and `#if TIER_TWO` from `_POP_FRAME` op. (GH-108685)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 5940c185817..a7bf20b9d1c 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -990,25 +990,27 @@
STACK_SHRINK(1);
{
assert(EMPTY());
- _PyFrame_SetStackPointer(frame, stack_pointer);
- _Py_LeaveRecursiveCallPy(tstate);
- // GH-99729: We need to unlink the frame *before* clearing it:
- _PyInterpreterFrame *dying = frame;
#if TIER_ONE
assert(frame != &entry_frame);
#endif
+ STORE_SP();
+ _Py_LeaveRecursiveCallPy(tstate);
+ // GH-99729: We need to unlink the frame *before* clearing it:
+ _PyInterpreterFrame *dying = frame;
frame = tstate->current_frame = dying->previous;
_PyEval_FrameClearAndPop(tstate, dying);
frame->prev_instr += frame->return_offset;
_PyFrame_StackPush(frame, retval);
- #if TIER_ONE
- goto resume_frame;
- #endif
- #if TIER_TWO
- stack_pointer = _PyFrame_GetStackPointer(frame);
- ip_offset = (_Py_CODEUNIT *)_PyFrame_GetCode(frame)->co_code_adaptive;
- #endif
+ LOAD_SP();
+ LOAD_IP();
+ #if LLTRACE && TIER_ONE
+ lltrace = maybe_lltrace_resume_frame(frame, &entry_frame, GLOBALS());
+ if (lltrace < 0) {
+ goto exit_unwind;
+ }
+ #endif
}
+ DISPATCH();
}
TARGET(INSTRUMENTED_RETURN_VALUE) {
@@ -1055,25 +1057,27 @@
retval = value;
{
assert(EMPTY());
- _PyFrame_SetStackPointer(frame, stack_pointer);
- _Py_LeaveRecursiveCallPy(tstate);
- // GH-99729: We need to unlink the frame *before* clearing it:
- _PyInterpreterFrame *dying = frame;
#if TIER_ONE
assert(frame != &entry_frame);
#endif
+ STORE_SP();
+ _Py_LeaveRecursiveCallPy(tstate);
+ // GH-99729: We need to unlink the frame *before* clearing it:
+ _PyInterpreterFrame *dying = frame;
frame = tstate->current_frame = dying->previous;
_PyEval_FrameClearAndPop(tstate, dying);
frame->prev_instr += frame->return_offset;
_PyFrame_StackPush(frame, retval);
- #if TIER_ONE
- goto resume_frame;
- #endif
- #if TIER_TWO
- stack_pointer = _PyFrame_GetStackPointer(frame);
- ip_offset = (_Py_CODEUNIT *)_PyFrame_GetCode(frame)->co_code_adaptive;
- #endif
+ LOAD_SP();
+ LOAD_IP();
+ #if LLTRACE && TIER_ONE
+ lltrace = maybe_lltrace_resume_frame(frame, &entry_frame, GLOBALS());
+ if (lltrace < 0) {
+ goto exit_unwind;
+ }
+ #endif
}
+ DISPATCH();
}
TARGET(INSTRUMENTED_RETURN_CONST) {
@@ -3887,6 +3891,7 @@
ip_offset = (_Py_CODEUNIT *)_PyFrame_GetCode(frame)->co_code_adaptive;
#endif
}
+ DISPATCH();
}
TARGET(CALL_PY_EXACT_ARGS) {
@@ -3963,6 +3968,7 @@
ip_offset = (_Py_CODEUNIT *)_PyFrame_GetCode(frame)->co_code_adaptive;
#endif
}
+ DISPATCH();
}
TARGET(CALL_PY_WITH_DEFAULTS) {