[issue1394] simple patch, improving unreachable bytecode removing
Paul Pogonyshev
report at bugs.python.org
Tue Feb 26 01:00:08 CET 2008
Paul Pogonyshev added the comment:
Thanks for writing the test.
Yes, I did read the comment. As I understood it, RETURN_VALUE is needed
only so that various optimization can assume codestr[] cannot suddenly
end without one. E.g. if you match for BINARY_ADD, you can safely check
the next command: if BINARY_ADD matched, there is a _guaranteed_ next
command, not an out-of-array failure.
Such proposed fake RETURN_VALUE _must_ be unreachable, so it must not be
problematic at all. If it was reachable, real codestr[] would end in
reachable non-return command, which must not happen during compilation.
I dunno, maybe interpreter guards against execution point falling of
the bytecode string, but in any case this must not happen in
non-corrupted files generated by the bytecode compiler.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1394>
__________________________________
More information about the Python-bugs-list
mailing list