Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into quick-resume
  • Loading branch information
markshannon committed Aug 28, 2023
commit cdd74a488a9a7725e9b8835628b965eb8ce4b4d8
35 changes: 35 additions & 0 deletions Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,38 @@ static inline void _Py_LeaveRecursiveCallPy(PyThreadState *tstate) {

/* Marker to specify tier 1 only instructions */
#define TIER_ONE_ONLY

/* 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




You are viewing a condensed version of this merge commit. You can view the full changes here.