mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-108614: Remove non-debug uses of #if TIER_ONE
and #if TIER_TWO
from _POP_FRAME
op. (GH-108685)
This commit is contained in:
parent
194c6fb85e
commit
059bd4d299
7 changed files with 123 additions and 66 deletions
|
@ -373,3 +373,39 @@ static inline int _Py_EnterRecursivePy(PyThreadState *tstate) {
|
|||
static inline void _Py_LeaveRecursiveCallPy(PyThreadState *tstate) {
|
||||
tstate->py_recursion_remaining++;
|
||||
}
|
||||
|
||||
|
||||
/* Implementation of "macros" that modify the instruction pointer,
|
||||
* stack pointer, or frame pointer.
|
||||
* These need to treated differently by tier 1 and 2. */
|
||||
|
||||
#if TIER_ONE
|
||||
|
||||
#define LOAD_IP() \
|
||||
do { next_instr = frame->prev_instr+1; } while (0)
|
||||
|
||||
#define STORE_SP() \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer)
|
||||
|
||||
#define LOAD_SP() \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if TIER_TWO
|
||||
|
||||
#define LOAD_IP() \
|
||||
do { ip_offset = (_Py_CODEUNIT *)_PyFrame_GetCode(frame)->co_code_adaptive; } while (0)
|
||||
|
||||
#define STORE_SP() \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer)
|
||||
|
||||
#define LOAD_SP() \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue