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

Skip to content

Commit b6a8b0c

Browse files
committed
use instr_ptr in _PyFrame_OpAlreadyRan
1 parent 6c684b0 commit b6a8b0c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Objects/frameobject.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno, void *Py_UNUSED(ignore
824824
/* Finally set the new lasti and return OK. */
825825
f->f_lineno = 0;
826826
f->f_frame->prev_instr = _PyCode_CODE(code) + best_addr;
827-
f->f_frame->instr_ptr = _PyCode_CODE(code) + best_addr + 1;
827+
f->f_frame->instr_ptr = _PyCode_CODE(code) + best_addr;
828828
return 0;
829829
}
830830

@@ -1096,8 +1096,9 @@ _PyFrame_OpAlreadyRan(_PyInterpreterFrame *frame, int opcode, int oparg)
10961096
// This only works when opcode is a non-quickened form:
10971097
assert(_PyOpcode_Deopt[opcode] == opcode);
10981098
int check_oparg = 0;
1099+
10991100
for (_Py_CODEUNIT *instruction = _PyCode_CODE(_PyFrame_GetCode(frame));
1100-
instruction < frame->prev_instr; instruction++)
1101+
instruction < frame->instr_ptr; instruction++)
11011102
{
11021103
int check_opcode = _PyOpcode_Deopt[instruction->op.code];
11031104
check_oparg |= instruction->op.arg;

0 commit comments

Comments
 (0)
0