]> granicus.if.org Git - python/commit
bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 13 Jun 2019 18:35:40 +0000 (11:35 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Jun 2019 18:35:40 +0000 (11:35 -0700)
commit5282b3b1d2e0bdf13899b1616aea20a6e3c4e13e
tree813f5012478030fb2a839c4a2d7aceb8b7d42073
parentec3839a215a68cf35ff1f90cb6823f67a5abdce3
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.
(cherry picked from commit 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
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