]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-92228: disable the compiler's 'small exit block inlining' optimization for blocks...
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Thu, 7 Jul 2022 06:38:36 +0000 (07:38 +0100)
committerGitHub <noreply@github.com>
Thu, 7 Jul 2022 06:38:36 +0000 (23:38 -0700)
commitbde06e1b8381f140b296a397ddd1deb1c784ff8e
tree7ff63df7d55741dae98638e14e691f6ccdf5bf4d
parent94988603f3c934f95220f09aefffd50c0a5d3367
gh-92228: disable the compiler's 'small exit block inlining' optimization for blocks that have a line number (GH-94592)

Inlining of code that corresponds to source code lines, can make it hard to distinguish later between code which is only reachable from except handlers, and that which is reachable in normal control flow. This caused problems with the debugger's jump feature.

This PR turns off the inlining optimisation for code which has line numbers. We still inline things like the implicit "return None".
Lib/test/test_dis.py
Lib/test/test_peepholer.py
Lib/test/test_sys_settrace.py
Misc/NEWS.d/next/Core and Builtins/2022-07-06-14-02-26.gh-issue-92228.44Cbly.rst [new file with mode: 0644]
Python/compile.c