]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-118335: Configure Tier 2 interpreter at build time (#118339)
authorGuido van Rossum <guido@python.org>
Wed, 1 May 2024 01:26:34 +0000 (18:26 -0700)
committerGitHub <noreply@github.com>
Wed, 1 May 2024 01:26:34 +0000 (18:26 -0700)
commit7d83f7bcc484145596bae1ff015fed0762da345d
treef2f3cbb0cefaa920b319c77da00606fef1db48aa
parent9c468e2c5dffb6fa9811fd16e70fa0463bdfce5f
gh-118335: Configure Tier 2 interpreter at build time (#118339)

The code for Tier 2 is now only compiled when configured
with `--enable-experimental-jit[=yes|interpreter]`.

We drop support for `PYTHON_UOPS` and -`Xuops`,
but you can disable the interpreter or JIT
at runtime by setting `PYTHON_JIT=0`.
You can also build it without enabling it by default
using `--enable-experimental-jit=yes-off`;
enable with `PYTHON_JIT=1`.

On Windows, the `build.bat` script supports
`--experimental-jit`, `--experimental-jit-off`,
`--experimental-interpreter`.

In the C code, `_Py_JIT` is defined as before
when the JIT is enabled; the new variable
`_Py_TIER2` is defined when the JIT *or* the
interpreter is enabled. It is actually a bitmask:
1: JIT; 2: default-off; 4: interpreter.
32 files changed:
Doc/whatsnew/3.13.rst
Include/internal/pycore_opcode_metadata.h
Include/internal/pycore_uop_metadata.h
Lib/dis.py
Lib/test/support/__init__.py
Lib/test/test_capi/test_opt.py
Lib/test/test_monitoring.py
Lib/test/test_opcache.py
Lib/test/test_optimizer.py
Lib/test/test_weakref.py
Misc/NEWS.d/next/Core and Builtins/2024-04-26-14-06-18.gh-issue-118335.SRFsxO.rst [new file with mode: 0644]
Modules/_opcode.c
Modules/_testinternalcapi.c
Objects/codeobject.c
Objects/object.c
PCbuild/_testinternalcapi.vcxproj
PCbuild/build.bat
PCbuild/pythoncore.vcxproj
Python/bytecodes.c
Python/ceval.c
Python/generated_cases.c.h
Python/instrumentation.c
Python/optimizer.c
Python/optimizer_analysis.c
Python/optimizer_symbols.c
Python/pylifecycle.c
Python/pystate.c
Python/sysmodule.c
Tools/cases_generator/analyzer.py
Tools/jit/README.md
configure
configure.ac