[Python-Dev] SET_LINENO = f.lineno + ticker + ... = ?
Mon, 31 Jul 2000 05:35:49 +0200 (CEST)
[me, on explaining the deal with SET_LINENO]
> See my Addendum: to Mark's message that I just posted, which explains
> the whole story in detail. I forgot to change the subject line which
> still reads "Opcode reordering". Ah wait... from the archives:
Which makes me think about the tstate->ticker.
This is the only variable updated for every opcode.
If we can manage to involve the ticker in the computation of f.lineno,
having f.lasti and interp->checkinterval and whatever variables are
logged somewhere, we're about to win.
But it's likely to be messy, because thread states and frames would
be involved. If this is possible, we'll trap f.lineno's access in
frameobject.c and through this magic formula we could get an updated
f.lineno on every Python request.
Could someone think of a "magic formula" to compute the PC (the index
of the current opcode), which is enough for computing f.lineno with
PyCode_Addr2Line()? Guido? Tim? Anyone?
Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252