8000 use instr_ptr in LOAD_IP · python/cpython@371fa66 · GitHub
[go: up one dir, main page]

Skip to content

Commit 371fa66

Browse files
committed
use instr_ptr in LOAD_IP
1 parent 1ceeba1 commit 371fa66

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Python/ceval_macros.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,10 @@ static inline void _Py_LeaveRecursiveCallPy(PyThreadState *tstate) {
389389

390390
#if TIER_ONE
391391

392-
#define LOAD_IP() \
393-
do { next_instr = frame->prev_instr+1; } while (0)
392+
#define LOAD_IP() do { \
393+
assert(frame->prev_instr + 1 == frame->instr_ptr); \
394+
next_instr = frame->instr_ptr; \
395+
} while (0)
394396

395397
#define STORE_SP() \
396398
_PyFrame_SetStackPointer(frame, stack_pointer)

0 commit comments

Comments
 (0)
0