]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Produce cleaner bytecode for 'with' and 'async with' by generating separate code...
authorMark Shannon <mark@hotpy.org>
Thu, 21 Nov 2019 09:11:43 +0000 (09:11 +0000)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2019 09:11:43 +0000 (09:11 +0000)
commitfee552669f21ca294f57fe0df826945edc779090
tree13b461df5a1231220b8f72c197d2731e9cb88d85
parent5dcc06f6e0d7b5d6589085692b86c63e35e2325e
Produce cleaner bytecode for 'with' and 'async with' by generating separate code for normal and exceptional paths. (#6641)

Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication.
Reimplement frame.lineno setter using line numbers rather than bytecode offsets.
15 files changed:
Doc/library/dis.rst
Include/opcode.h
Lib/importlib/_bootstrap_external.py
Lib/opcode.py
Lib/test/test_dis.py
Lib/test/test_sys_settrace.py
Misc/NEWS.d/next/Core and Builtins/2018-03-13-14-46-03.bpo-32949.v821M7.rst [new file with mode: 0644]
Objects/frameobject.c
Python/ceval.c
Python/compile.c
Python/importlib.h
Python/importlib_external.h
Python/importlib_zipimport.h
Python/opcode_targets.h
Python/peephole.c