Commit 0136d77f authored by Michael W. Hudson's avatar Michael W. Hudson

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.
parent 50a5b232
...@@ -2966,15 +2966,17 @@ maybe_call_line_trace(int opcode, Py_tracefunc func, PyObject *obj, ...@@ -2966,15 +2966,17 @@ maybe_call_line_trace(int opcode, Py_tracefunc func, PyObject *obj,
if (addr + *p > frame->f_lasti) if (addr + *p > frame->f_lasti)
break; break;
addr += *p++; addr += *p++;
if (*p) *instr_lb = addr;
line += *p++; line += *p++;
--size; --size;
} }
if (addr == frame->f_lasti) { if (addr == frame->f_lasti) {
frame->f_lineno = line; frame->f_lineno = line;
call_trace(func, obj, frame, call_trace(func, obj, frame,
PyTrace_LINE, Py_None); PyTrace_LINE, Py_None);
} }
*instr_lb = addr;
if (size > 0) { if (size > 0) {
while (--size >= 0) { while (--size >= 0) {
addr += *p++; addr += *p++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment