[issue46817] Add a line-start table to the code object.

2022-03-16 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46817] Add a line-start table to the code object.

2022-03-15 Thread Mark Shannon
Mark Shannon added the comment: sys.settrace line events cannot use the co_lines table. They need additional state, as we don't want to trace the same line twice (unless there is a backwards jump). Using the start of a entry in `co_lines` doesn't work when some entries have no line number.

[issue46817] Add a line-start table to the code object.

2022-03-15 Thread Irit Katriel
Irit Katriel added the comment: I can see the linestarts used in trace.py to figure out coverage. But for this duplications don't make a difference (they are deduped in _find_lines_from_code anyway), right? Where else are they used, such that the current scheme may not work? --

[issue46817] Add a line-start table to the code object.

2022-02-21 Thread Mark Shannon
New submission from Mark Shannon : Computing whether an instruction is the first on a line (for tracing) in the interpreter is complicated and slow. Doing it in the compiler should be simpler and has no runtime cost. Currently we decide if the current instruction is the first on a line, by