[Python-Dev] SET_LINENO and python options

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Fri, 28 Jul 2000 19:01:31 +0200 (CEST)


M.-A. Lemburg wrote:
> 
> Separating out LOAD_FAST from the switch shows a nice effect.
> SET_LINENO is removed by -OO anyway, so there's really no
> use in optimizing this one.

Actually, I think that instead of fighting with SET_LINENO
for the standard setup, it would make sense to change the
invocation options to something more standard:

1) python         - code without SET_LINENO
2) python -g      - code for debugging, with SET_LINENO
3) python -O      - code without doc-strings.

The point is that currently there's no optimization of the
code stream at all, in the sense of classic compiler optimization
(code block-level optimizations, loop unrolling, etc).

And SET_LINENO is actually useful only for debugging (with pdb, etc).

What about this as a sane proposal for SET_LINENO?

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252