[issue1394] simple patch, improving unreachable bytecode removing

Neal Norwitz report at bugs.python.org
Tue Feb 26 06:58:48 CET 2008


Neal Norwitz added the comment:

Can you add more tests?  It seems that almost all the examples given in
this thread are good examples.  Also something like:

  while 1:
    if cond: return 1
    return 2
  return 3

There are a bunch more cases that could be added for where the code
should be optimized or might be optimized wrong that.

The #if 0 code should be removed in the patch.  Also, since
CONTINUE_LOOP is removed in this patch, it would be good to explicitly
add a test for that.  

This patch looks good to me, but I'll let Raymond decide.  Did all the
entire test suite run?  Note, you must remove all the .pyc files to test
this patch or change the MAGIC number in Python/import.c.

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


More information about the Python-bugs-list mailing list