[issue1394] simple patch, improving unreachable bytecode removing
report at bugs.python.org
Tue Feb 26 00:37:29 CET 2008
Alexander Belopolsky added the comment:
Attached patch adds test_elim_unreachable() unit test. Last two
assertions should fail with unpatched python.
I am still trying to convince myself that the transformation are
> I propose that codestr array is made one byte
> longer and RETURN_VALUE opcode wrote in that extra byte.
I don't think that will be correct. Did you consider the following
/* Verify that RETURN_VALUE terminates the codestring. This
the various transformation patterns to look ahead several
instructions without additional checks to make sure they are
looking beyond the end of the code string.
if (codestr[codelen-1] != RETURN_VALUE)
Added file: http://bugs.python.org/file9555/test_peepholer.diff
Tracker <report at bugs.python.org>
More information about the Python-bugs-list