]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
co_lnotab supports negative line number delta
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 20 Jan 2016 11:16:21 +0000 (12:16 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 20 Jan 2016 11:16:21 +0000 (12:16 +0100)
commitf3914eb16d28ad9eb20fe5133d9aa83658bcc27f
tree65316948bcac4a6bf79e8b3791de51f11a163432
parent316fcc867bbae652272aefb726185c12907ba8d4
co_lnotab supports negative line number delta

Issue #26107: The format of the co_lnotab attribute of code objects changes to
support negative line number delta.

Changes:

* assemble_lnotab(): if line number delta is less than -128 or greater than
  127, emit multiple (offset_delta, lineno_delta) in co_lnotab
* update functions decoding co_lnotab to use signed 8-bit integers

  - dis.findlinestarts()
  - PyCode_Addr2Line()
  - _PyCode_CheckLineNumber()
  - frame_setlineno()

* update lnotab_notes.txt
* increase importlib MAGIC_NUMBER to 3361
* document the change in What's New in Python 3.6
* cleanup also PyCode_Optimize() to use better variable names
Doc/whatsnew/3.6.rst
Include/code.h
Lib/dis.py
Lib/importlib/_bootstrap_external.py
Misc/NEWS
Objects/codeobject.c
Objects/frameobject.c
Objects/lnotab_notes.txt
Python/compile.c
Python/importlib_external.h
Python/peephole.c