Message87919
lnotab-based tracing is very complicated and isn't documented very well.
There were at least 3 comment blocks purporting to document co_lnotab,
and none did a very good job. This patch unifies them into
Objects/lnotab_notes.txt which tries to completely capture the current
state of affairs. I'm posting this here so that people can check that I
got it right. Thanks!
I also discovered that we've attached 2 layers of patches to the basic
tracing scheme. The first layer avoids jumping to instructions that
don't start a line, to avoid problems in if statements and while loops.
The second layer discovered that jumps backward do need to trace at
instructions that don't start a line, so it added extra lnotab entries
for 'while' and 'for' loops, and added a special case for backward jumps
within the same line. I replaced these patches by treating forward and
backward jumps differently.
I could simplify this slightly more by changing PyCode_CheckLineNumber.
It doesn't appear to be used outside of the core, but since it doesn't
start with an _, I want to double-check that changing its interface is ok. |
|
Date |
User |
Action |
Args |
2009-05-16 20:17:02 | jyasskin | set | recipients:
+ jyasskin |
2009-05-16 20:17:02 | jyasskin | set | messageid: <1242505022.27.0.997047692556.issue6042@psf.upfronthosting.co.za> |
2009-05-16 20:17:00 | jyasskin | link | issue6042 messages |
2009-05-16 20:16:58 | jyasskin | create | |
|