[issue1394] simple patch, improving unreachable bytecode removing

Paul Pogonyshev report at bugs.python.org
Mon Feb 25 21:31:17 CET 2008


Paul Pogonyshev added the comment:

Speaking of which, I propose that codestr[] array is made one byte
longer and RETURN_VALUE opcode wrote in that extra byte.  It will be
removed by this patch anyway (if it is accepted), but we'll remove a way
to accidentally disable peephole optimizer.

I mean, it would cost almost nothing, yet will prevent making some
functions non-optimized.  E.g. like this:

def foo(x):
    if x >= 0:
        return x * 2
    raise ValueError

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1394>
__________________________________


More information about the Python-bugs-list mailing list