Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca803a0

Browse files
author
Michael W. Hudson
committed
One last tweak to the tracing machinery: this actually computes what I intended
all along. Before instr_lb tended to be too high. I don't think this actually makes any difference, given what the compiler produces, but it makes me a bit happier.
1 parent 3ae3315 commit ca803a0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/ceval.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2966,15 +2966,17 @@ maybe_call_line_trace(int opcode, Py_tracefunc func, PyObject *obj,
29662966
if (addr + *p > frame->f_lasti)
29672967
break;
29682968
addr += *p++;
2969+
if (*p) *instr_lb = addr;
29692970
line += *p++;
29702971
--size;
29712972
}
2973+
29722974
if (addr == frame->f_lasti) {
29732975
frame->f_lineno = line;
29742976
call_trace(func, obj, frame,
29752977
PyTrace_LINE, Py_None);
29762978
}
2977-
*instr_lb = addr;
2979+
29782980
if (size > 0) {
29792981
while (--size >= 0) {
29802982
addr += *p++;

0 commit comments

Comments
 (0)