]> granicus.if.org Git - python/commit
bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)
authorPablo Galindo <Pablogsal@gmail.com>
Thu, 13 Jun 2019 18:16:22 +0000 (19:16 +0100)
committerGitHub <noreply@github.com>
Thu, 13 Jun 2019 18:16:22 +0000 (19:16 +0100)
commit3498c642f4e83f3d8e2214654c0fa8e0d51cebe5
tree07d51da51f406a38f216a877838af3902b1161f0
parent95492032c48fef20b9c7076a23fe7e46927a4688
bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)

The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.
Lib/test/test_peepholer.py
Misc/NEWS.d/next/Core and Builtins/2019-06-11-11-15-19.bpo-37213.UPii5K.rst [new file with mode: 0644]
Python/importlib.h
Python/importlib_external.h
Python/importlib_zipimport.h
Python/peephole.c