[Python-Dev] Generated Bytecode ...

Terry Reedy tjreedy at udel.edu
Fri Oct 23 15:34:34 EDT 2015


On 10/23/2015 4:23 AM, Victor Stinner wrote:
> Hi,
>
> 2015-10-22 19:02 GMT+02:00 Brett Cannon <brett at python.org>:
>> It's not specified anywhere; it's just what the peepholer decides to remove.
>> The exact code can be found at
>> https://hg.python.org/cpython/file/default/Python/peephole.c . There has
>> been talk in the past for adding a -X flag to disable the peepholer, but it
>> never went any farther beyond that.
>
> Yeah, I remember that I had the same issue than Stéphane when I worked
> on my astoptimizer project :-) I wanted to completly disable the
> peephole optimizer because I wanted to reimplement the optimizations
> on the AST instead of rewriting the bytecode.
>
> I would be nice to have a "-X noopt" command line option for that.

How about -x nopeep to specifically skip the peephole optimizer?

-- 
Terry Jan Reedy




More information about the Python-Dev mailing list