Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 25539:5fe07cd4b2bf legacy-trunk
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.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Thu, 03 Oct 2002 09:53:11 +0000 |
| parents | ca01f4b85853 |
| children | cab167613e43 |
line wrap: on
line diff
--- a/Python/ceval.c Thu Oct 03 09:50:47 2002 +0000 +++ b/Python/ceval.c Thu Oct 03 09:53:11 2002 +0000 @@ -2966,15 +2966,17 @@ if (addr + *p > frame->f_lasti) break; addr += *p++; + if (*p) *instr_lb = addr; line += *p++; --size; } + if (addr == frame->f_lasti) { frame->f_lineno = line; call_trace(func, obj, frame, PyTrace_LINE, Py_None); } - *instr_lb = addr; + if (size > 0) { while (--size >= 0) { addr += *p++;
