diff --git a/.gitattributes b/.gitattributes
index e88d6ea13e2..0dac0f84927 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -94,6 +94,8 @@ Lib/test/test_stable_abi_ctypes.py generated
Lib/test/test_zoneinfo/data/*.json generated
Lib/token.py generated
Misc/sbom.spdx.json generated
+Modules/_testinternalcapi/test_cases.c.h generated
+Modules/_testinternalcapi/test_targets.h generated
Objects/typeslots.inc generated
PC/python3dll.c generated
Parser/parser.c generated
@@ -104,6 +106,7 @@ Python/executor_cases.c.h generated
Python/generated_cases.c.h generated
Python/optimizer_cases.c.h generated
Python/opcode_targets.h generated
+Python/record_functions.c.h generated
Python/stdlib_module_names.h generated
Tools/peg_generator/pegen/grammar_parser.py generated
aclocal.m4 generated
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index bf10e34fde1..6b6074be0a5 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -63,8 +63,8 @@
.azure-pipelines/ @AA-Turner
# GitHub & related scripts
-.github/ @ezio-melotti @hugovk @AA-Turner
-Tools/build/compute-changes.py @AA-Turner
+.github/ @ezio-melotti @hugovk @AA-Turner @webknjaz
+Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
Tools/build/verify_ensurepip_wheels.py @AA-Turner @pfmoore @pradyunsg
# Pre-commit
@@ -176,6 +176,7 @@ Tools/wasm/config.site-wasm32-emscripten @freakboy3742 @emmatyping
Tools/wasm/emscripten @freakboy3742 @emmatyping
# WebAssembly (WASI)
+Platforms/WASI @brettcannon @emmatyping @savannahostrowski
Tools/wasm/wasi-env @brettcannon @emmatyping @savannahostrowski
Tools/wasm/wasi.py @brettcannon @emmatyping @savannahostrowski
Tools/wasm/wasi @brettcannon @emmatyping @savannahostrowski
diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md
deleted file mode 100644
index 174fd39171d..00000000000
--- a/.github/ISSUE_TEMPLATE/documentation.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-name: Documentation
-about: Report a problem with the documentation
-labels: "docs"
----
-
-# Documentation
-
-(A clear and concise description of the issue.)
diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml
new file mode 100644
index 00000000000..944e590452c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation.yml
@@ -0,0 +1,15 @@
+name: Documentation
+description: Report a problem with the documentation
+labels: ["docs"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ > [!NOTE]
+ > Trivial changes (for example typos) donโt require an issue before opening a PR.
+ - type: textarea
+ attributes:
+ label: "Documentation"
+ description: "A clear and concise description of the issue."
+ validations:
+ required: true
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2dc610ce37c..046e678f8c1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -261,7 +261,7 @@ jobs:
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
# supported by important vendors such as AWS-LC.
- openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
+ openssl_ver: [1.1.1w, 3.0.18, 3.3.5, 3.4.3, 3.5.4, 3.6.0]
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -655,11 +655,14 @@ jobs:
matrix:
sanitizer:
- address
- - undefined
- - memory
oss-fuzz-project-name:
- cpython3
- python3-libraries
+ include:
+ - sanitizer: undefined
+ oss-fuzz-project-name: cpython3
+ - sanitizer: memory
+ oss-fuzz-project-name: cpython3
exclude:
# Note that the 'no-exclude' sentinel below is to prevent
# an empty string value from excluding all jobs and causing
diff --git a/.github/workflows/reusable-wasi.yml b/.github/workflows/reusable-wasi.yml
index 4b03712eb1e..3c81f6ef82d 100644
--- a/.github/workflows/reusable-wasi.yml
+++ b/.github/workflows/reusable-wasi.yml
@@ -47,14 +47,14 @@ jobs:
- name: "Runner image version"
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: "Configure build Python"
- run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
+ run: python3 Platforms/WASI configure-build-python -- --config-cache --with-pydebug
- name: "Make build Python"
- run: python3 Tools/wasm/wasi make-build-python
+ run: python3 Platforms/WASI make-build-python
- name: "Configure host"
# `--with-pydebug` inferred from configure-build-python
- run: python3 Tools/wasm/wasi configure-host -- --config-cache
+ run: python3 Platforms/WASI configure-host -- --config-cache
- name: "Make host"
- run: python3 Tools/wasm/wasi make-host
+ run: python3 Platforms/WASI make-host
- name: "Display build info"
run: make --directory "${CROSS_BUILD_WASI}" pythoninfo
- name: "Test"
diff --git a/Android/android.py b/Android/android.py
index d1a10be776e..629696be3db 100755
--- a/Android/android.py
+++ b/Android/android.py
@@ -15,6 +15,7 @@
from asyncio import wait_for
from contextlib import asynccontextmanager
from datetime import datetime, timezone
+from enum import IntEnum, auto
from glob import glob
from os.path import abspath, basename, relpath
from pathlib import Path
@@ -61,6 +62,19 @@
hidden_output = []
+# Based on android/log.h in the NDK.
+class LogPriority(IntEnum):
+ UNKNOWN = 0
+ DEFAULT = auto()
+ VERBOSE = auto()
+ DEBUG = auto()
+ INFO = auto()
+ WARN = auto()
+ ERROR = auto()
+ FATAL = auto()
+ SILENT = auto()
+
+
def log_verbose(context, line, stream=sys.stdout):
if context.verbose:
stream.write(line)
@@ -505,21 +519,23 @@ async def logcat_task(context, initial_devices):
pid = await wait_for(find_pid(serial), startup_timeout)
# `--pid` requires API level 24 or higher.
- args = [adb, "-s", serial, "logcat", "--pid", pid, "--format", "tag"]
+ #
+ # `--binary` mode is used in order to detect which messages end with a
+ # newline, which most of the other modes don't indicate (except `--format
+ # long`). For example, every time pytest runs a test, it prints a "." and
+ # flushes the stream. Each "." becomes a separate log message, but we should
+ # show them all on the same line.
+ args = [adb, "-s", serial, "logcat", "--pid", pid, "--binary"]
logcat_started = False
async with async_process(
- *args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+ *args, stdout=subprocess.PIPE, stderr=None
) as process:
- while line := (await process.stdout.readline()).decode(*DECODE_ARGS):
- if match := re.fullmatch(r"([A-Z])/(.*)", line, re.DOTALL):
+ while True:
+ try:
+ priority, tag, message = await read_logcat(process.stdout)
logcat_started = True
- level, message = match.groups()
- else:
- # If the regex doesn't match, this is either a logcat startup
- # error, or the second or subsequent line of a multi-line
- # message. Python won't produce multi-line messages, but other
- # components might.
- level, message = None, line
+ except asyncio.IncompleteReadError:
+ break
# Exclude high-volume messages which are rarely useful.
if context.verbose < 2 and "from python test_syslog" in message:
@@ -527,25 +543,23 @@ async def logcat_task(context, initial_devices):
# Put high-level messages on stderr so they're highlighted in the
# buildbot logs. This will include Python's own stderr.
- stream = (
- sys.stderr
- if level in ["W", "E", "F"] # WARNING, ERROR, FATAL (aka ASSERT)
- else sys.stdout
- )
+ stream = sys.stderr if priority >= LogPriority.WARN else sys.stdout
- # To simplify automated processing of the output, e.g. a buildbot
- # posting a failure notice on a GitHub PR, we strip the level and
- # tag indicators from Python's stdout and stderr.
- for prefix in ["python.stdout: ", "python.stderr: "]:
- if message.startswith(prefix):
- global python_started
- python_started = True
- stream.write(message.removeprefix(prefix))
- break
+ # The app's stdout and stderr should be passed through transparently
+ # to our own corresponding streams.
+ if tag in ["python.stdout", "python.stderr"]:
+ global python_started
+ python_started = True
+ stream.write(message)
+ stream.flush()
else:
# Non-Python messages add a lot of noise, but they may
- # sometimes help explain a failure.
- log_verbose(context, line, stream)
+ # sometimes help explain a failure. Format them in the same way
+ # as `logcat --format tag`.
+ formatted = f"{priority.name[0]}/{tag}: {message}"
+ if not formatted.endswith("\n"):
+ formatted += "\n"
+ log_verbose(context, formatted, stream)
# If the device disconnects while logcat is running, which always
# happens in --managed mode, some versions of adb return non-zero.
@@ -556,6 +570,44 @@ async def logcat_task(context, initial_devices):
raise CalledProcessError(status, args)
+# Read one binary log message from the given StreamReader. The message format is
+# described at https://android.stackexchange.com/a/74660. All supported versions
+# of Android use format version 2 or later.
+async def read_logcat(stream):
+ async def read_bytes(size):
+ return await stream.readexactly(size)
+
+ async def read_int(size):
+ return int.from_bytes(await read_bytes(size), "little")
+
+ payload_len = await read_int(2)
+ if payload_len < 2:
+ # 1 byte for priority, 1 byte for null terminator of tag.
+ raise ValueError(f"payload length {payload_len} is too short")
+
+ header_len = await read_int(2)
+ if header_len < 4:
+ raise ValueError(f"header length {header_len} is too short")
+ await read_bytes(header_len - 4) # Ignore other header fields.
+
+ priority_int = await read_int(1)
+ try:
+ priority = LogPriority(priority_int)
+ except ValueError:
+ priority = LogPriority.UNKNOWN
+
+ payload_fields = (await read_bytes(payload_len - 1)).split(b"\0")
+ if len(payload_fields) < 2:
+ raise ValueError(
+ f"payload {payload!r} does not contain at least 2 "
+ f"null-separated fields"
+ )
+ tag, message, *_ = [
+ field.decode(*DECODE_ARGS) for field in payload_fields
+ ]
+ return priority, tag, message
+
+
def stop_app(serial):
run([adb, "-s", serial, "shell", "am", "force-stop", APP_ID], log=False)
diff --git a/Android/testbed/app/build.gradle.kts b/Android/testbed/app/build.gradle.kts
index 14d43d8c4d5..53cdc591fa3 100644
--- a/Android/testbed/app/build.gradle.kts
+++ b/Android/testbed/app/build.gradle.kts
@@ -92,7 +92,15 @@ android {
}
throw GradleException("Failed to find API level in $androidEnvFile")
}
- targetSdk = 35
+
+ // This controls the API level of the maxVersion managed emulator, which is used
+ // by CI and cibuildwheel.
+ // * 33 has excessive buffering in the logcat client
+ // (https://cs.android.com/android/_/android/platform/system/logging/+/d340721894f223327339010df59b0ac514308826).
+ // * 34 consumes too much disk space on GitHub Actions (#142289).
+ // * 35 has issues connecting to the internet (#142387).
+ // * 36 and later are not available as aosp_atd images yet.
+ targetSdk = 32
versionCode = 1
versionName = "1.0"
@@ -125,9 +133,10 @@ android {
path("src/main/c/CMakeLists.txt")
}
- // Set this property to something non-empty, otherwise it'll use the default
- // list, which ignores asset directories beginning with an underscore.
- aaptOptions.ignoreAssetsPattern = ".git"
+ // Set this property to something nonexistent but non-empty. Otherwise it'll use the
+ // default list, which ignores asset directories beginning with an underscore, and
+ // maybe also other files required by tests.
+ aaptOptions.ignoreAssetsPattern = "android-testbed-dont-ignore-anything"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -229,6 +238,12 @@ androidComponents.onVariants { variant ->
from(cwd)
}
}
+
+ // A filename ending with .gz will be automatically decompressed
+ // while building the APK. Avoid this by adding a dash to the end,
+ // and add an extra dash to any filenames that already end with one.
+ // This will be undone in MainActivity.kt.
+ rename(""".*(\.gz|-)""", "$0-")
}
}
diff --git a/Android/testbed/app/src/main/java/org/python/testbed/MainActivity.kt b/Android/testbed/app/src/main/java/org/python/testbed/MainActivity.kt
index 5727b0fe6c3..dc49cdb9a9f 100644
--- a/Android/testbed/app/src/main/java/org/python/testbed/MainActivity.kt
+++ b/Android/testbed/app/src/main/java/org/python/testbed/MainActivity.kt
@@ -80,7 +80,9 @@ class PythonTestRunner(val context: Context) {
continue
}
input.use {
- File(targetSubdir, name).outputStream().use { output ->
+ // Undo the .gz workaround from build.gradle.kts.
+ val outputName = name.replace(Regex("""(.*)-"""), "$1")
+ File(targetSubdir, outputName).outputStream().use { output ->
input.copyTo(output)
}
}
diff --git a/Doc/c-api/conversion.rst b/Doc/c-api/conversion.rst
index 96078d22710..f7c8ef8b22b 100644
--- a/Doc/c-api/conversion.rst
+++ b/Doc/c-api/conversion.rst
@@ -130,6 +130,8 @@ The following functions provide locale-independent string to number conversions.
*flags* can be zero or more of the following values or-ed together:
+ .. c:namespace:: NULL
+
.. c:macro:: Py_DTSF_SIGN
Always precede the returned string with a sign
@@ -151,9 +153,21 @@ The following functions provide locale-independent string to number conversions.
.. versionadded:: 3.11
- If *ptype* is non-``NULL``, then the value it points to will be set to one of
- ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying that
- *val* is a finite number, an infinite number, or not a number, respectively.
+ If *ptype* is non-``NULL``, then the value it points to will be set to one
+ of the following constants depending on the type of *val*:
+
+ .. list-table::
+ :header-rows: 1
+ :align: left
+
+ * - *\*ptype*
+ - type of *val*
+ * - .. c:macro:: Py_DTST_FINITE
+ - finite number
+ * - .. c:macro:: Py_DTST_INFINITE
+ - infinite number
+ * - .. c:macro:: Py_DTST_NAN
+ - not a number
The return value is a pointer to *buffer* with the converted string or
``NULL`` if the conversion failed. The caller is responsible for freeing the
diff --git a/Doc/c-api/lifecycle.rst b/Doc/c-api/lifecycle.rst
index 5a170862a26..531c4080a01 100644
--- a/Doc/c-api/lifecycle.rst
+++ b/Doc/c-api/lifecycle.rst
@@ -256,6 +256,8 @@ To allocate and free memory, see :ref:`allocating-objects`.
collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set); this may
change in the future.
+ .. versionadded:: 3.4
+
.. c:function:: int PyObject_CallFinalizerFromDealloc(PyObject *op)
@@ -266,6 +268,8 @@ To allocate and free memory, see :ref:`allocating-objects`.
should happen. Otherwise, this function returns 0 and destruction can
continue normally.
+ .. versionadded:: 3.4
+
.. seealso::
:c:member:`~PyTypeObject.tp_dealloc` for example code.
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index ed9b37dc172..790ec8da109 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -687,7 +687,7 @@ Export API
.. versionadded:: 3.14
-.. c:struct:: PyLongLayout
+.. c:type:: PyLongLayout
Layout of an array of "digits" ("limbs" in the GMP terminology), used to
represent absolute value for arbitrary precision integers.
@@ -727,7 +727,7 @@ Export API
Get the native layout of Python :class:`int` objects.
- See the :c:struct:`PyLongLayout` structure.
+ See the :c:type:`PyLongLayout` structure.
The function must not be called before Python initialization nor after
Python finalization. The returned layout is valid until Python is
@@ -735,7 +735,7 @@ Export API
in a process, and so it can be cached.
-.. c:struct:: PyLongExport
+.. c:type:: PyLongExport
Export of a Python :class:`int` object.
@@ -769,7 +769,7 @@ Export API
Export a Python :class:`int` object.
- *export_long* must point to a :c:struct:`PyLongExport` structure allocated
+ *export_long* must point to a :c:type:`PyLongExport` structure allocated
by the caller. It must not be ``NULL``.
On success, fill in *\*export_long* and return ``0``.
@@ -799,7 +799,7 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
.. versionadded:: 3.14
-.. c:struct:: PyLongWriter
+.. c:type:: PyLongWriter
A Python :class:`int` writer instance.
@@ -827,7 +827,7 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
The layout of *digits* is described by :c:func:`PyLong_GetNativeLayout`.
Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``]
- (where the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits
+ (where the :c:type:`~PyLongLayout.bits_per_digit` is the number of bits
per digit).
Any unused most significant digits must be set to ``0``.
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst
index a3be75a2a76..58f0de5d0fc 100644
--- a/Doc/c-api/memory.rst
+++ b/Doc/c-api/memory.rst
@@ -677,7 +677,11 @@ The pymalloc allocator
Python has a *pymalloc* allocator optimized for small objects (smaller or equal
to 512 bytes) with a short lifetime. It uses memory mappings called "arenas"
with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB on 64-bit
-platforms. It falls back to :c:func:`PyMem_RawMalloc` and
+platforms. When Python is configured with :option:`--with-pymalloc-hugepages`,
+the arena size on 64-bit platforms is increased to 2 MiB to match the huge page
+size, and arena allocation will attempt to use huge pages (``MAP_HUGETLB`` on
+Linux, ``MEM_LARGE_PAGES`` on Windows) with automatic fallback to regular pages.
+It falls back to :c:func:`PyMem_RawMalloc` and
:c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes.
*pymalloc* is the :ref:`default allocator ` of the
diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst
index 431151b841e..e8a6e09f555 100644
--- a/Doc/c-api/module.rst
+++ b/Doc/c-api/module.rst
@@ -426,10 +426,10 @@ To retrieve the state from a given module, use the following functions:
module state.
-.. c:function:: int PyModule_GetStateSize(PyObject *, Py_ssize_t *result)
+.. c:function:: int PyModule_GetStateSize(PyObject *module, Py_ssize_t *result)
- Set *\*result* to the size of the module's state, as specified using
- :c:macro:`Py_mod_state_size` (or :c:member:`PyModuleDef.m_size`),
+ Set *\*result* to the size of *module*'s state, as specified
+ using :c:macro:`Py_mod_state_size` (or :c:member:`PyModuleDef.m_size`),
and return 0.
On error, set *\*result* to -1, and return -1 with an exception set.
@@ -597,7 +597,7 @@ A module's token -- and the *your_token* value to use in the above code -- is:
.. c:function:: int PyModule_GetToken(PyObject *module, void** result)
- Set *\*result* to the module's token and return 0.
+ Set *\*result* to the module token for *module* and return 0.
On error, set *\*result* to NULL, and return -1 with an exception set.
@@ -645,7 +645,7 @@ rather than from an extension's :ref:`export hook `.
.. c:function:: int PyModule_Exec(PyObject *module)
- Execute the :c:data:`Py_mod_exec` slot(s) of the given *module*.
+ Execute the :c:data:`Py_mod_exec` slot(s) of *module*.
On success, return 0.
On error, return -1 with an exception set.
@@ -1021,6 +1021,9 @@ or code that creates modules dynamically.
``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`,
``PyModule_Create``, or ``PyModule_FromDefAndSpec``).
+ Return ``0`` on success.
+ Return ``-1`` with an exception set on error.
+
.. versionadded:: 3.5
.. c:function:: int PyUnstable_Module_SetGIL(PyObject *module, void *gil)
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 127b50ac479..992a4383f97 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -711,10 +711,10 @@ Object Protocol
:c:func:`PyUnstable_EnableTryIncRef` must have been called
earlier on *obj* or this function may spuriously return ``0`` in the
- :term:`free threading` build.
+ :term:`free-threaded build`.
This function is logically equivalent to the following C code, except that
- it behaves atomically in the :term:`free threading` build::
+ it behaves atomically in the :term:`free-threaded build`::
if (Py_REFCNT(op) > 0) {
Py_INCREF(op);
@@ -791,10 +791,10 @@ Object Protocol
On GIL-enabled builds, this function is equivalent to
:c:expr:`Py_REFCNT(op) == 1`.
- On a :term:`free threaded ` build, this checks if *op*'s
+ On a :term:`free-threaded build`, this checks if *op*'s
:term:`reference count` is equal to one and additionally checks if *op*
is only used by this thread. :c:expr:`Py_REFCNT(op) == 1` is **not**
- thread-safe on free threaded builds; prefer this function.
+ thread-safe on free-threaded builds; prefer this function.
The caller must hold an :term:`attached thread state`, despite the fact
that this function doesn't call into the Python interpreter. This function
diff --git a/Doc/c-api/refcounting.rst b/Doc/c-api/refcounting.rst
index 57a0728d4e9..4d56a92bf2a 100644
--- a/Doc/c-api/refcounting.rst
+++ b/Doc/c-api/refcounting.rst
@@ -25,7 +25,7 @@ of Python objects.
.. note::
- On :term:`free threaded ` builds of Python, returning 1
+ On :term:`free-threaded builds ` of Python, returning 1
isn't sufficient to determine if it's safe to treat *o* as having no
access by other threads. Use :c:func:`PyUnstable_Object_IsUniquelyReferenced`
for that instead.
diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
index 9c5fdcefaf8..510e683c87e 100644
--- a/Doc/data/stable_abi.dat
+++ b/Doc/data/stable_abi.dat
@@ -389,8 +389,14 @@ func,PyList_SetSlice,3.2,,
func,PyList_Size,3.2,,
func,PyList_Sort,3.2,,
data,PyList_Type,3.2,,
+type,PyLongExport,3.15,,full-abi
+type,PyLongLayout,3.15,,full-abi
type,PyLongObject,3.2,,opaque
data,PyLongRangeIter_Type,3.2,,
+type,PyLongWriter,3.15,,opaque
+func,PyLongWriter_Create,3.15,,
+func,PyLongWriter_Discard,3.15,,
+func,PyLongWriter_Finish,3.15,,
func,PyLong_AsDouble,3.2,,
func,PyLong_AsInt,3.13,,
func,PyLong_AsInt32,3.14,,
@@ -409,6 +415,8 @@ func,PyLong_AsUnsignedLongLong,3.2,,
func,PyLong_AsUnsignedLongLongMask,3.2,,
func,PyLong_AsUnsignedLongMask,3.2,,
func,PyLong_AsVoidPtr,3.2,,
+func,PyLong_Export,3.15,,
+func,PyLong_FreeExport,3.15,,
func,PyLong_FromDouble,3.2,,
func,PyLong_FromInt32,3.14,,
func,PyLong_FromInt64,3.14,,
@@ -425,6 +433,7 @@ func,PyLong_FromUnsignedLongLong,3.2,,
func,PyLong_FromUnsignedNativeBytes,3.14,,
func,PyLong_FromVoidPtr,3.2,,
func,PyLong_GetInfo,3.2,,
+func,PyLong_GetNativeLayout,3.15,,
data,PyLong_Type,3.2,,
macro,PyMODEXPORT_FUNC,3.15,,
data,PyMap_Type,3.2,,
diff --git a/Doc/extending/first-extension-module.rst b/Doc/extending/first-extension-module.rst
index 5bde785c49e..f1ba0a3ceb7 100644
--- a/Doc/extending/first-extension-module.rst
+++ b/Doc/extending/first-extension-module.rst
@@ -171,7 +171,10 @@ Now, build install the *project in the current directory* (``.``) via ``pip``:
.. code-block:: sh
- python -m pip install .
+ python -m pip -v install .
+
+The ``-v`` (``--verbose``) option causes ``pip`` to show the output from
+the compiler, which is often useful during development.
.. tip::
@@ -460,7 +463,7 @@ So, we'll need to *encode* the data, and we'll use the UTF-8 encoding for it.
and the C API has special support for it.)
The function to encode a Python string into a UTF-8 buffer is named
-:c:func:`PyUnicode_AsUTF8` [#why-pyunicodeasutf8]_.
+:c:func:`PyUnicode_AsUTF8AndSize` [#why-pyunicodeasutf8]_.
Call it like this:
.. code-block:: c
@@ -469,31 +472,31 @@ Call it like this:
static PyObject *
spam_system(PyObject *self, PyObject *arg)
{
- const char *command = PyUnicode_AsUTF8(arg);
+ const char *command = PyUnicode_AsUTF8AndSize(arg, NULL);
int status = 3;
PyObject *result = PyLong_FromLong(status);
return result;
}
-If :c:func:`PyUnicode_AsUTF8` is successful, *command* will point to the
-resulting array of bytes.
+If :c:func:`PyUnicode_AsUTF8AndSize` is successful, *command* will point to the
+resulting C string -- a zero-terminated array of bytes [#embedded-nul]_.
This buffer is managed by the *arg* object, which means we don't need to free
it, but we must follow some rules:
* We should only use the buffer inside the ``spam_system`` function.
- When ``spam_system`` returns, *arg* and the buffer it manages might be
+ After ``spam_system`` returns, *arg* and the buffer it manages might be
garbage-collected.
* We must not modify it. This is why we use ``const``.
-If :c:func:`PyUnicode_AsUTF8` was *not* successful, it returns a ``NULL``
+If :c:func:`PyUnicode_AsUTF8AndSize` was *not* successful, it returns a ``NULL``
pointer.
When calling *any* Python C API, we always need to handle such error cases.
The way to do this in general is left for later chapters of this documentation.
For now, be assured that we are already handling errors from
:c:func:`PyLong_FromLong` correctly.
-For the :c:func:`PyUnicode_AsUTF8` call, the correct way to handle errors is
-returning ``NULL`` from ``spam_system``.
+For the :c:func:`PyUnicode_AsUTF8AndSize` call, the correct way to handle
+errors is returning ``NULL`` from ``spam_system``.
Add an ``if`` block for this:
@@ -503,7 +506,7 @@ Add an ``if`` block for this:
static PyObject *
spam_system(PyObject *self, PyObject *arg)
{
- const char *command = PyUnicode_AsUTF8(arg);
+ const char *command = PyUnicode_AsUTF8AndSize(arg);
if (command == NULL) {
return NULL;
}
@@ -512,7 +515,18 @@ Add an ``if`` block for this:
return result;
}
-That's it for the setup.
+To test that error handling works, compile again, restart Python so that
+``import spam`` picks up the new version of your module, and try passing
+a non-string value to your function:
+
+.. code-block:: pycon
+
+ >>> import spam
+ >>> spam.system(3)
+ Traceback (most recent call last):
+ ...
+ TypeError: bad argument type for built-in operation
+
Now, all that is left is calling the C library function :c:func:`system` with
the ``char *`` buffer, and using its result instead of the ``3``:
@@ -522,7 +536,7 @@ the ``char *`` buffer, and using its result instead of the ``3``:
static PyObject *
spam_system(PyObject *self, PyObject *arg)
{
- const char *command = PyUnicode_AsUTF8(arg);
+ const char *command = PyUnicode_AsUTF8AndSize(arg);
if (command == NULL) {
return NULL;
}
@@ -543,7 +557,8 @@ system command:
>>> result
0
-You might also want to test error cases:
+You can also test with other commands, like ``ls``, ``dir``, or one
+that doesn't exist:
.. code-block:: pycon
@@ -553,11 +568,6 @@ You might also want to test error cases:
>>> result
32512
- >>> spam.system(3)
- Traceback (most recent call last):
- ...
- TypeError: bad argument type for built-in operation
-
The result
==========
@@ -665,3 +675,13 @@ on :py:attr:`sys.path`.
type.
.. [#why-pyunicodeasutf8] Here, ``PyUnicode`` refers to the original name of
the Python :py:class:`str` class: ``unicode``.
+
+ The ``AndSize`` part of the name refers to the fact that this function can
+ also retrieve the size of the buffer, using an output argument.
+ We don't need this, so we set the second argument to NULL.
+.. [#embedded-nul] We're ignoring the fact that Python strings can also
+ contain NUL bytes, which terminate a C string.
+ In other words, our function will treat ``spam.system("foo\0bar")`` as
+ ``spam.system("foo")``.
+ This possibility can lead to security issues, so the real ``os.system``
+ function size checks for this case and raises an error.
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst
index 6f9dfa8616e..138a5ca7a75 100644
--- a/Doc/faq/programming.rst
+++ b/Doc/faq/programming.rst
@@ -1226,13 +1226,13 @@ This converts the list into a set, thereby removing duplicates, and then back
into a list.
-How do you remove multiple items from a list
---------------------------------------------
+How do you remove multiple items from a list?
+---------------------------------------------
As with removing duplicates, explicitly iterating in reverse with a
delete condition is one possibility. However, it is easier and faster
to use slice replacement with an implicit or explicit forward iteration.
-Here are three variations.::
+Here are three variations::
mylist[:] = filter(keep_function, mylist)
mylist[:] = (x for x in mylist if keep_condition)
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 68035c2dfb5..7c41f5bc27b 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -160,9 +160,9 @@ Glossary
On most builds of Python, having an attached thread state implies that the
caller holds the :term:`GIL` for the current interpreter, so only
one OS thread can have an attached thread state at a given moment. In
- :term:`free-threaded ` builds of Python, threads can concurrently
- hold an attached thread state, allowing for true parallelism of the bytecode
- interpreter.
+ :term:`free-threaded builds ` of Python, threads can
+ concurrently hold an attached thread state, allowing for true parallelism of
+ the bytecode interpreter.
attribute
A value associated with an object which is usually referenced by name
@@ -580,6 +580,13 @@ Glossary
the :term:`global interpreter lock` which allows only one thread to
execute Python bytecode at a time. See :pep:`703`.
+ free-threaded build
+
+ A build of :term:`CPython` that supports :term:`free threading`,
+ configured using the :option:`--disable-gil` option before compilation.
+
+ See :ref:`freethreading-python-howto`.
+
free variable
Formally, as defined in the :ref:`language execution model `, a free
variable is any variable used in a namespace which is not a local variable in that
diff --git a/Doc/howto/remote_debugging.rst b/Doc/howto/remote_debugging.rst
index 78b40bcdf71..dfe0176b75a 100644
--- a/Doc/howto/remote_debugging.rst
+++ b/Doc/howto/remote_debugging.rst
@@ -8,6 +8,16 @@ execute Python code remotely.
Most platforms require elevated privileges to attach to another Python process.
+Disabling remote debugging
+--------------------------
+
+To disable remote debugging support, use any of the following:
+
+* Set the :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable to ``1`` before
+ starting the interpreter.
+* Use the :option:`-X disable_remote_debug` command-line option.
+* Compile Python with the :option:`--without-remote-debug` build flag.
+
.. _permission-requirements:
Permission requirements
@@ -614,4 +624,3 @@ To inject and execute a Python script in a remote process:
6. Set ``_PY_EVAL_PLEASE_STOP_BIT`` in the ``eval_breaker`` field.
7. Resume the process (if suspended). The script will execute at the next safe
evaluation point.
-
diff --git a/Doc/includes/capi-extension/spammodule-01.c b/Doc/includes/capi-extension/spammodule-01.c
index 86c9840359d..ac96f17f047 100644
--- a/Doc/includes/capi-extension/spammodule-01.c
+++ b/Doc/includes/capi-extension/spammodule-01.c
@@ -12,7 +12,7 @@
static PyObject *
spam_system(PyObject *self, PyObject *arg)
{
- const char *command = PyUnicode_AsUTF8(arg);
+ const char *command = PyUnicode_AsUTF8AndSize(arg, NULL);
if (command == NULL) {
return NULL;
}
diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst
index 4876117f640..478686bc300 100644
--- a/Doc/library/base64.rst
+++ b/Doc/library/base64.rst
@@ -73,6 +73,7 @@ POST request.
.. function:: b64decode(s, altchars=None, validate=False)
+ b64decode(s, altchars=None, validate=True, *, ignorechars)
Decode the Base64 encoded :term:`bytes-like object` or ASCII string
*s* and return the decoded :class:`bytes`.
@@ -84,15 +85,30 @@ POST request.
A :exc:`binascii.Error` exception is raised
if *s* is incorrectly padded.
- If *validate* is ``False`` (the default), characters that are neither
- in the normal base-64 alphabet nor the alternative alphabet are
- discarded prior to the padding check. If *validate* is ``True``,
- these non-alphabet characters in the input result in a
- :exc:`binascii.Error`.
+ If *ignorechars* is specified, it should be a :term:`bytes-like object`
+ containing characters to ignore from the input when *validate* is true.
+ The default value of *validate* is ``True`` if *ignorechars* is specified,
+ ``False`` otherwise.
+
+ If *validate* is false, characters that are neither
+ in the normal base-64 alphabet nor (if *ignorechars* is not specified)
+ the alternative alphabet are
+ discarded prior to the padding check, but the ``+`` and ``/`` characters
+ keep their meaning if they are not in *altchars* (they will be discarded
+ in future Python versions).
+
+ If *validate* is true, these non-alphabet characters in the input
+ result in a :exc:`binascii.Error`.
For more information about the strict base64 check, see :func:`binascii.a2b_base64`
- May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2.
+ .. versionchanged:: next
+ Added the *ignorechars* parameter.
+
+ .. deprecated:: next
+ Accepting the ``+`` and ``/`` characters with an alternative alphabet
+ is now deprecated.
+
.. function:: standard_b64encode(s)
@@ -123,6 +139,9 @@ POST request.
``/`` in the standard Base64 alphabet, and return the decoded
:class:`bytes`.
+ .. deprecated:: next
+ Accepting the ``+`` and ``/`` characters is now deprecated.
+
.. function:: b32encode(s)
@@ -246,8 +265,7 @@ Refer to the documentation of the individual functions for more information.
*adobe* controls whether the input sequence is in Adobe Ascii85 format
(i.e. is framed with <~ and ~>).
- *ignorechars* should be a :term:`bytes-like object` or ASCII string
- containing characters to ignore
+ *ignorechars* should be a byte string containing characters to ignore
from the input. This should only contain whitespace characters, and by
default contains all whitespace characters in ASCII.
diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst
index eaf755711bc..d9f0baedec8 100644
--- a/Doc/library/binascii.rst
+++ b/Doc/library/binascii.rst
@@ -49,10 +49,16 @@ The :mod:`binascii` module defines the following functions:
.. function:: a2b_base64(string, /, *, strict_mode=False)
+ a2b_base64(string, /, *, strict_mode=True, ignorechars)
Convert a block of base64 data back to binary and return the binary data. More
than one line may be passed at a time.
+ If *ignorechars* is specified, it should be a :term:`bytes-like object`
+ containing characters to ignore from the input when *strict_mode* is true.
+ The default value of *strict_mode* is ``True`` if *ignorechars* is specified,
+ ``False`` otherwise.
+
If *strict_mode* is true, only valid base64 data will be converted. Invalid base64
data will raise :exc:`binascii.Error`.
@@ -66,6 +72,9 @@ The :mod:`binascii` module defines the following functions:
.. versionchanged:: 3.11
Added the *strict_mode* parameter.
+ .. versionchanged:: next
+ Added the *ignorechars* parameter.
+
.. function:: b2a_base64(data, *, wrapcol=0, newline=True)
diff --git a/Doc/library/contextvars.rst b/Doc/library/contextvars.rst
index b218468a084..653d8b597c2 100644
--- a/Doc/library/contextvars.rst
+++ b/Doc/library/contextvars.rst
@@ -77,6 +77,32 @@ Context Variables
to restore the variable to its previous value via the
:meth:`ContextVar.reset` method.
+ For convenience, the token object can be used as a context manager
+ to avoid calling :meth:`ContextVar.reset` manually::
+
+ var = ContextVar('var', default='default value')
+
+ with var.set('new value'):
+ assert var.get() == 'new value'
+
+ assert var.get() == 'default value'
+
+ It is a shorthand for::
+
+ var = ContextVar('var', default='default value')
+
+ token = var.set('new value')
+ try:
+ assert var.get() == 'new value'
+ finally:
+ var.reset(token)
+
+ assert var.get() == 'default value'
+
+ .. versionadded:: 3.14
+
+ Added support for using tokens as context managers.
+
.. method:: reset(token)
Reset the context variable to the value it had before the
@@ -93,24 +119,18 @@ Context Variables
# After the reset call the var has no value again, so
# var.get() would raise a LookupError.
+ The same *token* cannot be used twice.
+
.. class:: Token
*Token* objects are returned by the :meth:`ContextVar.set` method.
They can be passed to the :meth:`ContextVar.reset` method to revert
the value of the variable to what it was before the corresponding
- *set*.
+ *set*. A single token cannot reset a context variable more than once.
- The token supports :ref:`context manager protocol `
- to restore the corresponding context variable value at the exit from
- :keyword:`with` block::
-
- var = ContextVar('var', default='default value')
-
- with var.set('new value'):
- assert var.get() == 'new value'
-
- assert var.get() == 'default value'
+ Tokens support the :ref:`context manager protocol `
+ to automatically reset context variables. See :meth:`ContextVar.set`.
.. versionadded:: 3.14
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 6038af99009..d2f4da08327 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -896,7 +896,7 @@ invalid non-\ ``NULL`` pointers would crash Python)::
Thread safety without the GIL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-From Python 3.13 onward, the :term:`GIL` can be disabled on :term:`free threaded ` builds.
+From Python 3.13 onward, the :term:`GIL` can be disabled on the :term:`free-threaded build`.
In ctypes, reads and writes to a single object concurrently is safe, but not across multiple objects:
.. code-block:: pycon
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 755d681b9df..1486eeb3053 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -1642,7 +1642,7 @@ iterations of the loop.
Pushes a ``NULL`` to the stack.
Used in the call sequence to match the ``NULL`` pushed by
- :opcode:`!LOAD_METHOD` for non-method calls.
+ :opcode:`LOAD_ATTR` for non-method calls.
.. versionadded:: 3.11
diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst
index 88e978d7f5e..50b65459d2f 100644
--- a/Doc/library/http.cookies.rst
+++ b/Doc/library/http.cookies.rst
@@ -294,9 +294,9 @@ The following example demonstrates how to use the :mod:`http.cookies` module.
Set-Cookie: chips=ahoy
Set-Cookie: vienna=finger
>>> C = cookies.SimpleCookie()
- >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
+ >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=;";')
>>> print(C)
- Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
+ Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=;"
>>> C = cookies.SimpleCookie()
>>> C["oreo"] = "doublestuff"
>>> C["oreo"]["path"] = "/"
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index a16f46ef812..89be225b6ba 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -158,7 +158,7 @@ Go to Line
Show Completions
Open a scrollable list allowing selection of existing names. See
- :ref:`Completions ` in the Editing and navigation section below.
+ :ref:`Completions ` in the Editing and Navigation section below.
Expand Word
Expand a prefix you have typed to match a full word in the same window;
@@ -167,7 +167,7 @@ Expand Word
Show Call Tip
After an unclosed parenthesis for a function, open a small window with
function parameter hints. See :ref:`Calltips ` in the
- Editing and navigation section below.
+ Editing and Navigation section below.
Show Surrounding Parens
Highlight the surrounding parenthesis.
@@ -178,9 +178,9 @@ Format menu (Editor window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Format Paragraph
- Reformat the current blank-line-delimited paragraph in comment block or
- multiline string or selected line in a string. All lines in the
- paragraph will be formatted to less than N columns, where N defaults to 72.
+ Rewrap the text block containing the text insert cursor.
+ Avoid code lines. See :ref:`Format block` in the
+ Editing and Navigation section below.
Indent Region
Shift selected lines right by the indent width (default 4 spaces).
@@ -566,6 +566,20 @@ In an editor, import statements have no effect until one runs the file.
One might want to run a file after writing import statements, after
adding function definitions, or after opening an existing file.
+.. _format-block:
+
+Format block
+^^^^^^^^^^^^
+
+Reformat Paragraph rewraps a block ('paragraph') of contiguous equally
+indented non-blank comments, a similar block of text within a multiline
+string, or a selected subset of either.
+If needed, add a blank line to separate string from code.
+Partial lines in a selection expand to complete lines.
+The resulting lines have the same indent as before
+but have maximum total length of N columns (characters).
+Change the default N of 72 on the Window tab of IDLE Settings.
+
.. _code-context:
Code Context
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index c5ea78c1683..26964348f5c 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -596,172 +596,6 @@ ABC hierarchy::
itself does not end in ``__init__``.
-.. class:: ResourceReader
-
- *Superseded by TraversableResources*
-
- An :term:`abstract base class` to provide the ability to read
- *resources*.
-
- From the perspective of this ABC, a *resource* is a binary
- artifact that is shipped within a package. Typically this is
- something like a data file that lives next to the ``__init__.py``
- file of the package. The purpose of this class is to help abstract
- out the accessing of such data files so that it does not matter if
- the package and its data file(s) are stored e.g. in a zip file
- versus on the file system.
-
- For any of methods of this class, a *resource* argument is
- expected to be a :term:`path-like object` which represents
- conceptually just a file name. This means that no subdirectory
- paths should be included in the *resource* argument. This is
- because the location of the package the reader is for, acts as the
- "directory". Hence the metaphor for directories and file
- names is packages and resources, respectively. This is also why
- instances of this class are expected to directly correlate to
- a specific package (instead of potentially representing multiple
- packages or a module).
-
- Loaders that wish to support resource reading are expected to
- provide a method called ``get_resource_reader(fullname)`` which
- returns an object implementing this ABC's interface. If the module
- specified by fullname is not a package, this method should return
- :const:`None`. An object compatible with this ABC should only be
- returned when the specified module is a package.
-
- .. versionadded:: 3.7
-
- .. deprecated-removed:: 3.12 3.14
- Use :class:`importlib.resources.abc.TraversableResources` instead.
-
- .. method:: open_resource(resource)
- :abstractmethod:
-
- Returns an opened, :term:`file-like object` for binary reading
- of the *resource*.
-
- If the resource cannot be found, :exc:`FileNotFoundError` is
- raised.
-
- .. method:: resource_path(resource)
- :abstractmethod:
-
- Returns the file system path to the *resource*.
-
- If the resource does not concretely exist on the file system,
- raise :exc:`FileNotFoundError`.
-
- .. method:: is_resource(name)
- :abstractmethod:
-
- Returns ``True`` if the named *name* is considered a resource.
- :exc:`FileNotFoundError` is raised if *name* does not exist.
-
- .. method:: contents()
- :abstractmethod:
-
- Returns an :term:`iterable` of strings over the contents of
- the package. Do note that it is not required that all names
- returned by the iterator be actual resources, e.g. it is
- acceptable to return names for which :meth:`is_resource` would
- be false.
-
- Allowing non-resource names to be returned is to allow for
- situations where how a package and its resources are stored
- are known a priori and the non-resource names would be useful.
- For instance, returning subdirectory names is allowed so that
- when it is known that the package and resources are stored on
- the file system then those subdirectory names can be used
- directly.
-
- The abstract method returns an iterable of no items.
-
-
-.. class:: Traversable
-
- An object with a subset of :class:`pathlib.Path` methods suitable for
- traversing directories and opening files.
-
- For a representation of the object on the file-system, use
- :meth:`importlib.resources.as_file`.
-
- .. versionadded:: 3.9
-
- .. deprecated-removed:: 3.12 3.14
- Use :class:`importlib.resources.abc.Traversable` instead.
-
- .. attribute:: name
-
- Abstract. The base name of this object without any parent references.
-
- .. method:: iterdir()
- :abstractmethod:
-
- Yield ``Traversable`` objects in ``self``.
-
- .. method:: is_dir()
- :abstractmethod:
-
- Return ``True`` if ``self`` is a directory.
-
- .. method:: is_file()
- :abstractmethod:
-
- Return ``True`` if ``self`` is a file.
-
- .. method:: joinpath(child)
- :abstractmethod:
-
- Return Traversable child in ``self``.
-
- .. method:: __truediv__(child)
- :abstractmethod:
-
- Return ``Traversable`` child in ``self``.
-
- .. method:: open(mode='r', *args, **kwargs)
- :abstractmethod:
-
- *mode* may be 'r' or 'rb' to open as text or binary. Return a handle
- suitable for reading (same as :attr:`pathlib.Path.open`).
-
- When opening as text, accepts encoding parameters such as those
- accepted by :class:`io.TextIOWrapper`.
-
- .. method:: read_bytes()
-
- Read contents of ``self`` as bytes.
-
- .. method:: read_text(encoding=None)
-
- Read contents of ``self`` as text.
-
-
-.. class:: TraversableResources
-
- An abstract base class for resource readers capable of serving
- the :meth:`importlib.resources.files` interface. Subclasses
- :class:`importlib.resources.abc.ResourceReader` and provides
- concrete implementations of the :class:`importlib.resources.abc.ResourceReader`'s
- abstract methods. Therefore, any loader supplying
- :class:`importlib.abc.TraversableResources` also supplies ResourceReader.
-
- Loaders that wish to support resource reading are expected to
- implement this interface.
-
- .. versionadded:: 3.9
-
- .. deprecated-removed:: 3.12 3.14
- Use :class:`importlib.resources.abc.TraversableResources` instead.
-
- .. method:: files()
- :abstractmethod:
-
- Returns a :class:`importlib.resources.abc.Traversable` object for the loaded
- package.
-
-
-
:mod:`importlib.machinery` -- Importers and path hooks
------------------------------------------------------
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 9e53dd70ab5..5133f9f0c8e 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -524,7 +524,7 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
.. versionchanged:: 3.13
Functions wrapped in :func:`functools.partialmethod` now return ``True``
- if the wrapped function is a :term:`coroutine function`.
+ if the wrapped function is a :term:`asynchronous generator` function.
.. function:: isasyncgen(object)
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index dfebccb5a9c..d1a9132db81 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -720,7 +720,7 @@ than raw I/O does.
contains initial data.
Methods may be used from multiple threads without external locking in
- :term:`free threading` builds.
+ :term:`free-threaded builds `.
:class:`BytesIO` provides or overrides these methods in addition to those
from :class:`BufferedIOBase` and :class:`IOBase`:
diff --git a/Doc/library/msvcrt.rst b/Doc/library/msvcrt.rst
index a2c5e375d2c..80f3ae4ee3f 100644
--- a/Doc/library/msvcrt.rst
+++ b/Doc/library/msvcrt.rst
@@ -7,6 +7,8 @@
.. sectionauthor:: Fred L. Drake, Jr.
+**Source code:** :source:`PC/msvcrtmodule.c`
+
--------------
These functions provide access to some useful capabilities on Windows platforms.
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 88813c6f1a4..b158ee1d42c 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -1234,22 +1234,32 @@ Miscellaneous
.. versionchanged:: 3.11
Accepts a :term:`path-like object`.
-.. function:: set_forkserver_preload(module_names)
+.. function:: set_forkserver_preload(module_names, *, on_error='ignore')
Set a list of module names for the forkserver main process to attempt to
import so that their already imported state is inherited by forked
- processes. Any :exc:`ImportError` when doing so is silently ignored.
- This can be used as a performance enhancement to avoid repeated work
- in every process.
+ processes. This can be used as a performance enhancement to avoid repeated
+ work in every process.
For this to work, it must be called before the forkserver process has been
launched (before creating a :class:`Pool` or starting a :class:`Process`).
+ The *on_error* parameter controls how :exc:`ImportError` exceptions during
+ module preloading are handled: ``"ignore"`` (default) silently ignores
+ failures, ``"warn"`` causes the forkserver subprocess to emit an
+ :exc:`ImportWarning` to stderr, and ``"fail"`` causes the forkserver
+ subprocess to exit with the exception traceback on stderr, making
+ subsequent process creation fail with :exc:`EOFError` or
+ :exc:`ConnectionError`.
+
Only meaningful when using the ``'forkserver'`` start method.
See :ref:`multiprocessing-start-methods`.
.. versionadded:: 3.4
+ .. versionchanged:: next
+ Added the *on_error* parameter.
+
.. function:: set_start_method(method, force=False)
Set the method which should be used to start child processes.
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 31c0964cda0..dad54c0e82b 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -4262,7 +4262,7 @@ features:
import os
# semaphore with start value '1'
- fd = os.eventfd(1, os.EFD_SEMAPHORE | os.EFC_CLOEXEC)
+ fd = os.eventfd(1, os.EFD_SEMAPHORE | os.EFD_CLOEXEC)
try:
# acquire semaphore
v = os.eventfd_read(fd)
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 3a9b66ec7e7..7b0d979d61a 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -56,19 +56,6 @@ files.
The :mod:`pickle` module differs from :mod:`marshal` in several significant ways:
-* The :mod:`pickle` module keeps track of the objects it has already serialized,
- so that later references to the same object won't be serialized again.
- :mod:`marshal` doesn't do this.
-
- This has implications both for recursive objects and object sharing. Recursive
- objects are objects that contain references to themselves. These are not
- handled by marshal, and in fact, attempting to marshal recursive objects will
- crash your Python interpreter. Object sharing happens when there are multiple
- references to the same object in different places in the object hierarchy being
- serialized. :mod:`pickle` stores such objects only once, and ensures that all
- other references point to the master copy. Shared objects remain shared, which
- can be very important for mutable objects.
-
* :mod:`marshal` cannot be used to serialize user-defined classes and their
instances. :mod:`pickle` can save and restore class instances transparently,
however the class definition must be importable and live in the same module as
diff --git a/Doc/library/site.rst b/Doc/library/site.rst
index d93e4dc7c75..ca2ac3b0098 100644
--- a/Doc/library/site.rst
+++ b/Doc/library/site.rst
@@ -34,7 +34,7 @@ For the head part, it uses ``sys.prefix`` and ``sys.exec_prefix``; empty heads
are skipped. For the tail part, it uses the empty string and then
:file:`lib/site-packages` (on Windows) or
:file:`lib/python{X.Y[t]}/site-packages` (on Unix and macOS). (The
-optional suffix "t" indicates the :term:`free threading` build, and is
+optional suffix "t" indicates the :term:`free-threaded build`, and is
appended if ``"t"`` is present in the :data:`sys.abiflags` constant.)
For each
of the distinct head-tail combinations, it sees if it refers to an existing
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 22bc1536c1a..ce0d7cbb2e4 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2562,6 +2562,19 @@ expression support in the :mod:`re` module).
after the separator. If the separator is not found, return a 3-tuple containing
two empty strings, followed by the string itself.
+ For example:
+
+ .. doctest::
+
+ >>> 'Monty Python'.rpartition(' ')
+ ('Monty', ' ', 'Python')
+ >>> "Monty Python's Flying Circus".rpartition(' ')
+ ("Monty Python's Flying", ' ', 'Circus')
+ >>> 'Monty Python'.rpartition('-')
+ ('', '', 'Monty Python')
+
+ See also :meth:`partition`.
+
.. method:: str.rsplit(sep=None, maxsplit=-1)
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index b8dfcc31077..cc4f032fb26 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -803,14 +803,29 @@ Instances of the :class:`Popen` class have the following methods:
.. note::
- When the ``timeout`` parameter is not ``None``, then (on POSIX) the
- function is implemented using a busy loop (non-blocking call and short
- sleeps). Use the :mod:`asyncio` module for an asynchronous wait: see
+ When ``timeout`` is not ``None`` and the platform supports it, an
+ efficient event-driven mechanism is used to wait for process termination:
+
+ - Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`
+ - macOS and other BSD variants use :func:`select.kqueue` +
+ ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``
+ - Windows uses ``WaitForSingleObject``
+
+ If none of these mechanisms are available, the function falls back to a
+ busy loop (non-blocking call and short sleeps).
+
+ .. note::
+
+ Use the :mod:`asyncio` module for an asynchronous wait: see
:class:`asyncio.create_subprocess_exec`.
.. versionchanged:: 3.3
*timeout* was added.
+ .. versionchanged:: 3.15
+ if *timeout* is not ``None``, use efficient event-driven implementation
+ on Linux >= 5.3 and macOS / BSD.
+
.. method:: Popen.communicate(input=None, timeout=None)
Interact with process: Send data to stdin. Read data from stdout and stderr,
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index f5e6f9f8acf..0b722d7d4e3 100644
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -180,6 +180,12 @@ Examining Symbol Tables
Return a tuple containing names of :term:`free (closure) variables `
in this function.
+ .. method:: get_cells()
+
+ Return a tuple containing names of :term:`cell variables ` in this table.
+
+ .. versionadded:: next
+
.. class:: Class
@@ -291,6 +297,12 @@ Examining Symbol Tables
Return ``True`` if the symbol is referenced in its block, but not assigned
to.
+ .. method:: is_cell()
+
+ Return ``True`` if the symbol is referenced but not assigned in a nested block.
+
+ .. versionadded:: next
+
.. method:: is_free_class()
Return *True* if a class-scoped symbol is free from
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index a0621d4b0db..f977f1389b6 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -1997,6 +1997,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only
interpreter is pre-release (alpha, beta, or release candidate) then the
local and remote interpreters must be the same exact version.
+ See :ref:`remote-debugging` for more information about the remote debugging
+ mechanism.
+
.. audit-event:: sys.remote_exec pid script_path
When the code is executed in the remote process, an
@@ -2015,6 +2018,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only
.. availability:: Unix, Windows.
.. versionadded:: 3.14
+ See :pep:`768` for more details.
.. function:: _enablelegacywindowsfsencoding()
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index 81177533be8..07ce8c40577 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -177,12 +177,12 @@ the modern themed widget set and API::
.. attribute:: master
The widget object that contains this widget. For :class:`Tk`, the
- *master* is :const:`None` because it is the main window. The terms
+ :attr:`!master` is :const:`None` because it is the main window. The terms
*master* and *parent* are similar and sometimes used interchangeably
as argument names; however, calling :meth:`winfo_parent` returns a
- string of the widget name whereas :attr:`master` returns the object.
+ string of the widget name whereas :attr:`!master` returns the object.
*parent*/*child* reflects the tree-like relationship while
- *master*/*slave* reflects the container structure.
+ *master* (or *container*)/*content* reflects the container structure.
.. attribute:: children
@@ -638,15 +638,15 @@ The Packer
.. index:: single: packing (widgets)
The packer is one of Tk's geometry-management mechanisms. Geometry managers
-are used to specify the relative positioning of widgets within their container -
-their mutual *master*. In contrast to the more cumbersome *placer* (which is
+are used to specify the relative positioning of widgets within their container.
+In contrast to the more cumbersome *placer* (which is
used less commonly, and we do not cover here), the packer takes qualitative
relationship specification - *above*, *to the left of*, *filling*, etc - and
works everything out to determine the exact placement coordinates for you.
-The size of any *master* widget is determined by the size of the "slave widgets"
-inside. The packer is used to control where slave widgets appear inside the
-master into which they are packed. You can pack widgets into frames, and frames
+The size of any container widget is determined by the size of the "content widgets"
+inside. The packer is used to control where content widgets appear inside the
+container into which they are packed. You can pack widgets into frames, and frames
into other frames, in order to achieve the kind of layout you desire.
Additionally, the arrangement is dynamically adjusted to accommodate incremental
changes to the configuration, once it is packed.
@@ -673,7 +673,7 @@ For more extensive information on the packer and the options that it can take,
see the man pages and page 183 of John Ousterhout's book.
anchor
- Anchor type. Denotes where the packer is to place each slave in its parcel.
+ Anchor type. Denotes where the packer is to place each content in its parcel.
expand
Boolean, ``0`` or ``1``.
@@ -682,10 +682,10 @@ fill
Legal values: ``'x'``, ``'y'``, ``'both'``, ``'none'``.
ipadx and ipady
- A distance - designating internal padding on each side of the slave widget.
+ A distance - designating internal padding on each side of the content.
padx and pady
- A distance - designating external padding on each side of the slave widget.
+ A distance - designating external padding on each side of the content.
side
Legal values are: ``'left'``, ``'right'``, ``'top'``, ``'bottom'``.
@@ -758,8 +758,8 @@ subclassed from the :class:`Wm` class, and so can call the :class:`Wm` methods
directly.
To get at the toplevel window that contains a given widget, you can often just
-refer to the widget's master. Of course if the widget has been packed inside of
-a frame, the master won't represent a toplevel window. To get at the toplevel
+refer to the widget's :attr:`master`. Of course if the widget has been packed inside of
+a frame, the :attr:`!master` won't represent a toplevel window. To get at the toplevel
window that contains an arbitrary widget, you can call the :meth:`_root` method.
This method begins with an underscore to denote the fact that this function is
part of the implementation, and not an interface to Tk functionality.
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 44a9c79cba2..ba6e46858f9 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -50,12 +50,16 @@ URL Parsing
The URL parsing functions focus on splitting a URL string into its components,
or on combining URL components into a URL string.
-.. function:: urlparse(urlstring, scheme='', allow_fragments=True)
+.. function:: urlparse(urlstring, scheme=None, allow_fragments=True, *, missing_as_none=False)
Parse a URL into six components, returning a 6-item :term:`named tuple`. This
corresponds to the general structure of a URL:
``scheme://netloc/path;parameters?query#fragment``.
- Each tuple item is a string, possibly empty. The components are not broken up
+ Each tuple item is a string, possibly empty, or ``None`` if
+ *missing_as_none* is true.
+ Not defined component are represented an empty string (by default) or
+ ``None`` if *missing_as_none* is true.
+ The components are not broken up
into smaller parts (for example, the network location is a single string), and %
escapes are not expanded. The delimiters as shown above are not part of the
result, except for a leading slash in the *path* component, which is retained if
@@ -84,6 +88,12 @@ or on combining URL components into a URL string.
80
>>> o._replace(fragment="").geturl()
'http://docs.python.org:80/3/library/urllib.parse.html?highlight=params'
+ >>> urlparse("http://docs.python.org?")
+ ParseResult(scheme='http', netloc='docs.python.org',
+ path='', params='', query='', fragment='')
+ >>> urlparse("http://docs.python.org?", missing_as_none=True)
+ ParseResult(scheme='http', netloc='docs.python.org',
+ path='', params=None, query='', fragment=None)
Following the syntax specifications in :rfc:`1808`, urlparse recognizes
a netloc only if it is properly introduced by '//'. Otherwise the
@@ -101,47 +111,53 @@ or on combining URL components into a URL string.
ParseResult(scheme='', netloc='', path='www.cwi.nl/%7Eguido/Python.html',
params='', query='', fragment='')
>>> urlparse('help/Python.html')
- ParseResult(scheme='', netloc='', path='help/Python.html', params='',
- query='', fragment='')
+ ParseResult(scheme='', netloc='', path='help/Python.html',
+ params='', query='', fragment='')
+ >>> urlparse('help/Python.html', missing_as_none=True)
+ ParseResult(scheme=None, netloc=None, path='help/Python.html',
+ params=None, query=None, fragment=None)
The *scheme* argument gives the default addressing scheme, to be
used only if the URL does not specify one. It should be the same type
- (text or bytes) as *urlstring*, except that the default value ``''`` is
+ (text or bytes) as *urlstring* or ``None``, except that the ``''`` is
always allowed, and is automatically converted to ``b''`` if appropriate.
If the *allow_fragments* argument is false, fragment identifiers are not
recognized. Instead, they are parsed as part of the path, parameters
- or query component, and :attr:`fragment` is set to the empty string in
- the return value.
+ or query component, and :attr:`fragment` is set to ``None`` or the empty
+ string (depending on the value of *missing_as_none*) in the return value.
The return value is a :term:`named tuple`, which means that its items can
be accessed by index or as named attributes, which are:
- +------------------+-------+-------------------------+------------------------+
- | Attribute | Index | Value | Value if not present |
- +==================+=======+=========================+========================+
- | :attr:`scheme` | 0 | URL scheme specifier | *scheme* parameter |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`netloc` | 1 | Network location part | empty string |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`path` | 2 | Hierarchical path | empty string |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`params` | 3 | Parameters for last | empty string |
- | | | path element | |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`query` | 4 | Query component | empty string |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`fragment` | 5 | Fragment identifier | empty string |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`username` | | User name | :const:`None` |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`password` | | Password | :const:`None` |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`hostname` | | Host name (lower case) | :const:`None` |
- +------------------+-------+-------------------------+------------------------+
- | :attr:`port` | | Port number as integer, | :const:`None` |
- | | | if present | |
- +------------------+-------+-------------------------+------------------------+
+ +------------------+-------+-------------------------+-------------------------------+
+ | Attribute | Index | Value | Value if not present |
+ +==================+=======+=========================+===============================+
+ | :attr:`scheme` | 0 | URL scheme specifier | *scheme* parameter or |
+ | | | | empty string [1]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`netloc` | 1 | Network location part | ``None`` or empty string [1]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`path` | 2 | Hierarchical path | empty string |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`params` | 3 | Parameters for last | ``None`` or empty string [1]_ |
+ | | | path element | |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`query` | 4 | Query component | ``None`` or empty string [1]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`fragment` | 5 | Fragment identifier | ``None`` or empty string [1]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`username` | | User name | ``None`` |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`password` | | Password | ``None`` |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`hostname` | | Host name (lower case) | ``None`` |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`port` | | Port number as integer, | ``None`` |
+ | | | if present | |
+ +------------------+-------+-------------------------+-------------------------------+
+
+ .. [1] Depending on the value of the *missing_as_none* argument.
Reading the :attr:`port` attribute will raise a :exc:`ValueError` if
an invalid port is specified in the URL. See section
@@ -187,12 +203,15 @@ or on combining URL components into a URL string.
.. versionchanged:: 3.6
Out-of-range port numbers now raise :exc:`ValueError`, instead of
- returning :const:`None`.
+ returning ``None``.
.. versionchanged:: 3.8
Characters that affect netloc parsing under NFKC normalization will
now raise :exc:`ValueError`.
+ .. versionchanged:: next
+ Added the *missing_as_none* parameter.
+
.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace', max_num_fields=None, separator='&')
@@ -288,15 +307,27 @@ or on combining URL components into a URL string.
.. function:: urlunparse(parts)
+ urlunparse(parts, *, keep_empty)
Construct a URL from a tuple as returned by ``urlparse()``. The *parts*
- argument can be any six-item iterable. This may result in a slightly
- different, but equivalent URL, if the URL that was parsed originally had
- unnecessary delimiters (for example, a ``?`` with an empty query; the RFC
- states that these are equivalent).
+ argument can be any six-item iterable.
+
+ This may result in a slightly different, but equivalent URL, if the
+ URL that was parsed originally had unnecessary delimiters (for example,
+ a ``?`` with an empty query; the RFC states that these are equivalent).
+
+ If *keep_empty* is true, empty strings are kept in the result (for example,
+ a ``?`` for an empty query), only ``None`` components are omitted.
+ This allows rebuilding a URL that was parsed with option
+ ``missing_as_none=True``.
+ By default, *keep_empty* is true if *parts* is the result of the
+ :func:`urlparse` call with ``missing_as_none=True``.
+
+ .. versionchanged:: next
+ Added the *keep_empty* parameter.
-.. function:: urlsplit(urlstring, scheme='', allow_fragments=True)
+.. function:: urlsplit(urlstring, scheme=None, allow_fragments=True, *, missing_as_none=False)
This is similar to :func:`urlparse`, but does not split the params from the URL.
This should generally be used instead of :func:`urlparse` if the more recent URL
@@ -310,28 +341,31 @@ or on combining URL components into a URL string.
The return value is a :term:`named tuple`, its items can be accessed by index
or as named attributes:
- +------------------+-------+-------------------------+----------------------+
- | Attribute | Index | Value | Value if not present |
- +==================+=======+=========================+======================+
- | :attr:`scheme` | 0 | URL scheme specifier | *scheme* parameter |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`netloc` | 1 | Network location part | empty string |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`path` | 2 | Hierarchical path | empty string |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`query` | 3 | Query component | empty string |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`fragment` | 4 | Fragment identifier | empty string |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`username` | | User name | :const:`None` |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`password` | | Password | :const:`None` |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`hostname` | | Host name (lower case) | :const:`None` |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`port` | | Port number as integer, | :const:`None` |
- | | | if present | |
- +------------------+-------+-------------------------+----------------------+
+ +------------------+-------+-------------------------+-------------------------------+
+ | Attribute | Index | Value | Value if not present |
+ +==================+=======+=========================+===============================+
+ | :attr:`scheme` | 0 | URL scheme specifier | *scheme* parameter or |
+ | | | | empty string [1]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`netloc` | 1 | Network location part | ``None`` or empty string [2]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`path` | 2 | Hierarchical path | empty string |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`query` | 3 | Query component | ``None`` or empty string [2]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`fragment` | 4 | Fragment identifier | ``None`` or empty string [2]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`username` | | User name | ``None`` |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`password` | | Password | ``None`` |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`hostname` | | Host name (lower case) | ``None`` |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`port` | | Port number as integer, | ``None`` |
+ | | | if present | |
+ +------------------+-------+-------------------------+-------------------------------+
+
+ .. [2] Depending on the value of the *missing_as_none* argument.
Reading the :attr:`port` attribute will raise a :exc:`ValueError` if
an invalid port is specified in the URL. See section
@@ -356,7 +390,7 @@ or on combining URL components into a URL string.
.. versionchanged:: 3.6
Out-of-range port numbers now raise :exc:`ValueError`, instead of
- returning :const:`None`.
+ returning ``None``.
.. versionchanged:: 3.8
Characters that affect netloc parsing under NFKC normalization will
@@ -368,15 +402,31 @@ or on combining URL components into a URL string.
.. versionchanged:: 3.12
Leading WHATWG C0 control and space characters are stripped from the URL.
+ .. versionchanged:: next
+ Added the *missing_as_none* parameter.
+
.. _WHATWG spec: https://url.spec.whatwg.org/#concept-basic-url-parser
.. function:: urlunsplit(parts)
+ urlunsplit(parts, *, keep_empty)
Combine the elements of a tuple as returned by :func:`urlsplit` into a
complete URL as a string. The *parts* argument can be any five-item
- iterable. This may result in a slightly different, but equivalent URL, if the
- URL that was parsed originally had unnecessary delimiters (for example, a ?
- with an empty query; the RFC states that these are equivalent).
+ iterable.
+
+ This may result in a slightly different, but equivalent URL, if the
+ URL that was parsed originally had unnecessary delimiters (for example,
+ a ``?`` with an empty query; the RFC states that these are equivalent).
+
+ If *keep_empty* is true, empty strings are kept in the result (for example,
+ a ``?`` for an empty query), only ``None`` components are omitted.
+ This allows rebuilding a URL that was parsed with option
+ ``missing_as_none=True``.
+ By default, *keep_empty* is true if *parts* is the result of the
+ :func:`urlsplit` call with ``missing_as_none=True``.
+
+ .. versionchanged:: next
+ Added the *keep_empty* parameter.
.. function:: urljoin(base, url, allow_fragments=True)
@@ -422,23 +472,25 @@ or on combining URL components into a URL string.
Behavior updated to match the semantics defined in :rfc:`3986`.
-.. function:: urldefrag(url)
+.. function:: urldefrag(url, *, missing_as_none=False)
If *url* contains a fragment identifier, return a modified version of *url*
with no fragment identifier, and the fragment identifier as a separate
string. If there is no fragment identifier in *url*, return *url* unmodified
- and an empty string.
+ and an empty string (by default) or ``None`` if *missing_as_none* is true.
The return value is a :term:`named tuple`, its items can be accessed by index
or as named attributes:
- +------------------+-------+-------------------------+----------------------+
- | Attribute | Index | Value | Value if not present |
- +==================+=======+=========================+======================+
- | :attr:`url` | 0 | URL with no fragment | empty string |
- +------------------+-------+-------------------------+----------------------+
- | :attr:`fragment` | 1 | Fragment identifier | empty string |
- +------------------+-------+-------------------------+----------------------+
+ +------------------+-------+-------------------------+-------------------------------+
+ | Attribute | Index | Value | Value if not present |
+ +==================+=======+=========================+===============================+
+ | :attr:`url` | 0 | URL with no fragment | empty string |
+ +------------------+-------+-------------------------+-------------------------------+
+ | :attr:`fragment` | 1 | Fragment identifier | ``None`` or empty string [3]_ |
+ +------------------+-------+-------------------------+-------------------------------+
+
+ .. [3] Depending on the value of the *missing_as_none* argument.
See section :ref:`urlparse-result-object` for more information on the result
object.
@@ -446,6 +498,9 @@ or on combining URL components into a URL string.
.. versionchanged:: 3.2
Result is a structured object rather than a simple 2-tuple.
+ .. versionchanged:: next
+ Added the *missing_as_none* parameter.
+
.. function:: unwrap(url)
Extract the url from a wrapped URL (that is, a string formatted as
@@ -465,8 +520,9 @@ URLs elsewhere. Their purpose is for practical functionality rather than
purity.
Instead of raising an exception on unusual input, they may instead return some
-component parts as empty strings. Or components may contain more than perhaps
-they should.
+component parts as empty strings or ``None`` (depending on the value of the
+*missing_as_none* argument).
+Or components may contain more than perhaps they should.
We recommend that users of these APIs where the values may be used anywhere
with security implications code defensively. Do some verification within your
@@ -542,7 +598,8 @@ previous section, as well as an additional method:
Return the re-combined version of the original URL as a string. This may
differ from the original URL in that the scheme may be normalized to lower
case and empty components may be dropped. Specifically, empty parameters,
- queries, and fragment identifiers will be removed.
+ queries, and fragment identifiers will be removed unless the URL was parsed
+ with ``missing_as_none=True``.
For :func:`urldefrag` results, only empty fragment identifiers will be removed.
For :func:`urlsplit` and :func:`urlparse` results, all noted changes will be
@@ -559,6 +616,9 @@ previous section, as well as an additional method:
>>> r2 = urlsplit(r1.geturl())
>>> r2.geturl()
'http://www.Python.org/doc/'
+ >>> r3 = urlsplit(url, missing_as_none=True)
+ >>> r3.geturl()
+ 'http://www.Python.org/doc/#'
The following classes provide the implementations of the structured parse
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst
index 89def6e2afe..d167c41ab72 100644
--- a/Doc/library/winreg.rst
+++ b/Doc/library/winreg.rst
@@ -7,6 +7,8 @@
.. sectionauthor:: Mark Hammond
+**Source code:** :source:`PC/winreg.c`
+
--------------
These functions expose the Windows registry API to Python. Instead of using an
@@ -25,7 +27,7 @@ to explicitly close them.
.. _functions:
Functions
-------------------
+---------
This module offers the following functions:
@@ -554,7 +556,7 @@ This module offers the following functions:
.. _constants:
Constants
-------------------
+---------
The following constants are defined for use in many :mod:`winreg` functions.
diff --git a/Doc/library/winsound.rst b/Doc/library/winsound.rst
index 93c0c025982..755b94fc0fb 100644
--- a/Doc/library/winsound.rst
+++ b/Doc/library/winsound.rst
@@ -8,6 +8,8 @@
.. moduleauthor:: Toby Dickenson
.. sectionauthor:: Fred L. Drake, Jr.
+**Source code:** :source:`PC/winsound.c`
+
--------------
The :mod:`winsound` module provides access to the basic sound-playing machinery
@@ -16,6 +18,9 @@ provided by Windows platforms. It includes functions and several constants.
.. availability:: Windows.
+Functions
+---------
+
.. function:: Beep(frequency, duration)
Beep the PC's speaker. The *frequency* parameter specifies frequency, in hertz,
@@ -46,6 +51,9 @@ provided by Windows platforms. It includes functions and several constants.
error, :exc:`RuntimeError` is raised.
+Constants
+---------
+
.. data:: SND_FILENAME
The *sound* parameter is the name of a WAV file. Do not use with
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 1bfe6b7375b..f784d963f9d 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -546,6 +546,7 @@ Special read-only attributes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. index::
+ single: __builtins__ (function attribute)
single: __closure__ (function attribute)
single: __globals__ (function attribute)
pair: global; namespace
@@ -556,6 +557,12 @@ Special read-only attributes
* - Attribute
- Meaning
+ * - .. attribute:: function.__builtins__
+ - A reference to the :class:`dictionary ` that holds the function's
+ builtins namespace.
+
+ .. versionadded:: 3.10
+
* - .. attribute:: function.__globals__
- A reference to the :class:`dictionary ` that holds the function's
:ref:`global variables ` -- the global namespace of the module
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 165dfa69f88..32f2d4596fe 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -266,17 +266,19 @@ called "displays", each of them in two flavors:
Common syntax elements for comprehensions are:
.. productionlist:: python-grammar
- comprehension: `assignment_expression` `comp_for`
+ comprehension: `flexible_expression` `comp_for`
comp_for: ["async"] "for" `target_list` "in" `or_test` [`comp_iter`]
comp_iter: `comp_for` | `comp_if`
comp_if: "if" `or_test` [`comp_iter`]
The comprehension consists of a single expression followed by at least one
-:keyword:`!for` clause and zero or more :keyword:`!for` or :keyword:`!if` clauses.
-In this case, the elements of the new container are those that would be produced
-by considering each of the :keyword:`!for` or :keyword:`!if` clauses a block,
-nesting from left to right, and evaluating the expression to produce an element
-each time the innermost block is reached.
+:keyword:`!for` clause and zero or more :keyword:`!for` or :keyword:`!if`
+clauses. In this case, the elements of the new container are those that would
+be produced by considering each of the :keyword:`!for` or :keyword:`!if`
+clauses a block, nesting from left to right, and evaluating the expression to
+produce an element each time the innermost block is reached. If the expression
+is starred, the result will instead be unpacked to produce zero or more
+elements.
However, aside from the iterable expression in the leftmost :keyword:`!for` clause,
the comprehension is executed in a separate implicitly nested scope. This ensures
@@ -321,6 +323,9 @@ See also :pep:`530`.
asynchronous functions. Outer comprehensions implicitly become
asynchronous.
+.. versionchanged:: next
+ Unpacking with the ``*`` operator is now allowed in the expression.
+
.. _lists:
@@ -396,8 +401,8 @@ enclosed in curly braces:
.. productionlist:: python-grammar
dict_display: "{" [`dict_item_list` | `dict_comprehension`] "}"
dict_item_list: `dict_item` ("," `dict_item`)* [","]
+ dict_comprehension: `dict_item` `comp_for`
dict_item: `expression` ":" `expression` | "**" `or_expr`
- dict_comprehension: `expression` ":" `expression` `comp_for`
A dictionary display yields a new dictionary object.
@@ -419,10 +424,21 @@ earlier dict items and earlier dictionary unpackings.
.. versionadded:: 3.5
Unpacking into dictionary displays, originally proposed by :pep:`448`.
-A dict comprehension, in contrast to list and set comprehensions, needs two
-expressions separated with a colon followed by the usual "for" and "if" clauses.
-When the comprehension is run, the resulting key and value elements are inserted
-in the new dictionary in the order they are produced.
+A dict comprehension may take one of two forms:
+
+- The first form uses two expressions separated with a colon followed by the
+ usual "for" and "if" clauses. When the comprehension is run, the resulting
+ key and value elements are inserted in the new dictionary in the order they
+ are produced.
+
+- The second form uses a single expression prefixed by the ``**`` dictionary
+ unpacking operator followed by the usual "for" and "if" clauses. When the
+ comprehension is evaluated, the expression is evaluated and then unpacked,
+ inserting zero or more key/value pairs into the new dictionary.
+
+Both forms of dictionary comprehension retain the property that if the same key
+is specified multiple times, the associated value in the resulting dictionary
+will be the last one specified.
.. index:: pair: immutable; object
hashable
@@ -439,6 +455,8 @@ prevails.
the key. Starting with 3.8, the key is evaluated before the value, as
proposed by :pep:`572`.
+.. versionchanged:: next
+ Unpacking with the ``**`` operator is now allowed in dictionary comprehensions.
.. _genexpr:
@@ -453,7 +471,7 @@ Generator expressions
A generator expression is a compact generator notation in parentheses:
.. productionlist:: python-grammar
- generator_expression: "(" `expression` `comp_for` ")"
+ generator_expression: "(" `flexible_expression` `comp_for` ")"
A generator expression yields a new generator object. Its syntax is the same as
for comprehensions, except that it is enclosed in parentheses instead of
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 9ab003d5cd3..7ab0b427a6c 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -929,6 +929,25 @@ Examples::
>>> list(data[i] for i in range(len(data)-1, -1, -1))
['f', 'l', 'o', 'g']
+ >>> x = [[1,2,3], [], [4, 5]]
+ >>> g = (*i for i in x)
+ >>> list(g)
+ [1, 2, 3, 4, 5]
+
+In most cases, generator expressions must be wrapped in parentheses. As a
+special case, however, when provided as the sole argument to a function (as in
+the examples involving ``sum``, ``set``, ``max``, and ``list`` above), the
+generator expression does not need to be wrapped in an additional set of
+parentheses. That is to say, the following two pieces of code are semantically
+equivalent::
+
+ >>> f(x for x in y)
+ >>> f((x for x in y))
+
+as are the following::
+
+ >>> f(*x for x in y)
+ >>> f((*x for x in y))
.. rubric:: Footnotes
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index 7e02e74177c..ccad53a5b2d 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -333,6 +333,47 @@ The :func:`zip` function would do a great job for this use case::
See :ref:`tut-unpacking-arguments` for details on the asterisk in this line.
+Unpacking in Lists and List Comprehensions
+------------------------------------------
+
+The section on :ref:`tut-unpacking-arguments` describes the use of ``*`` to
+"unpack" the elements of an iterable object, providing each one seperately as
+an argument to a function. Unpacking can also be used in other contexts, for
+example, when creating lists. When specifying elements of a list, prefixing an
+expression by a ``*`` will unpack the result of that expression, adding each of
+its elements to the list we're creating::
+
+ >>> x = [1, 2, 3]
+ >>> [0, *x, 4, 5, 6]
+ [0, 1, 2, 3, 4, 5, 6]
+
+This only works if the expression following the ``*`` evaluates to an iterable
+object; trying to unpack a non-iterable object will raise an exception::
+
+ >>> x = 1
+ >>> [0, *x, 2, 3, 4]
+ Traceback (most recent call last):
+ File "", line 1, in
+ [0, *x, 2, 3, 4]
+ TypeError: Value after * must be an iterable, not int
+
+Unpacking can also be used in list comprehensions, as a way to build a new list
+representing the concatenation of an arbitrary number of iterables::
+
+ >>> x = [[1, 2, 3], [4, 5, 6], [], [7], [8, 9]]
+ >>> [*element for element in x]
+ [1, 2, 3, 4, 5, 6, 7, 8, 9]
+
+Note that the effect is that each element from ``x`` is unpacked. This works
+for arbitrary iterable objects, not just lists::
+
+ >>> x = [[1, 2, 3], 'cat', {'spam': 'eggs'}]
+ >>> [*element for element in x]
+ [1, 2, 3, 'c', 'a', 't', 'spam']
+
+But if the objects in ``x`` are not iterable, this expression would again raise
+an exception.
+
.. _tut-del:
The :keyword:`!del` statement
@@ -394,7 +435,10 @@ A tuple consists of a number of values separated by commas, for instance::
>>> v = ([1, 2, 3], [3, 2, 1])
>>> v
([1, 2, 3], [3, 2, 1])
-
+ >>> # they support unpacking just like lists:
+ >>> x = [1, 2, 3]
+ >>> 0, *x, 4
+ (0, 1, 2, 3, 4)
As you see, on output tuples are always enclosed in parentheses, so that nested
tuples are interpreted correctly; they may be input with or without surrounding
@@ -480,12 +524,16 @@ Here is a brief demonstration::
{'r', 'd', 'b', 'm', 'z', 'l'}
Similarly to :ref:`list comprehensions `, set comprehensions
-are also supported::
+are also supported, including comprehensions with unpacking::
>>> a = {x for x in 'abracadabra' if x not in 'abc'}
>>> a
{'r', 'd'}
+ >>> fruits = [{'apple', 'avocado', 'apricot'}, {'banana', 'blueberry'}]
+ >>> {*fruit for fruit in fruits}
+ {'blueberry', 'banana', 'avocado', 'apple', 'apricot'}
+
.. _tut-dictionaries:
@@ -563,6 +611,18 @@ arbitrary key and value expressions::
>>> {x: x**2 for x in (2, 4, 6)}
{2: 4, 4: 16, 6: 36}
+And dictionary unpacking (via ``**``) can be used to merge multiple
+dictionaries::
+
+ >>> odds = {i: i**2 for i in (1, 3, 5)}
+ >>> evens = {i: i**2 for i in (2, 4, 6)}
+ >>> {**odds, **evens}
+ {1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36}
+
+ >>> all_values = [odds, evens, {0: 0}]
+ >>> {**i for i in all_values}
+ {1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36, 0: 0}
+
When the keys are simple strings, it is sometimes easier to specify pairs using
keyword arguments::
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index aff165191b7..c97058119ae 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -1087,6 +1087,27 @@ conflict.
It now has no effect if set to an empty string.
+.. envvar:: PYTHON_PYMALLOC_HUGEPAGES
+
+ If set to a non-zero integer, enable huge page support for
+ :ref:`pymalloc ` arenas. Set to ``0`` or unset to disable.
+ Python must be compiled with :option:`--with-pymalloc-hugepages` for this
+ variable to have any effect.
+
+ When enabled, arena allocation uses ``MAP_HUGETLB`` (Linux) or
+ ``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages if
+ huge pages are not available.
+
+ .. warning::
+
+ On Linux, if the huge-page pool is exhausted, page faults โ including
+ copy-on-write faults triggered by :func:`os.fork` โ deliver ``SIGBUS``
+ and kill the process. Only enable this in environments where the
+ huge-page pool is properly sized and fork-safety is not a concern.
+
+ .. versionadded:: next
+
+
.. envvar:: PYTHONLEGACYWINDOWSFSENCODING
If set to a non-empty string, the default :term:`filesystem encoding and
diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst
index af055d35290..50812358a69 100644
--- a/Doc/using/configure.rst
+++ b/Doc/using/configure.rst
@@ -421,7 +421,7 @@ General Options
:no-typesetting:
Enables support for running Python without the :term:`global interpreter
- lock` (GIL): free threading build.
+ lock` (GIL): :term:`free-threaded build`.
Defines the ``Py_GIL_DISABLED`` macro and adds ``"t"`` to
:data:`sys.abiflags`.
@@ -783,6 +783,27 @@ also be used to improve performance.
See also :envvar:`PYTHONMALLOC` environment variable.
+.. option:: --with-pymalloc-hugepages
+
+ Enable huge page support for :ref:`pymalloc ` arenas (disabled by
+ default). When enabled, the arena size on 64-bit platforms is increased to
+ 2 MiB and arena allocation uses ``MAP_HUGETLB`` (Linux) or
+ ``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages.
+
+ Even when compiled with this option, huge pages are **not** used at runtime
+ unless the :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable is set
+ to ``1``. This opt-in is required because huge pages carry risks on Linux:
+ if the huge-page pool is exhausted, page faults (including copy-on-write
+ faults after :func:`os.fork`) deliver ``SIGBUS`` and kill the process.
+
+ The configure script checks that the platform supports ``MAP_HUGETLB``
+ and emits a warning if it is not available.
+
+ On Windows, use the ``--pymalloc-hugepages`` flag with ``build.bat`` or
+ set the ``UsePymallocHugepages`` MSBuild property.
+
+ .. versionadded:: 3.15
+
.. option:: --without-doc-strings
Disable static documentation strings to reduce the memory footprint (enabled
diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst
index a4bc336cc92..d286788e805 100644
--- a/Doc/using/windows.rst
+++ b/Doc/using/windows.rst
@@ -126,9 +126,8 @@ is also an unambiguous ``pymanager`` command. Scripted installs that are
intending to use Python install manager should consider using ``pymanager``, due
to the lower chance of encountering a conflict with existing installs. The only
difference between the two commands is when running without any arguments:
-``py`` will install and launch your default interpreter, while ``pymanager``
-will display help (``pymanager exec ...`` provides equivalent behaviour to
-``py ...``).
+``py`` will launch your default interpreter, while ``pymanager`` will display
+help (``pymanager exec ...`` provides equivalent behaviour to ``py ...``).
Each of these commands also has a windowed version that avoids creating a
console window. These are ``pyw``, ``pythonw`` and ``pymanagerw``. A ``python3``
@@ -187,12 +186,11 @@ that virtual environment. In this scenario, the ``python`` command was likely
already overridden and none of these checks occurred. However, this behaviour
ensures that the ``py`` command can be used interchangeably.
-When you launch either ``python`` or ``py`` but do not have any runtimes
-installed, and the requested version is the default, it will be installed
-automatically and then launched. Otherwise, the requested version will be
-installed if automatic installation is configured (most likely by setting
-``PYTHON_MANAGER_AUTOMATIC_INSTALL`` to ``true``), or if the ``py exec`` or
-``pymanager exec`` forms of the command were used.
+When no runtimes are installed, any launch command will try to install the
+requested version and launch it. However, after any version is installed, only
+the ``py exec ...`` and ``pymanager exec ...`` commands will install if the
+requested version is absent. Other forms of commands will display an error and
+direct you to use ``py install`` first.
Command help
@@ -301,6 +299,14 @@ To launch the runtime, directly execute the main executable (typically
$> py install ... [-t=|--target=]
+The ``py exec`` command will install the requested runtime if it is not already
+present. This is controlled by the ``automatic_install`` configuration
+(:envvar:`PYTHON_MANAGER_AUTOMATIC_INSTALL`), and is enabled by default.
+If no runtimes are available at all, all launch commands will do an automatic
+install if the configuration setting allows. This is to ensure a good experience
+for new users, but should not generally be relied on rather than using the
+``py exec`` command or explicit install commands.
+
.. _pymanager-offline:
@@ -426,9 +432,11 @@ customization.
By default, :file:`%TEMP%`.
* - ``automatic_install``
- - ``PYTHON_MANAGER_AUTOMATIC_INSTALL``
- - True to allow automatic installs when using ``py exec`` to launch.
- Other commands will not automatically install.
+ - .. envvar:: PYTHON_MANAGER_AUTOMATIC_INSTALL
+ - True to allow automatic installs when using ``py exec`` to launch (or
+ ``py`` when no runtimes are installed yet).
+ Other commands will not automatically install, regardless of this
+ setting.
By default, true.
* - ``include_unmanaged``
@@ -777,7 +785,7 @@ Troubleshooting
If your Python install manager does not seem to be working correctly, please
work through these tests and fixes to see if it helps. If not, please report an
-issue at `our bug tracker `_,
+issue at `our bug tracker `_,
including any relevant log files (written to your :file:`%TEMP%` directory by
default).
diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst
index b7a27d5db63..b9178fb794a 100644
--- a/Doc/whatsnew/3.15.rst
+++ b/Doc/whatsnew/3.15.rst
@@ -69,6 +69,8 @@ Summary -- Release highlights
profiling tools `
* :pep:`799`: :ref:`Tachyon: High frequency statistical sampling profiler
profiling tools `
+* :pep:`798`: :ref:`Unpacking in Comprehensions
+ `
* :pep:`686`: :ref:`Python now uses UTF-8 as the default encoding
`
* :pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object
@@ -187,6 +189,45 @@ available output formats, profiling modes, and configuration options.
(Contributed by Pablo Galindo and Lรกszlรณ Kiss Kollรกr in :gh:`135953` and :gh:`138122`.)
+.. _whatsnew315-unpacking-in-comprehensions:
+
+:pep:`798`: Unpacking in Comprehensions
+---------------------------------------
+
+List, set, and dictionary comprehensions, as well as generator expressions, now
+support unpacking with ``*`` and ``**``. This extends the unpacking syntax
+from :pep:`448` to comprehensions, providing a new syntax for combining an
+arbitrary number of iterables or dictionaries into a single flat structure.
+This new syntax is a direct alternative to nested comprehensions,
+:func:`itertools.chain`, and :meth:`itertools.chain.from_iterable`. For
+example::
+
+ >>> lists = [[1, 2], [3, 4], [5]]
+ >>> [*L for L in lists] # equivalent to [x for L in lists for x in L]
+ [1, 2, 3, 4, 5]
+
+ >>> sets = [{1, 2}, {2, 3}, {3, 4}]
+ >>> {*s for s in sets} # equivalent to {x for s in sets for x in s}
+ {1, 2, 3, 4}
+
+ >>> dicts = [{'a': 1}, {'b': 2}, {'a': 3}]
+ >>> {**d for d in dicts} # equivalent to {k: v for d in dicts for k,v in d.items()}
+ {'a': 3, 'b': 2}
+
+Generator expressions can similarly use unpacking to yield values from multiple
+iterables::
+
+ >>> gen = (*L for L in lists) # equivalent to (x for L in lists for x in L)
+ >>> list(gen)
+ [1, 2, 3, 4, 5]
+
+This change also extends to asynchronous generator expressions, such that, for
+example, ``(*a async for a in agen())`` is equivalent to ``(x async for a in
+agen() for x in a)``.
+
+.. seealso:: :pep:`798` for further details.
+
+(Contributed by Adam Hartz in :gh:`143055`.)
.. _whatsnew315-improved-error-messages:
@@ -444,6 +485,8 @@ base64
* Added the *wrapcol* parameter in :func:`~base64.b64encode`.
(Contributed by Serhiy Storchaka in :gh:`143214`.)
+* Added the *ignorechars* parameter in :func:`~base64.b64decode`.
+ (Contributed by Serhiy Storchaka in :gh:`144001`.)
binascii
--------
@@ -451,6 +494,9 @@ binascii
* Added the *wrapcol* parameter in :func:`~binascii.b2a_base64`.
(Contributed by Serhiy Storchaka in :gh:`143214`.)
+* Added the *ignorechars* parameter in :func:`~binascii.a2b_base64`.
+ (Contributed by Serhiy Storchaka in :gh:`144001`.)
+
calendar
--------
@@ -603,8 +649,10 @@ math
mimetypes
---------
+* Add ``application/dicom`` MIME type for ``.dcm`` extension. (Contributed by Benedikt Johannes in :gh:`144217`.)
* Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by John Franey in :gh:`140937`.)
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
+* Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)
* Rename ``application/x-texinfo`` to ``application/texinfo``.
(Contributed by Charlie Lin in :gh:`140165`.)
* Changed the MIME type for ``.ai`` files to ``application/pdf``.
@@ -736,6 +784,27 @@ ssl
(Contributed by Ron Frederick in :gh:`138252`.)
+subprocess
+----------
+
+* :meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None`` and the
+ platform supports it, an efficient event-driven mechanism is used to wait for
+ process termination:
+
+ - Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`.
+ - macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``.
+ - Windows keeps using ``WaitForSingleObject`` (unchanged).
+
+ If none of these mechanisms are available, the function falls back to the
+ traditional busy loop (non-blocking call and short sleeps).
+ (Contributed by Giampaolo Rodola in :gh:`83069`).
+
+symtable
+--------
+
+* Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` methods.
+ (Contributed by Yashp002 in :gh:`143504`.)
+
sys
---
@@ -792,6 +861,12 @@ tkinter
using Tcl's ``-all`` and ``-overlap`` options.
(Contributed by Rihaan Meher in :gh:`130848`)
+* Added new methods :meth:`!pack_content`, :meth:`!place_content` and
+ :meth:`!grid_content` which use Tk commands with new names (introduced
+ in Tk 8.6) instead of :meth:`!*_slaves` methods which use Tk commands
+ with outdated names.
+ (Contributed by Serhiy Storchaka in :gh:`143754`)
+
types
------
@@ -830,6 +905,18 @@ unittest
(Contributed by Garry Cairns in :gh:`134567`.)
+urllib.parse
+------------
+
+* Add the *missing_as_none* parameter to :func:`~urllib.parse.urlparse`,
+ :func:`~urllib.parse.urlsplit` and :func:`~urllib.parse.urldefrag` functions.
+ Add the *keep_empty* parameter to :func:`~urllib.parse.urlunparse` and
+ :func:`~urllib.parse.urlunsplit` functions.
+ This allows to distinguish between empty and not defined URI components
+ and preserve empty components.
+ (Contributed by Serhiy Storchaka in :gh:`67041`.)
+
+
venv
----
@@ -1143,6 +1230,15 @@ Deprecated
New deprecations
----------------
+* :mod:`base64`:
+
+ * Accepting the ``+`` and ``/`` characters with an alternative alphabet in
+ :func:`~base64.b64decode` and :func:`~base64.urlsafe_b64decode` is now
+ deprecated.
+ In future Python versions they will be errors in the strict mode and
+ discarded in the non-strict mode.
+ (Contributed by Serhiy Storchaka in :gh:`125346`.)
+
* CLI:
* Deprecate :option:`-b` and :option:`!-bb` command-line options
@@ -1422,6 +1518,14 @@ Build changes
modules that are missing or packaged separately.
(Contributed by Stan Ulbrych and Petr Viktorin in :gh:`139707`.)
+* The new configure option :option:`--with-pymalloc-hugepages` enables huge
+ page support for :ref:`pymalloc ` arenas. When enabled, arena size
+ increases to 2 MiB and allocation uses ``MAP_HUGETLB`` (Linux) or
+ ``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages.
+ On Windows, use ``build.bat --pymalloc-hugepages``.
+ At runtime, huge pages must be explicitly enabled by setting the
+ :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable to ``1``.
+
* Annotating anonymous mmap usage is now supported if Linux kernel supports
:manpage:`PR_SET_VMA_ANON_NAME ` (Linux 5.17 or newer).
Annotations are visible in ``/proc//maps`` if the kernel supports the feature
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 32ca965b7d0..5dd47cdac96 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -604,7 +604,7 @@ new ABC for access to, opening, and reading *resources* inside packages.
Resources are roughly similar to files inside packages, but they needn't
be actual files on the physical file system. Module loaders can provide a
:meth:`!get_resource_reader` function which returns
-a :class:`importlib.abc.ResourceReader` instance to support this
+a :class:`!importlib.abc.ResourceReader` instance to support this
new API. Built-in file path loaders and zip file loaders both support this.
Contributed by Barry Warsaw and Brett Cannon in :issue:`32248`.
@@ -1043,7 +1043,7 @@ window are shown and hidden in the Options menu.
importlib
---------
-The :class:`importlib.abc.ResourceReader` ABC was introduced to
+The :class:`!importlib.abc.ResourceReader` ABC was introduced to
support the loading of resources from packages. See also
:ref:`whatsnew37_importlib_resources`.
(Contributed by Barry Warsaw, Brett Cannon in :issue:`32248`.)
@@ -2032,7 +2032,7 @@ both deprecated in Python 3.4 now emit :exc:`DeprecationWarning`.
(Contributed by Matthias Bussonnier in :issue:`29576`.)
The :class:`importlib.abc.ResourceLoader` ABC has been deprecated in
-favour of :class:`importlib.abc.ResourceReader`.
+favour of :class:`!importlib.abc.ResourceReader`.
locale
diff --git a/Grammar/python.gram b/Grammar/python.gram
index 110136af81b..9698d6e2010 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -709,12 +709,16 @@ expressions[expr_ty]:
| expression
expression[expr_ty] (memo):
+ | invalid_if_expression
| invalid_expression
| invalid_legacy_expression
- | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }
+ | if_expression
| disjunction
| lambdef
+if_expression[expr_ty]:
+ | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }
+
yield_expr[expr_ty]:
| 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }
| 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }
@@ -731,10 +735,16 @@ star_expression[expr_ty] (memo):
star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression+ [','] { a }
+star_named_expressions_sequence[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression_sequence+ [','] { a }
+
star_named_expression[expr_ty]:
| '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }
| named_expression
+star_named_expression_sequence[expr_ty]:
+ | invalid_starred_expression_unpacking_sequence
+ | star_named_expression
+
assignment_expression[expr_ty]:
| a=NAME ':=' ~ b=expression {
CHECK_VERSION(expr_ty, 8, "Assignment expressions are",
@@ -882,9 +892,9 @@ atom[expr_ty]:
| 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }
| &(STRING|FSTRING_START|TSTRING_START) strings
| NUMBER
- | &'(' (tuple | group | genexp)
- | &'[' (list | listcomp)
- | &'{' (dict | set | dictcomp | setcomp)
+ | &'(' (genexp | tuple | group)
+ | &'[' (listcomp | list)
+ | &'{' (dictcomp | setcomp | dict | set)
| '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }
group[expr_ty]:
@@ -998,13 +1008,13 @@ strings[expr_ty] (memo):
| a[asdl_expr_seq*]=tstring+ { _PyPegen_concatenate_tstrings(p, a, EXTRA) }
list[expr_ty]:
- | '[' a=[star_named_expressions] ']' { _PyAST_List(a, Load, EXTRA) }
+ | '[' a=[star_named_expressions_sequence] ']' { _PyAST_List(a, Load, EXTRA) }
tuple[expr_ty]:
- | '(' a=[y=star_named_expression ',' z=[star_named_expressions] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {
+ | '(' a=[y=star_named_expression_sequence ',' z=[star_named_expressions_sequence] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {
_PyAST_Tuple(a, Load, EXTRA) }
-set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }
+set[expr_ty]: '{' a=star_named_expressions_sequence '}' { _PyAST_Set(a, EXTRA) }
# Dicts
# -----
@@ -1040,20 +1050,20 @@ for_if_clause[comprehension_ty]:
| invalid_for_target
listcomp[expr_ty]:
- | '[' a=named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }
+ | '[' a=star_named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }
| invalid_comprehension
setcomp[expr_ty]:
- | '{' a=named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }
+ | '{' a=star_named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }
| invalid_comprehension
genexp[expr_ty]:
- | '(' a=( assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
+ | '(' a=( assignment_expression | expression !':=' | starred_expression ) b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
| invalid_comprehension
dictcomp[expr_ty]:
| '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }
- | invalid_dict_comprehension
+ | '{' '**' a=expression b=for_if_clauses '}' { _PyAST_DictComp(a, NULL, b, EXTRA) }
# FUNCTION CALL ARGUMENTS
# =======================
@@ -1262,6 +1272,12 @@ invalid_expression:
| a='lambda' [lambda_params] b=':' &TSTRING_MIDDLE {
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "t-string: lambda expressions are not allowed without parentheses") }
+invalid_if_expression:
+ | disjunction 'if' b=disjunction 'else' a='*' {
+ RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot unpack only part of a conditional expression") }
+ | disjunction 'if' b=disjunction 'else' a='**' {
+ RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use dict unpacking on only part of a conditional expression") }
+
invalid_named_expression(memo):
| a=expression ':=' expression {
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(
@@ -1326,16 +1342,15 @@ invalid_assert_stmt:
invalid_block:
| NEWLINE !INDENT { RAISE_INDENTATION_ERROR("expected an indented block") }
invalid_comprehension:
- | ('[' | '(' | '{') a=starred_expression for_if_clauses {
- RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "iterable unpacking cannot be used in comprehension") }
+ | '[' a='**' b=expression for_if_clauses {
+ RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot use dict unpacking in list comprehension") }
+ | '(' a='**' b=expression for_if_clauses {
+ RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot use dict unpacking in generator expression") }
| ('[' | '{') a=star_named_expression ',' b=star_named_expressions for_if_clauses {
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, PyPegen_last_item(b, expr_ty),
"did you forget parentheses around the comprehension target?") }
| ('[' | '{') a=star_named_expression b=',' for_if_clauses {
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "did you forget parentheses around the comprehension target?") }
-invalid_dict_comprehension:
- | '{' a='**' bitwise_or for_if_clauses '}' {
- RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "dict unpacking cannot be used in dict comprehension") }
invalid_parameters:
| a="/" ',' {
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "at least one parameter must precede /") }
@@ -1530,19 +1545,32 @@ invalid_class_def_raw:
RAISE_INDENTATION_ERROR("expected an indented block after class definition on line %d", a->lineno) }
invalid_double_starred_kvpairs:
- | ','.double_starred_kvpair+ ',' invalid_kvpair
- | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, "cannot use a starred expression in a dictionary value") }
+ | invalid_kvpair_unpacking [',']
+ | ','.double_starred_kvpair+ ',' (invalid_kvpair | invalid_kvpair_unpacking)
| expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "expression expected after dictionary key and ':'") }
+invalid_kvpair_unpacking:
+ | a='**' b=if_expression {
+ RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "invalid double starred expression. Did you forget to wrap the conditional expression in parentheses?") }
+ | a='*' b=bitwise_or ':' expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot use a starred expression in a dictionary key") }
+ | a='**' b=bitwise_or ':' expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot use dict unpacking in a dictionary key") }
+ | expression ':' a='*' b=bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot use a starred expression in a dictionary value") }
+ | expression ':' a='**' b=bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot use dict unpacking in a dictionary value") }
invalid_kvpair:
| a=expression !(':') {
RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, a->end_lineno, -1, "':' expected after dictionary key") }
| expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, "cannot use a starred expression in a dictionary value") }
+ | expression ':' a='**' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, "cannot use dict unpacking in a dictionary value") }
| expression a=':' &('}'|',') {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "expression expected after dictionary key and ':'") }
invalid_starred_expression_unpacking:
+ | a='*' b=if_expression {
+ RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "invalid starred expression. Did you forget to wrap the conditional expression in parentheses?") }
| a='*' expression '=' b=expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "cannot assign to iterable argument unpacking") }
+invalid_starred_expression_unpacking_sequence:
+ | a='**' bitwise_or {
+ RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use dict unpacking here") }
+ | invalid_starred_expression_unpacking
invalid_starred_expression:
| '*' { RAISE_SYNTAX_ERROR("Invalid star expression") }
-
invalid_fstring_replacement_field:
| '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "f-string: valid expression required before '='") }
| '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "f-string: valid expression required before '!'") }
diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h
index 1c979d91a40..5606ebeb7c9 100644
--- a/Include/cpython/initconfig.h
+++ b/Include/cpython/initconfig.h
@@ -149,6 +149,7 @@ typedef struct PyConfig {
int dump_refs;
wchar_t *dump_refs_file;
int malloc_stats;
+ int pymalloc_hugepages;
wchar_t *filesystem_encoding;
wchar_t *filesystem_errors;
wchar_t *pycache_prefix;
diff --git a/Include/cpython/longintrepr.h b/Include/cpython/longintrepr.h
index 4b6f97a5e47..804c1e9427e 100644
--- a/Include/cpython/longintrepr.h
+++ b/Include/cpython/longintrepr.h
@@ -138,45 +138,6 @@ _PyLong_CompactValue(const PyLongObject *op)
#define PyUnstable_Long_CompactValue _PyLong_CompactValue
-
-/* --- Import/Export API -------------------------------------------------- */
-
-typedef struct PyLongLayout {
- uint8_t bits_per_digit;
- uint8_t digit_size;
- int8_t digits_order;
- int8_t digit_endianness;
-} PyLongLayout;
-
-PyAPI_FUNC(const PyLongLayout*) PyLong_GetNativeLayout(void);
-
-typedef struct PyLongExport {
- int64_t value;
- uint8_t negative;
- Py_ssize_t ndigits;
- const void *digits;
- // Member used internally, must not be used for other purpose.
- Py_uintptr_t _reserved;
-} PyLongExport;
-
-PyAPI_FUNC(int) PyLong_Export(
- PyObject *obj,
- PyLongExport *export_long);
-PyAPI_FUNC(void) PyLong_FreeExport(
- PyLongExport *export_long);
-
-
-/* --- PyLongWriter API --------------------------------------------------- */
-
-typedef struct PyLongWriter PyLongWriter;
-
-PyAPI_FUNC(PyLongWriter*) PyLongWriter_Create(
- int negative,
- Py_ssize_t ndigits,
- void **digits);
-PyAPI_FUNC(PyObject*) PyLongWriter_Finish(PyLongWriter *writer);
-PyAPI_FUNC(void) PyLongWriter_Discard(PyLongWriter *writer);
-
#ifdef __cplusplus
}
#endif
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index bd3f4f38e5a..efae3b38654 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -292,17 +292,7 @@ extern int _PyCode_SafeAddr2Line(PyCodeObject *co, int addr);
extern void _PyCode_Clear_Executors(PyCodeObject *code);
-#ifdef Py_GIL_DISABLED
-// gh-115999 tracks progress on addressing this.
-#define ENABLE_SPECIALIZATION 0
-// Use this to enable specialization families once they are thread-safe. All
-// uses will be replaced with ENABLE_SPECIALIZATION once all families are
-// thread-safe.
-#define ENABLE_SPECIALIZATION_FT 1
-#else
#define ENABLE_SPECIALIZATION 1
-#define ENABLE_SPECIALIZATION_FT ENABLE_SPECIALIZATION
-#endif
/* Specialization functions, these are exported only for other re-generated
* interpreters to call */
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h
index 8c410e9e208..50908f2cb7a 100644
--- a/Include/internal/pycore_frame.h
+++ b/Include/internal/pycore_frame.h
@@ -44,15 +44,16 @@ extern PyFrameObject* _PyFrame_New_NoTrack(PyCodeObject *code);
/* other API */
typedef enum _framestate {
- FRAME_CREATED = -3,
- FRAME_SUSPENDED = -2,
- FRAME_SUSPENDED_YIELD_FROM = -1,
+ FRAME_CREATED = -4,
+ FRAME_SUSPENDED = -3,
+ FRAME_SUSPENDED_YIELD_FROM = -2,
+ FRAME_SUSPENDED_YIELD_FROM_LOCKED = -1,
FRAME_EXECUTING = 0,
FRAME_COMPLETED = 1,
FRAME_CLEARED = 4
} PyFrameState;
-#define FRAME_STATE_SUSPENDED(S) ((S) == FRAME_SUSPENDED || (S) == FRAME_SUSPENDED_YIELD_FROM)
+#define FRAME_STATE_SUSPENDED(S) ((S) >= FRAME_SUSPENDED && (S) <= FRAME_SUSPENDED_YIELD_FROM_LOCKED)
#define FRAME_STATE_FINISHED(S) ((S) >= FRAME_COMPLETED)
#ifdef __cplusplus
diff --git a/Include/internal/pycore_global_objects_fini_generated.h b/Include/internal/pycore_global_objects_fini_generated.h
index 4a5b2a92541..fc297a2933a 100644
--- a/Include/internal/pycore_global_objects_fini_generated.h
+++ b/Include/internal/pycore_global_objects_fini_generated.h
@@ -1797,6 +1797,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(ident));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(identity_hint));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(ignore));
+ _PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(ignorechars));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(imag));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(implieslink));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(importlib));
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h
index 7c2f44ef6db..563ccd7cf6d 100644
--- a/Include/internal/pycore_global_strings.h
+++ b/Include/internal/pycore_global_strings.h
@@ -520,6 +520,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(ident)
STRUCT_FOR_ID(identity_hint)
STRUCT_FOR_ID(ignore)
+ STRUCT_FOR_ID(ignorechars)
STRUCT_FOR_ID(imag)
STRUCT_FOR_ID(implieslink)
STRUCT_FOR_ID(importlib)
diff --git a/Include/internal/pycore_interp_structs.h b/Include/internal/pycore_interp_structs.h
index f11448b0669..723657e4cef 100644
--- a/Include/internal/pycore_interp_structs.h
+++ b/Include/internal/pycore_interp_structs.h
@@ -411,6 +411,7 @@ typedef struct _PyOptimizationConfig {
// Optimization flags
bool specialization_enabled;
+ bool uops_optimize_enabled;
} _PyOptimizationConfig;
struct
diff --git a/Include/internal/pycore_jit.h b/Include/internal/pycore_jit.h
index 89d5bb53643..70bccce4166 100644
--- a/Include/internal/pycore_jit.h
+++ b/Include/internal/pycore_jit.h
@@ -26,6 +26,7 @@ typedef _Py_CODEUNIT *(*jit_func)(
int _PyJIT_Compile(_PyExecutorObject *executor, const _PyUOpInstruction *trace, size_t length);
void _PyJIT_Free(_PyExecutorObject *executor);
void _PyJIT_Fini(void);
+PyAPI_FUNC(int) _PyJIT_AddressInJitCode(PyInterpreterState *interp, uintptr_t addr);
#endif // _Py_JIT
diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h
index c4e007e744c..e31d8b4e5c6 100644
--- a/Include/internal/pycore_lock.h
+++ b/Include/internal/pycore_lock.h
@@ -70,6 +70,9 @@ PyMutex_LockFlags(PyMutex *m, _PyLockFlags flags)
// error messages) otherwise returns 0.
extern int _PyMutex_TryUnlock(PyMutex *m);
+// Yield the processor to other threads (e.g., sched_yield).
+extern void _Py_yield(void);
+
// PyEvent is a one-time event notification
typedef struct {
diff --git a/Include/internal/pycore_obmalloc.h b/Include/internal/pycore_obmalloc.h
index a7ba8f34073..0b23bb48dd5 100644
--- a/Include/internal/pycore_obmalloc.h
+++ b/Include/internal/pycore_obmalloc.h
@@ -208,7 +208,11 @@ typedef unsigned int pymem_uint; /* assuming >= 16 bits */
* mappings to reduce heap fragmentation.
*/
#ifdef USE_LARGE_ARENAS
-#define ARENA_BITS 20 /* 1 MiB */
+# ifdef PYMALLOC_USE_HUGEPAGES
+# define ARENA_BITS 21 /* 2 MiB */
+# else
+# define ARENA_BITS 20 /* 1 MiB */
+# endif
#else
#define ARENA_BITS 18 /* 256 KiB */
#endif
@@ -469,7 +473,7 @@ nfp free pools in usable_arenas.
*/
/* How many arena_objects do we initially allocate?
- * 16 = can allocate 16 arenas = 16 * ARENA_SIZE = 4MB before growing the
+ * 16 = can allocate 16 arenas = 16 * ARENA_SIZE before growing the
* `arenas` vector.
*/
#define INITIAL_ARENA_OBJECTS 16
@@ -512,7 +516,11 @@ struct _obmalloc_mgmt {
memory address bit allocation for keys
- 64-bit pointers, IGNORE_BITS=0 and 2^20 arena size:
+ ARENA_BITS is configurable: 20 (1 MiB) by default on 64-bit, or
+ 21 (2 MiB) when PYMALLOC_USE_HUGEPAGES is enabled. All bit widths
+ below are derived from ARENA_BITS automatically.
+
+ 64-bit pointers, IGNORE_BITS=0 and 2^20 arena size (default):
15 -> MAP_TOP_BITS
15 -> MAP_MID_BITS
14 -> MAP_BOT_BITS
@@ -520,6 +528,14 @@ struct _obmalloc_mgmt {
----
64
+ 64-bit pointers, IGNORE_BITS=0 and 2^21 arena size (hugepages):
+ 15 -> MAP_TOP_BITS
+ 15 -> MAP_MID_BITS
+ 13 -> MAP_BOT_BITS
+ 21 -> ideal aligned arena
+ ----
+ 64
+
64-bit pointers, IGNORE_BITS=16, and 2^20 arena size:
16 -> IGNORE_BITS
10 -> MAP_TOP_BITS
diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index e3f7f5a6f0b..db28839a860 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -1050,6 +1050,7 @@ enum InstructionFormat {
#define HAS_PERIODIC_FLAG (32768)
#define HAS_UNPREDICTABLE_JUMP_FLAG (65536)
#define HAS_NEEDS_GUARD_IP_FLAG (131072)
+#define HAS_RECORDS_VALUE_FLAG (262144)
#define OPCODE_HAS_ARG(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_ARG_FLAG))
#define OPCODE_HAS_CONST(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_CONST_FLAG))
#define OPCODE_HAS_NAME(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_NAME_FLAG))
@@ -1068,6 +1069,7 @@ enum InstructionFormat {
#define OPCODE_HAS_PERIODIC(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_PERIODIC_FLAG))
#define OPCODE_HAS_UNPREDICTABLE_JUMP(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_UNPREDICTABLE_JUMP_FLAG))
#define OPCODE_HAS_NEEDS_GUARD_IP(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_NEEDS_GUARD_IP_FLAG))
+#define OPCODE_HAS_RECORDS_VALUE(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_RECORDS_VALUE_FLAG))
#define OPARG_SIMPLE 0
#define OPARG_CACHE_1 1
@@ -1094,12 +1096,12 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[BINARY_OP_ADD_FLOAT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG },
[BINARY_OP_ADD_INT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG },
[BINARY_OP_ADD_UNICODE] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG },
- [BINARY_OP_EXTEND] = { true, INSTR_FMT_IXC0000, HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG },
+ [BINARY_OP_EXTEND] = { true, INSTR_FMT_IXC0000, HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[BINARY_OP_INPLACE_ADD_UNICODE] = { true, INSTR_FMT_IXC0000, HAS_LOCAL_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[BINARY_OP_MULTIPLY_FLOAT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG },
[BINARY_OP_MULTIPLY_INT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG },
[BINARY_OP_SUBSCR_DICT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
- [BINARY_OP_SUBSCR_GETITEM] = { true, INSTR_FMT_IXC0000, HAS_DEOPT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
+ [BINARY_OP_SUBSCR_GETITEM] = { true, INSTR_FMT_IXC0000, HAS_DEOPT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
[BINARY_OP_SUBSCR_LIST_INT] = { true, INSTR_FMT_IXC0000, HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
[BINARY_OP_SUBSCR_LIST_SLICE] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[BINARY_OP_SUBSCR_STR_INT] = { true, INSTR_FMT_IXC0000, HAS_DEOPT_FLAG | HAS_EXIT_FLAG },
@@ -1118,15 +1120,15 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[BUILD_TUPLE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG },
[CACHE] = { true, INSTR_FMT_IX, 0 },
[CALL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [CALL_ALLOC_AND_ENTER_INIT] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [CALL_BOUND_METHOD_EXACT_ARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [CALL_BOUND_METHOD_GENERAL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [CALL_BUILTIN_CLASS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_BUILTIN_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_BUILTIN_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
+ [CALL_ALLOC_AND_ENTER_INIT] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_BOUND_METHOD_EXACT_ARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_BOUND_METHOD_GENERAL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_BUILTIN_CLASS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_BUILTIN_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_BUILTIN_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
[CALL_EX_NON_PY_GENERAL] = { true, INSTR_FMT_IXC, HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
- [CALL_EX_PY] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
+ [CALL_EX_PY] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
[CALL_FUNCTION_EX] = { true, INSTR_FMT_IXC, HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
[CALL_INTRINSIC_1] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[CALL_INTRINSIC_2] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
@@ -1138,12 +1140,12 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[CALL_LEN] = { true, INSTR_FMT_IXC00, HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[CALL_LIST_APPEND] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[CALL_METHOD_DESCRIPTOR_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_METHOD_DESCRIPTOR_NOARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_METHOD_DESCRIPTOR_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
- [CALL_NON_PY_GENERAL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [CALL_PY_EXACT_ARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [CALL_PY_GENERAL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
+ [CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_METHOD_DESCRIPTOR_NOARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_METHOD_DESCRIPTOR_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_NON_PY_GENERAL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_PY_EXACT_ARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [CALL_PY_GENERAL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
[CALL_STR_1] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[CALL_TUPLE_1] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[CALL_TYPE_1] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG },
@@ -1177,7 +1179,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[FORMAT_SIMPLE] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[FORMAT_WITH_SPEC] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[FOR_ITER] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG | HAS_UNPREDICTABLE_JUMP_FLAG },
- [FOR_ITER_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
+ [FOR_ITER_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
[FOR_ITER_LIST] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_UNPREDICTABLE_JUMP_FLAG },
[FOR_ITER_RANGE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_UNPREDICTABLE_JUMP_FLAG },
[FOR_ITER_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_EXIT_FLAG | HAS_UNPREDICTABLE_JUMP_FLAG },
@@ -1221,18 +1223,18 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[LIST_EXTEND] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[LOAD_ATTR] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[LOAD_ATTR_CLASS] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [LOAD_ATTR_CLASS_WITH_METACLASS_CHECK] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
+ [LOAD_ATTR_CLASS_WITH_METACLASS_CHECK] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
[LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [LOAD_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [LOAD_ATTR_METHOD_LAZY_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG },
- [LOAD_ATTR_METHOD_NO_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG },
- [LOAD_ATTR_METHOD_WITH_VALUES] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG },
+ [LOAD_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_METHOD_LAZY_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_METHOD_NO_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_METHOD_WITH_VALUES] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_RECORDS_VALUE_FLAG },
[LOAD_ATTR_MODULE] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG },
- [LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [LOAD_ATTR_PROPERTY] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [LOAD_ATTR_SLOT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [LOAD_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
+ [LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_PROPERTY] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_SLOT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [LOAD_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
[LOAD_BUILD_CLASS] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[LOAD_COMMON_CONSTANT] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
[LOAD_CONST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_CONST_FLAG },
@@ -1278,8 +1280,8 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[RESERVED] = { true, INSTR_FMT_IX, 0 },
[RESUME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[RESUME_CHECK] = { true, INSTR_FMT_IX, HAS_DEOPT_FLAG },
- [RETURN_GENERATOR] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
- [RETURN_VALUE] = { true, INSTR_FMT_IX, HAS_ESCAPES_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
+ [RETURN_GENERATOR] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [RETURN_VALUE] = { true, INSTR_FMT_IX, HAS_ESCAPES_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
[SEND] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG | HAS_SYNC_SP_FLAG | HAS_UNPREDICTABLE_JUMP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
[SEND_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_SYNC_SP_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
[SETUP_ANNOTATIONS] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
@@ -1288,8 +1290,8 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[SET_UPDATE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[STORE_ATTR] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[STORE_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IXC000, HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [STORE_ATTR_SLOT] = { true, INSTR_FMT_IXC000, HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
- [STORE_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
+ [STORE_ATTR_SLOT] = { true, INSTR_FMT_IXC000, HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
+ [STORE_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
[STORE_DEREF] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_FREE_FLAG | HAS_ESCAPES_FLAG },
[STORE_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ESCAPES_FLAG },
[STORE_FAST_LOAD_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ESCAPES_FLAG },
@@ -1302,7 +1304,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[STORE_SUBSCR_LIST_INT] = { true, INSTR_FMT_IXC, HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
[SWAP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_PURE_FLAG },
[TO_BOOL] = { true, INSTR_FMT_IXC00, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [TO_BOOL_ALWAYS_TRUE] = { true, INSTR_FMT_IXC00, HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
+ [TO_BOOL_ALWAYS_TRUE] = { true, INSTR_FMT_IXC00, HAS_EXIT_FLAG | HAS_ESCAPES_FLAG | HAS_RECORDS_VALUE_FLAG },
[TO_BOOL_BOOL] = { true, INSTR_FMT_IXC00, HAS_EXIT_FLAG },
[TO_BOOL_INT] = { true, INSTR_FMT_IXC00, HAS_EXIT_FLAG },
[TO_BOOL_LIST] = { true, INSTR_FMT_IXC00, HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
@@ -1318,7 +1320,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
[UNPACK_SEQUENCE_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
[UNPACK_SEQUENCE_TWO_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
[WITH_EXCEPT_START] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NEEDS_GUARD_IP_FLAG },
+ [YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NEEDS_GUARD_IP_FLAG | HAS_RECORDS_VALUE_FLAG },
[ANNOTATIONS_PLACEHOLDER] = { true, -1, HAS_PURE_FLAG },
[JUMP] = { true, -1, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[JUMP_IF_FALSE] = { true, -1, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
@@ -1333,7 +1335,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = {
};
#endif
-#define MAX_UOP_PER_EXPANSION 10
+#define MAX_UOP_PER_EXPANSION 11
struct opcode_macro_expansion {
int nuops;
struct { int16_t uop; int8_t size; int8_t offset; } uops[MAX_UOP_PER_EXPANSION];
@@ -1343,16 +1345,16 @@ extern const struct opcode_macro_expansion _PyOpcode_macro_expansion[256];
#ifdef NEED_OPCODE_METADATA
const struct opcode_macro_expansion
_PyOpcode_macro_expansion[256] = {
- [BINARY_OP] = { .nuops = 1, .uops = { { _BINARY_OP, OPARG_SIMPLE, 4 } } },
+ [BINARY_OP] = { .nuops = 3, .uops = { { _BINARY_OP, OPARG_SIMPLE, 4 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _POP_TOP, OPARG_SIMPLE, 4 } } },
[BINARY_OP_ADD_FLOAT] = { .nuops = 5, .uops = { { _GUARD_TOS_FLOAT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_FLOAT, OPARG_SIMPLE, 0 }, { _BINARY_OP_ADD_FLOAT, OPARG_SIMPLE, 5 }, { _POP_TOP_FLOAT, OPARG_SIMPLE, 5 }, { _POP_TOP_FLOAT, OPARG_SIMPLE, 5 } } },
[BINARY_OP_ADD_INT] = { .nuops = 5, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_INT, OPARG_SIMPLE, 0 }, { _BINARY_OP_ADD_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_INT, OPARG_SIMPLE, 5 } } },
[BINARY_OP_ADD_UNICODE] = { .nuops = 5, .uops = { { _GUARD_TOS_UNICODE, OPARG_SIMPLE, 0 }, { _GUARD_NOS_UNICODE, OPARG_SIMPLE, 0 }, { _BINARY_OP_ADD_UNICODE, OPARG_SIMPLE, 5 }, { _POP_TOP_UNICODE, OPARG_SIMPLE, 5 }, { _POP_TOP_UNICODE, OPARG_SIMPLE, 5 } } },
- [BINARY_OP_EXTEND] = { .nuops = 2, .uops = { { _GUARD_BINARY_OP_EXTEND, 4, 1 }, { _BINARY_OP_EXTEND, 4, 1 } } },
+ [BINARY_OP_EXTEND] = { .nuops = 4, .uops = { { _GUARD_BINARY_OP_EXTEND, 4, 1 }, { _BINARY_OP_EXTEND, 4, 1 }, { _POP_TOP, OPARG_SIMPLE, 5 }, { _POP_TOP, OPARG_SIMPLE, 5 } } },
[BINARY_OP_INPLACE_ADD_UNICODE] = { .nuops = 3, .uops = { { _GUARD_TOS_UNICODE, OPARG_SIMPLE, 0 }, { _GUARD_NOS_UNICODE, OPARG_SIMPLE, 0 }, { _BINARY_OP_INPLACE_ADD_UNICODE, OPARG_SIMPLE, 5 } } },
[BINARY_OP_MULTIPLY_FLOAT] = { .nuops = 5, .uops = { { _GUARD_TOS_FLOAT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_FLOAT, OPARG_SIMPLE, 0 }, { _BINARY_OP_MULTIPLY_FLOAT, OPARG_SIMPLE, 5 }, { _POP_TOP_FLOAT, OPARG_SIMPLE, 5 }, { _POP_TOP_FLOAT, OPARG_SIMPLE, 5 } } },
[BINARY_OP_MULTIPLY_INT] = { .nuops = 5, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_INT, OPARG_SIMPLE, 0 }, { _BINARY_OP_MULTIPLY_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_INT, OPARG_SIMPLE, 5 } } },
[BINARY_OP_SUBSCR_DICT] = { .nuops = 4, .uops = { { _GUARD_NOS_DICT, OPARG_SIMPLE, 0 }, { _BINARY_OP_SUBSCR_DICT, OPARG_SIMPLE, 5 }, { _POP_TOP, OPARG_SIMPLE, 5 }, { _POP_TOP, OPARG_SIMPLE, 5 } } },
- [BINARY_OP_SUBSCR_GETITEM] = { .nuops = 4, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 5 }, { _BINARY_OP_SUBSCR_CHECK_FUNC, OPARG_SIMPLE, 5 }, { _BINARY_OP_SUBSCR_INIT_CALL, OPARG_SIMPLE, 5 }, { _PUSH_FRAME, OPARG_SIMPLE, 5 } } },
+ [BINARY_OP_SUBSCR_GETITEM] = { .nuops = 5, .uops = { { _RECORD_TOS, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 5 }, { _BINARY_OP_SUBSCR_CHECK_FUNC, OPARG_SIMPLE, 5 }, { _BINARY_OP_SUBSCR_INIT_CALL, OPARG_SIMPLE, 5 }, { _PUSH_FRAME, OPARG_SIMPLE, 5 } } },
[BINARY_OP_SUBSCR_LIST_INT] = { .nuops = 5, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_LIST, OPARG_SIMPLE, 0 }, { _BINARY_OP_SUBSCR_LIST_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_INT, OPARG_SIMPLE, 5 }, { _POP_TOP, OPARG_SIMPLE, 5 } } },
[BINARY_OP_SUBSCR_LIST_SLICE] = { .nuops = 3, .uops = { { _GUARD_TOS_SLICE, OPARG_SIMPLE, 0 }, { _GUARD_NOS_LIST, OPARG_SIMPLE, 0 }, { _BINARY_OP_SUBSCR_LIST_SLICE, OPARG_SIMPLE, 5 } } },
[BINARY_OP_SUBSCR_STR_INT] = { .nuops = 5, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_COMPACT_ASCII, OPARG_SIMPLE, 0 }, { _BINARY_OP_SUBSCR_STR_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_INT, OPARG_SIMPLE, 5 }, { _POP_TOP_UNICODE, OPARG_SIMPLE, 5 } } },
@@ -1369,15 +1371,15 @@ _PyOpcode_macro_expansion[256] = {
[BUILD_STRING] = { .nuops = 1, .uops = { { _BUILD_STRING, OPARG_SIMPLE, 0 } } },
[BUILD_TEMPLATE] = { .nuops = 1, .uops = { { _BUILD_TEMPLATE, OPARG_SIMPLE, 0 } } },
[BUILD_TUPLE] = { .nuops = 1, .uops = { { _BUILD_TUPLE, OPARG_SIMPLE, 0 } } },
- [CALL_ALLOC_AND_ENTER_INIT] = { .nuops = 4, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_AND_ALLOCATE_OBJECT, 2, 1 }, { _CREATE_INIT_FRAME, OPARG_SIMPLE, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
- [CALL_BOUND_METHOD_EXACT_ARGS] = { .nuops = 10, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_CALL_BOUND_METHOD_EXACT_ARGS, OPARG_SIMPLE, 1 }, { _INIT_CALL_BOUND_METHOD_EXACT_ARGS, OPARG_SIMPLE, 1 }, { _CHECK_FUNCTION_VERSION, 2, 1 }, { _CHECK_FUNCTION_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _CHECK_STACK_SPACE, OPARG_SIMPLE, 3 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _INIT_CALL_PY_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
- [CALL_BOUND_METHOD_GENERAL] = { .nuops = 7, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_METHOD_VERSION, 2, 1 }, { _EXPAND_METHOD, OPARG_SIMPLE, 3 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _PY_FRAME_GENERAL, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
- [CALL_BUILTIN_CLASS] = { .nuops = 2, .uops = { { _CALL_BUILTIN_CLASS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_BUILTIN_FAST] = { .nuops = 2, .uops = { { _CALL_BUILTIN_FAST, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_BUILTIN_FAST_WITH_KEYWORDS] = { .nuops = 2, .uops = { { _CALL_BUILTIN_FAST_WITH_KEYWORDS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_BUILTIN_O] = { .nuops = 4, .uops = { { _CALL_BUILTIN_O, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_ALLOC_AND_ENTER_INIT] = { .nuops = 5, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_AND_ALLOCATE_OBJECT, 2, 1 }, { _CREATE_INIT_FRAME, OPARG_SIMPLE, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
+ [CALL_BOUND_METHOD_EXACT_ARGS] = { .nuops = 11, .uops = { { _RECORD_BOUND_METHOD, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_CALL_BOUND_METHOD_EXACT_ARGS, OPARG_SIMPLE, 1 }, { _INIT_CALL_BOUND_METHOD_EXACT_ARGS, OPARG_SIMPLE, 1 }, { _CHECK_FUNCTION_VERSION, 2, 1 }, { _CHECK_FUNCTION_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _CHECK_STACK_SPACE, OPARG_SIMPLE, 3 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _INIT_CALL_PY_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
+ [CALL_BOUND_METHOD_GENERAL] = { .nuops = 8, .uops = { { _RECORD_BOUND_METHOD, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_METHOD_VERSION, 2, 1 }, { _EXPAND_METHOD, OPARG_SIMPLE, 3 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _PY_FRAME_GENERAL, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
+ [CALL_BUILTIN_CLASS] = { .nuops = 3, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_BUILTIN_CLASS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_BUILTIN_FAST] = { .nuops = 3, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_BUILTIN_FAST, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_BUILTIN_FAST_WITH_KEYWORDS] = { .nuops = 3, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_BUILTIN_FAST_WITH_KEYWORDS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_BUILTIN_O] = { .nuops = 5, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_BUILTIN_O, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
[CALL_EX_NON_PY_GENERAL] = { .nuops = 4, .uops = { { _CHECK_IS_NOT_PY_CALLABLE_EX, OPARG_SIMPLE, 1 }, { _MAKE_CALLARGS_A_TUPLE, OPARG_SIMPLE, 1 }, { _CALL_FUNCTION_EX_NON_PY_GENERAL, OPARG_SIMPLE, 1 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 1 } } },
- [CALL_EX_PY] = { .nuops = 6, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _MAKE_CALLARGS_A_TUPLE, OPARG_SIMPLE, 1 }, { _CHECK_IS_PY_CALLABLE_EX, OPARG_SIMPLE, 1 }, { _PY_FRAME_EX, OPARG_SIMPLE, 1 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 1 }, { _PUSH_FRAME, OPARG_SIMPLE, 1 } } },
+ [CALL_EX_PY] = { .nuops = 7, .uops = { { _RECORD_4OS, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _MAKE_CALLARGS_A_TUPLE, OPARG_SIMPLE, 1 }, { _CHECK_IS_PY_CALLABLE_EX, OPARG_SIMPLE, 1 }, { _PY_FRAME_EX, OPARG_SIMPLE, 1 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 1 }, { _PUSH_FRAME, OPARG_SIMPLE, 1 } } },
[CALL_INTRINSIC_1] = { .nuops = 1, .uops = { { _CALL_INTRINSIC_1, OPARG_SIMPLE, 0 } } },
[CALL_INTRINSIC_2] = { .nuops = 1, .uops = { { _CALL_INTRINSIC_2, OPARG_SIMPLE, 0 } } },
[CALL_ISINSTANCE] = { .nuops = 3, .uops = { { _GUARD_THIRD_NULL, OPARG_SIMPLE, 3 }, { _GUARD_CALLABLE_ISINSTANCE, OPARG_SIMPLE, 3 }, { _CALL_ISINSTANCE, OPARG_SIMPLE, 3 } } },
@@ -1387,12 +1389,12 @@ _PyOpcode_macro_expansion[256] = {
[CALL_LEN] = { .nuops = 5, .uops = { { _GUARD_NOS_NULL, OPARG_SIMPLE, 3 }, { _GUARD_CALLABLE_LEN, OPARG_SIMPLE, 3 }, { _CALL_LEN, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 } } },
[CALL_LIST_APPEND] = { .nuops = 6, .uops = { { _GUARD_CALLABLE_LIST_APPEND, OPARG_SIMPLE, 3 }, { _GUARD_NOS_NOT_NULL, OPARG_SIMPLE, 3 }, { _GUARD_NOS_LIST, OPARG_SIMPLE, 3 }, { _CALL_LIST_APPEND, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 } } },
[CALL_METHOD_DESCRIPTOR_FAST] = { .nuops = 2, .uops = { { _CALL_METHOD_DESCRIPTOR_FAST, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { .nuops = 2, .uops = { { _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_METHOD_DESCRIPTOR_NOARGS] = { .nuops = 2, .uops = { { _CALL_METHOD_DESCRIPTOR_NOARGS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_METHOD_DESCRIPTOR_O] = { .nuops = 5, .uops = { { _CALL_METHOD_DESCRIPTOR_O, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_NON_PY_GENERAL] = { .nuops = 3, .uops = { { _CHECK_IS_NOT_PY_CALLABLE, OPARG_SIMPLE, 3 }, { _CALL_NON_PY_GENERAL, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
- [CALL_PY_EXACT_ARGS] = { .nuops = 8, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_FUNCTION_VERSION, 2, 1 }, { _CHECK_FUNCTION_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _CHECK_STACK_SPACE, OPARG_SIMPLE, 3 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _INIT_CALL_PY_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
- [CALL_PY_GENERAL] = { .nuops = 6, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_FUNCTION_VERSION, 2, 1 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _PY_FRAME_GENERAL, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
+ [CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { .nuops = 3, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_METHOD_DESCRIPTOR_NOARGS] = { .nuops = 3, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_METHOD_DESCRIPTOR_NOARGS, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_METHOD_DESCRIPTOR_O] = { .nuops = 6, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CALL_METHOD_DESCRIPTOR_O, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_NON_PY_GENERAL] = { .nuops = 4, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CHECK_IS_NOT_PY_CALLABLE, OPARG_SIMPLE, 3 }, { _CALL_NON_PY_GENERAL, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
+ [CALL_PY_EXACT_ARGS] = { .nuops = 9, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_FUNCTION_VERSION, 2, 1 }, { _CHECK_FUNCTION_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _CHECK_STACK_SPACE, OPARG_SIMPLE, 3 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _INIT_CALL_PY_EXACT_ARGS, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
+ [CALL_PY_GENERAL] = { .nuops = 7, .uops = { { _RECORD_CALLABLE, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _CHECK_FUNCTION_VERSION, 2, 1 }, { _CHECK_RECURSION_REMAINING, OPARG_SIMPLE, 3 }, { _PY_FRAME_GENERAL, OPARG_SIMPLE, 3 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 3 }, { _PUSH_FRAME, OPARG_SIMPLE, 3 } } },
[CALL_STR_1] = { .nuops = 5, .uops = { { _GUARD_NOS_NULL, OPARG_SIMPLE, 3 }, { _GUARD_CALLABLE_STR_1, OPARG_SIMPLE, 3 }, { _CALL_STR_1, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
[CALL_TUPLE_1] = { .nuops = 5, .uops = { { _GUARD_NOS_NULL, OPARG_SIMPLE, 3 }, { _GUARD_CALLABLE_TUPLE_1, OPARG_SIMPLE, 3 }, { _CALL_TUPLE_1, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 }, { _CHECK_PERIODIC_AT_END, OPARG_REPLACED, 3 } } },
[CALL_TYPE_1] = { .nuops = 4, .uops = { { _GUARD_NOS_NULL, OPARG_SIMPLE, 3 }, { _GUARD_CALLABLE_TYPE_1, OPARG_SIMPLE, 3 }, { _CALL_TYPE_1, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 } } },
@@ -1422,7 +1424,7 @@ _PyOpcode_macro_expansion[256] = {
[FORMAT_SIMPLE] = { .nuops = 1, .uops = { { _FORMAT_SIMPLE, OPARG_SIMPLE, 0 } } },
[FORMAT_WITH_SPEC] = { .nuops = 1, .uops = { { _FORMAT_WITH_SPEC, OPARG_SIMPLE, 0 } } },
[FOR_ITER] = { .nuops = 1, .uops = { { _FOR_ITER, OPARG_REPLACED, 0 } } },
- [FOR_ITER_GEN] = { .nuops = 3, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _FOR_ITER_GEN_FRAME, OPARG_SIMPLE, 1 }, { _PUSH_FRAME, OPARG_SIMPLE, 1 } } },
+ [FOR_ITER_GEN] = { .nuops = 4, .uops = { { _RECORD_NOS, OPARG_SIMPLE, 0 }, { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _FOR_ITER_GEN_FRAME, OPARG_SIMPLE, 1 }, { _PUSH_FRAME, OPARG_SIMPLE, 1 } } },
[FOR_ITER_LIST] = { .nuops = 3, .uops = { { _ITER_CHECK_LIST, OPARG_SIMPLE, 1 }, { _ITER_JUMP_LIST, OPARG_REPLACED, 1 }, { _ITER_NEXT_LIST, OPARG_REPLACED, 1 } } },
[FOR_ITER_RANGE] = { .nuops = 3, .uops = { { _ITER_CHECK_RANGE, OPARG_SIMPLE, 1 }, { _ITER_JUMP_RANGE, OPARG_REPLACED, 1 }, { _ITER_NEXT_RANGE, OPARG_SIMPLE, 1 } } },
[FOR_ITER_TUPLE] = { .nuops = 3, .uops = { { _ITER_CHECK_TUPLE, OPARG_SIMPLE, 1 }, { _ITER_JUMP_TUPLE, OPARG_REPLACED, 1 }, { _ITER_NEXT_TUPLE, OPARG_SIMPLE, 1 } } },
@@ -1442,17 +1444,17 @@ _PyOpcode_macro_expansion[256] = {
[LIST_EXTEND] = { .nuops = 1, .uops = { { _LIST_EXTEND, OPARG_SIMPLE, 0 } } },
[LOAD_ATTR] = { .nuops = 1, .uops = { { _LOAD_ATTR, OPARG_SIMPLE, 8 } } },
[LOAD_ATTR_CLASS] = { .nuops = 3, .uops = { { _CHECK_ATTR_CLASS, 2, 1 }, { _LOAD_ATTR_CLASS, 4, 5 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
- [LOAD_ATTR_CLASS_WITH_METACLASS_CHECK] = { .nuops = 4, .uops = { { _CHECK_ATTR_CLASS, 2, 1 }, { _GUARD_TYPE_VERSION, 2, 3 }, { _LOAD_ATTR_CLASS, 4, 5 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
- [LOAD_ATTR_INSTANCE_VALUE] = { .nuops = 5, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_MANAGED_OBJECT_HAS_VALUES, OPARG_SIMPLE, 3 }, { _LOAD_ATTR_INSTANCE_VALUE, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
- [LOAD_ATTR_METHOD_LAZY_DICT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_METHOD_LAZY_DICT, 1, 3 }, { _LOAD_ATTR_METHOD_LAZY_DICT, 4, 5 } } },
- [LOAD_ATTR_METHOD_NO_DICT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_METHOD_NO_DICT, 4, 5 } } },
- [LOAD_ATTR_METHOD_WITH_VALUES] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, OPARG_SIMPLE, 3 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_METHOD_WITH_VALUES, 4, 5 } } },
- [LOAD_ATTR_MODULE] = { .nuops = 3, .uops = { { _LOAD_ATTR_MODULE, 2, 1 }, { _LOAD_ATTR_MODULE, OPERAND1_1, 3 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
- [LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_NONDESCRIPTOR_NO_DICT, 4, 5 } } },
- [LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, OPARG_SIMPLE, 3 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, 4, 5 } } },
- [LOAD_ATTR_PROPERTY] = { .nuops = 5, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_PROPERTY_FRAME, 4, 5 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 9 }, { _PUSH_FRAME, OPARG_SIMPLE, 9 } } },
- [LOAD_ATTR_SLOT] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_SLOT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
- [LOAD_ATTR_WITH_HINT] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_WITH_HINT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
+ [LOAD_ATTR_CLASS_WITH_METACLASS_CHECK] = { .nuops = 5, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_CLASS, 2, 3 }, { _LOAD_ATTR_CLASS, 4, 5 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
+ [LOAD_ATTR_INSTANCE_VALUE] = { .nuops = 6, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_MANAGED_OBJECT_HAS_VALUES, OPARG_SIMPLE, 3 }, { _LOAD_ATTR_INSTANCE_VALUE, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
+ [LOAD_ATTR_METHOD_LAZY_DICT] = { .nuops = 4, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_METHOD_LAZY_DICT, 1, 3 }, { _LOAD_ATTR_METHOD_LAZY_DICT, 4, 5 } } },
+ [LOAD_ATTR_METHOD_NO_DICT] = { .nuops = 3, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_METHOD_NO_DICT, 4, 5 } } },
+ [LOAD_ATTR_METHOD_WITH_VALUES] = { .nuops = 5, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, OPARG_SIMPLE, 3 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_METHOD_WITH_VALUES, 4, 5 } } },
+ [LOAD_ATTR_MODULE] = { .nuops = 4, .uops = { { _LOAD_ATTR_MODULE, 2, 1 }, { _LOAD_ATTR_MODULE, OPERAND1_1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
+ [LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = { .nuops = 3, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_NONDESCRIPTOR_NO_DICT, 4, 5 } } },
+ [LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = { .nuops = 5, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, OPARG_SIMPLE, 3 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, 4, 5 } } },
+ [LOAD_ATTR_PROPERTY] = { .nuops = 6, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_PEP_523, OPARG_SIMPLE, 3 }, { _LOAD_ATTR_PROPERTY_FRAME, 4, 5 }, { _SAVE_RETURN_OFFSET, OPARG_SAVE_RETURN_OFFSET, 9 }, { _PUSH_FRAME, OPARG_SIMPLE, 9 } } },
+ [LOAD_ATTR_SLOT] = { .nuops = 5, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_SLOT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
+ [LOAD_ATTR_WITH_HINT] = { .nuops = 5, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_WITH_HINT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 }, { _PUSH_NULL_CONDITIONAL, OPARG_SIMPLE, 9 } } },
[LOAD_BUILD_CLASS] = { .nuops = 1, .uops = { { _LOAD_BUILD_CLASS, OPARG_SIMPLE, 0 } } },
[LOAD_COMMON_CONSTANT] = { .nuops = 1, .uops = { { _LOAD_COMMON_CONSTANT, OPARG_SIMPLE, 0 } } },
[LOAD_CONST] = { .nuops = 1, .uops = { { _LOAD_CONST, OPARG_SIMPLE, 0 } } },
@@ -1492,8 +1494,8 @@ _PyOpcode_macro_expansion[256] = {
[PUSH_EXC_INFO] = { .nuops = 1, .uops = { { _PUSH_EXC_INFO, OPARG_SIMPLE, 0 } } },
[PUSH_NULL] = { .nuops = 1, .uops = { { _PUSH_NULL, OPARG_SIMPLE, 0 } } },
[RESUME_CHECK] = { .nuops = 1, .uops = { { _RESUME_CHECK, OPARG_SIMPLE, 0 } } },
- [RETURN_GENERATOR] = { .nuops = 1, .uops = { { _RETURN_GENERATOR, OPARG_SIMPLE, 0 } } },
- [RETURN_VALUE] = { .nuops = 1, .uops = { { _RETURN_VALUE, OPARG_SIMPLE, 0 } } },
+ [RETURN_GENERATOR] = { .nuops = 2, .uops = { { _RECORD_CALLER_CODE, OPARG_SIMPLE, 0 }, { _RETURN_GENERATOR, OPARG_SIMPLE, 0 } } },
+ [RETURN_VALUE] = { .nuops = 2, .uops = { { _RECORD_CALLER_CODE, OPARG_SIMPLE, 0 }, { _RETURN_VALUE, OPARG_SIMPLE, 0 } } },
[SEND_GEN] = { .nuops = 3, .uops = { { _CHECK_PEP_523, OPARG_SIMPLE, 1 }, { _SEND_GEN_FRAME, OPARG_SIMPLE, 1 }, { _PUSH_FRAME, OPARG_SIMPLE, 1 } } },
[SETUP_ANNOTATIONS] = { .nuops = 1, .uops = { { _SETUP_ANNOTATIONS, OPARG_SIMPLE, 0 } } },
[SET_ADD] = { .nuops = 1, .uops = { { _SET_ADD, OPARG_SIMPLE, 0 } } },
@@ -1501,8 +1503,8 @@ _PyOpcode_macro_expansion[256] = {
[SET_UPDATE] = { .nuops = 1, .uops = { { _SET_UPDATE, OPARG_SIMPLE, 0 } } },
[STORE_ATTR] = { .nuops = 1, .uops = { { _STORE_ATTR, OPARG_SIMPLE, 3 } } },
[STORE_ATTR_INSTANCE_VALUE] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION_AND_LOCK, 2, 1 }, { _GUARD_DORV_NO_DICT, OPARG_SIMPLE, 3 }, { _STORE_ATTR_INSTANCE_VALUE, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 } } },
- [STORE_ATTR_SLOT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _STORE_ATTR_SLOT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 } } },
- [STORE_ATTR_WITH_HINT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _STORE_ATTR_WITH_HINT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 } } },
+ [STORE_ATTR_SLOT] = { .nuops = 4, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _STORE_ATTR_SLOT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 } } },
+ [STORE_ATTR_WITH_HINT] = { .nuops = 4, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _STORE_ATTR_WITH_HINT, 1, 3 }, { _POP_TOP, OPARG_SIMPLE, 4 } } },
[STORE_DEREF] = { .nuops = 1, .uops = { { _STORE_DEREF, OPARG_SIMPLE, 0 } } },
[STORE_FAST] = { .nuops = 2, .uops = { { _SWAP_FAST, OPARG_SIMPLE, 0 }, { _POP_TOP, OPARG_SIMPLE, 0 } } },
[STORE_FAST_LOAD_FAST] = { .nuops = 3, .uops = { { _SWAP_FAST, OPARG_TOP, 0 }, { _POP_TOP, OPARG_TOP, 0 }, { _LOAD_FAST, OPARG_BOTTOM, 0 } } },
@@ -1515,7 +1517,7 @@ _PyOpcode_macro_expansion[256] = {
[STORE_SUBSCR_LIST_INT] = { .nuops = 5, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_LIST, OPARG_SIMPLE, 0 }, { _STORE_SUBSCR_LIST_INT, OPARG_SIMPLE, 1 }, { _POP_TOP_INT, OPARG_SIMPLE, 1 }, { _POP_TOP, OPARG_SIMPLE, 1 } } },
[SWAP] = { .nuops = 1, .uops = { { _SWAP, OPARG_SIMPLE, 0 } } },
[TO_BOOL] = { .nuops = 1, .uops = { { _TO_BOOL, OPARG_SIMPLE, 2 } } },
- [TO_BOOL_ALWAYS_TRUE] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _REPLACE_WITH_TRUE, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 } } },
+ [TO_BOOL_ALWAYS_TRUE] = { .nuops = 4, .uops = { { _RECORD_TOS_TYPE, OPARG_SIMPLE, 1 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _REPLACE_WITH_TRUE, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 } } },
[TO_BOOL_BOOL] = { .nuops = 1, .uops = { { _TO_BOOL_BOOL, OPARG_SIMPLE, 3 } } },
[TO_BOOL_INT] = { .nuops = 3, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _TO_BOOL_INT, OPARG_SIMPLE, 3 }, { _POP_TOP_INT, OPARG_SIMPLE, 3 } } },
[TO_BOOL_LIST] = { .nuops = 3, .uops = { { _GUARD_TOS_LIST, OPARG_SIMPLE, 0 }, { _TO_BOOL_LIST, OPARG_SIMPLE, 3 }, { _POP_TOP, OPARG_SIMPLE, 3 } } },
@@ -1530,7 +1532,7 @@ _PyOpcode_macro_expansion[256] = {
[UNPACK_SEQUENCE_TUPLE] = { .nuops = 2, .uops = { { _GUARD_TOS_TUPLE, OPARG_SIMPLE, 0 }, { _UNPACK_SEQUENCE_TUPLE, OPARG_SIMPLE, 1 } } },
[UNPACK_SEQUENCE_TWO_TUPLE] = { .nuops = 2, .uops = { { _GUARD_TOS_TUPLE, OPARG_SIMPLE, 0 }, { _UNPACK_SEQUENCE_TWO_TUPLE, OPARG_SIMPLE, 1 } } },
[WITH_EXCEPT_START] = { .nuops = 1, .uops = { { _WITH_EXCEPT_START, OPARG_SIMPLE, 0 } } },
- [YIELD_VALUE] = { .nuops = 1, .uops = { { _YIELD_VALUE, OPARG_SIMPLE, 0 } } },
+ [YIELD_VALUE] = { .nuops = 2, .uops = { { _RECORD_CALLER_CODE, OPARG_SIMPLE, 0 }, { _YIELD_VALUE, OPARG_SIMPLE, 0 } } },
};
#endif // NEED_OPCODE_METADATA
diff --git a/Include/internal/pycore_optimizer.h b/Include/internal/pycore_optimizer.h
index 0592221f152..bb2028c5935 100644
--- a/Include/internal/pycore_optimizer.h
+++ b/Include/internal/pycore_optimizer.h
@@ -16,12 +16,103 @@ extern "C" {
#include
+typedef struct _PyJitUopBuffer {
+ _PyUOpInstruction *start;
+ _PyUOpInstruction *next;
+ _PyUOpInstruction *end;
+} _PyJitUopBuffer;
+
+
+typedef struct _JitOptContext {
+ char done;
+ char out_of_space;
+ bool contradiction;
+ // Has the builtins dict been watched?
+ bool builtins_watched;
+ // The current "executing" frame.
+ _Py_UOpsAbstractFrame *frame;
+ _Py_UOpsAbstractFrame frames[MAX_ABSTRACT_FRAME_DEPTH];
+ int curr_frame_depth;
+
+ // Arena for the symbolic types.
+ ty_arena t_arena;
+
+ JitOptRef *n_consumed;
+ JitOptRef *limit;
+ JitOptRef locals_and_stack[MAX_ABSTRACT_INTERP_SIZE];
+ _PyJitUopBuffer out_buffer;
+} JitOptContext;
+
+
+static inline void
+uop_buffer_init(_PyJitUopBuffer *trace, _PyUOpInstruction *start, uint32_t size)
+{
+ trace->next = trace->start = start;
+ trace->end = start + size;
+}
+
+static inline _PyUOpInstruction *
+uop_buffer_last(_PyJitUopBuffer *trace)
+{
+ assert(trace->next > trace->start);
+ return trace->next-1;
+}
+
+static inline int
+uop_buffer_length(_PyJitUopBuffer *trace)
+{
+ return (int)(trace->next - trace->start);
+}
+
+static inline int
+uop_buffer_remaining_space(_PyJitUopBuffer *trace)
+{
+ return (int)(trace->end - trace->next);
+}
+
+typedef struct _PyJitTracerInitialState {
+ int stack_depth;
+ int chain_depth;
+ struct _PyExitData *exit;
+ PyCodeObject *code; // Strong
+ PyFunctionObject *func; // Strong
+ struct _PyExecutorObject *executor; // Strong
+ _Py_CODEUNIT *start_instr;
+ _Py_CODEUNIT *close_loop_instr;
+ _Py_CODEUNIT *jump_backward_instr;
+} _PyJitTracerInitialState;
+
+typedef struct _PyJitTracerPreviousState {
+ bool dependencies_still_valid;
+ int instr_oparg;
+ int instr_stacklevel;
+ _Py_CODEUNIT *instr;
+ PyCodeObject *instr_code; // Strong
+ struct _PyInterpreterFrame *instr_frame;
+ _PyBloomFilter dependencies;
+ PyObject *recorded_value; // Strong, may be NULL
+} _PyJitTracerPreviousState;
+
+typedef struct _PyJitTracerTranslatorState {
+ int jump_backward_seen;
+} _PyJitTracerTranslatorState;
+
+typedef struct _PyJitTracerState {
+ bool is_tracing;
+ _PyJitTracerInitialState initial_state;
+ _PyJitTracerPreviousState prev_state;
+ _PyJitTracerTranslatorState translator_state;
+ JitOptContext opt_context;
+ _PyJitUopBuffer code_buffer;
+ _PyJitUopBuffer out_buffer;
+ _PyUOpInstruction uop_array[2 * UOP_MAX_TRACE_LENGTH];
+} _PyJitTracerState;
+
typedef struct _PyExecutorLinkListNode {
struct _PyExecutorObject *next;
struct _PyExecutorObject *previous;
} _PyExecutorLinkListNode;
-
typedef struct {
uint8_t opcode;
uint8_t oparg;
@@ -86,8 +177,8 @@ PyAPI_FUNC(void) _Py_Executors_InvalidateCold(PyInterpreterState *interp);
int _Py_uop_analyze_and_optimize(
_PyThreadStateImpl *tstate,
- _PyUOpInstruction *trace, int trace_len, int curr_stackentries,
- _PyBloomFilter *dependencies);
+ _PyUOpInstruction *input, int trace_len, int curr_stackentries,
+ _PyUOpInstruction *output, _PyBloomFilter *dependencies);
extern PyTypeObject _PyUOpExecutor_Type;
@@ -205,6 +296,8 @@ extern JitOptRef _Py_uop_sym_new_truthiness(JitOptContext *ctx, JitOptRef value,
extern bool _Py_uop_sym_is_compact_int(JitOptRef sym);
extern JitOptRef _Py_uop_sym_new_compact_int(JitOptContext *ctx);
extern void _Py_uop_sym_set_compact_int(JitOptContext *ctx, JitOptRef sym);
+extern JitOptRef _Py_uop_sym_new_predicate(JitOptContext *ctx, JitOptRef lhs_ref, JitOptRef rhs_ref, JitOptPredicateKind kind);
+extern void _Py_uop_sym_apply_predicate_narrowing(JitOptContext *ctx, JitOptRef sym, bool branch_is_true);
extern void _Py_uop_abstractcontext_init(JitOptContext *ctx);
extern void _Py_uop_abstractcontext_fini(JitOptContext *ctx);
@@ -244,7 +337,7 @@ PyAPI_FUNC(int) _PyJit_translate_single_bytecode_to_trace(PyThreadState *tstate,
PyAPI_FUNC(int)
_PyJit_TryInitializeTracing(PyThreadState *tstate, _PyInterpreterFrame *frame,
_Py_CODEUNIT *curr_instr, _Py_CODEUNIT *start_instr,
- _Py_CODEUNIT *close_loop_instr, int curr_stackdepth, int chain_depth, _PyExitData *exit,
+ _Py_CODEUNIT *close_loop_instr, _PyStackRef *stack_pointer, int chain_depth, _PyExitData *exit,
int oparg, _PyExecutorObject *current_executor);
PyAPI_FUNC(void) _PyJit_FinalizeTracing(PyThreadState *tstate, int err);
@@ -252,6 +345,12 @@ void _PyJit_TracerFree(_PyThreadStateImpl *_tstate);
void _PyJit_Tracer_InvalidateDependency(PyThreadState *old_tstate, void *obj);
+#ifdef _Py_TIER2
+typedef void (*_Py_RecordFuncPtr)(_PyInterpreterFrame *frame, _PyStackRef *stackpointer, int oparg, PyObject **recorded_value);
+PyAPI_DATA(const _Py_RecordFuncPtr) _PyOpcode_RecordFunctions[];
+PyAPI_DATA(const uint8_t) _PyOpcode_RecordFunctionIndices[256];
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/Include/internal/pycore_optimizer_types.h b/Include/internal/pycore_optimizer_types.h
index 6501ce869c1..b4b93e83538 100644
--- a/Include/internal/pycore_optimizer_types.h
+++ b/Include/internal/pycore_optimizer_types.h
@@ -40,6 +40,7 @@ typedef enum _JitSymType {
JIT_SYM_TUPLE_TAG = 8,
JIT_SYM_TRUTHINESS_TAG = 9,
JIT_SYM_COMPACT_INT = 10,
+ JIT_SYM_PREDICATE_TAG = 11,
} JitSymType;
typedef struct _jit_opt_known_class {
@@ -72,6 +73,20 @@ typedef struct {
uint16_t value;
} JitOptTruthiness;
+typedef enum {
+ JIT_PRED_IS,
+ JIT_PRED_IS_NOT,
+ JIT_PRED_EQ,
+ JIT_PRED_NE,
+} JitOptPredicateKind;
+
+typedef struct {
+ uint8_t tag;
+ uint8_t kind;
+ uint16_t lhs;
+ uint16_t rhs;
+} JitOptPredicate;
+
typedef struct {
uint8_t tag;
} JitOptCompactInt;
@@ -84,6 +99,7 @@ typedef union _jit_opt_symbol {
JitOptTuple tuple;
JitOptTruthiness truthiness;
JitOptCompactInt compact;
+ JitOptPredicate predicate;
} JitOptSymbol;
// This mimics the _PyStackRef API
@@ -112,27 +128,6 @@ typedef struct ty_arena {
JitOptSymbol arena[TY_ARENA_SIZE];
} ty_arena;
-typedef struct _JitOptContext {
- char done;
- char out_of_space;
- bool contradiction;
- // Has the builtins dict been watched?
- bool builtins_watched;
- // The current "executing" frame.
- _Py_UOpsAbstractFrame *frame;
- _Py_UOpsAbstractFrame frames[MAX_ABSTRACT_FRAME_DEPTH];
- int curr_frame_depth;
-
- // Arena for the symbolic types.
- ty_arena t_arena;
-
- JitOptRef *n_consumed;
- JitOptRef *limit;
- JitOptRef locals_and_stack[MAX_ABSTRACT_INTERP_SIZE];
- _PyUOpInstruction *out_buffer;
- int out_len;
-} JitOptContext;
-
#ifdef __cplusplus
}
diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h
index 6e7bad986db..ba7c0e68434 100644
--- a/Include/internal/pycore_runtime_init_generated.h
+++ b/Include/internal/pycore_runtime_init_generated.h
@@ -1795,6 +1795,7 @@ extern "C" {
INIT_ID(ident), \
INIT_ID(identity_hint), \
INIT_ID(ignore), \
+ INIT_ID(ignorechars), \
INIT_ID(imag), \
INIT_ID(implieslink), \
INIT_ID(importlib), \
diff --git a/Include/internal/pycore_runtime_structs.h b/Include/internal/pycore_runtime_structs.h
index 92387031ad7..f48d203dda0 100644
--- a/Include/internal/pycore_runtime_structs.h
+++ b/Include/internal/pycore_runtime_structs.h
@@ -31,6 +31,7 @@ struct _pymem_allocators {
debug_alloc_api_t obj;
} debug;
int is_debug_enabled;
+ int use_hugepages;
PyObjectArenaAllocator obj_arena;
};
diff --git a/Include/internal/pycore_tstate.h b/Include/internal/pycore_tstate.h
index 24a40416c21..64b90710b8e 100644
--- a/Include/internal/pycore_tstate.h
+++ b/Include/internal/pycore_tstate.h
@@ -12,7 +12,6 @@ extern "C" {
#include "pycore_freelist_state.h" // struct _Py_freelists
#include "pycore_interpframe_structs.h" // _PyInterpreterFrame
#include "pycore_mimalloc.h" // struct _mimalloc_thread_state
-#include "pycore_optimizer_types.h" // JitOptContext
#include "pycore_qsbr.h" // struct qsbr
#include "pycore_uop.h" // struct _PyUOpInstruction
#include "pycore_structs.h"
@@ -24,46 +23,6 @@ struct _gc_thread_state {
};
#endif
-#if _Py_TIER2
-typedef struct _PyJitTracerInitialState {
- int stack_depth;
- int chain_depth;
- struct _PyExitData *exit;
- PyCodeObject *code; // Strong
- PyFunctionObject *func; // Strong
- struct _PyExecutorObject *executor; // Strong
- _Py_CODEUNIT *start_instr;
- _Py_CODEUNIT *close_loop_instr;
- _Py_CODEUNIT *jump_backward_instr;
-} _PyJitTracerInitialState;
-
-typedef struct _PyJitTracerPreviousState {
- bool dependencies_still_valid;
- int code_max_size;
- int code_curr_size;
- int instr_oparg;
- int instr_stacklevel;
- _Py_CODEUNIT *instr;
- PyCodeObject *instr_code; // Strong
- struct _PyInterpreterFrame *instr_frame;
- _PyBloomFilter dependencies;
-} _PyJitTracerPreviousState;
-
-typedef struct _PyJitTracerTranslatorState {
- int jump_backward_seen;
-} _PyJitTracerTranslatorState;
-
-typedef struct _PyJitTracerState {
- bool is_tracing;
- _PyJitTracerInitialState initial_state;
- _PyJitTracerPreviousState prev_state;
- _PyJitTracerTranslatorState translator_state;
- JitOptContext opt_context;
- _PyUOpInstruction code_buffer[UOP_MAX_TRACE_LENGTH];
- _PyUOpInstruction out_buffer[UOP_MAX_TRACE_LENGTH];
-} _PyJitTracerState;
-
-#endif
// Every PyThreadState is actually allocated as a _PyThreadStateImpl. The
// PyThreadState fields are exposed as part of the C API, although most fields
@@ -141,7 +100,7 @@ typedef struct _PyThreadStateImpl {
Py_ssize_t reftotal; // this thread's total refcount operations
#endif
#if _Py_TIER2
- _PyJitTracerState *jit_tracer_state;
+ struct _PyJitTracerState *jit_tracer_state;
#endif
} _PyThreadStateImpl;
diff --git a/Include/internal/pycore_unicodeobject_generated.h b/Include/internal/pycore_unicodeobject_generated.h
index 660115931da..44063794293 100644
--- a/Include/internal/pycore_unicodeobject_generated.h
+++ b/Include/internal/pycore_unicodeobject_generated.h
@@ -1860,6 +1860,10 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
_PyUnicode_InternStatic(interp, &string);
assert(_PyUnicode_CheckConsistency(string, 1));
assert(PyUnicode_GET_LENGTH(string) != 1);
+ string = &_Py_ID(ignorechars);
+ _PyUnicode_InternStatic(interp, &string);
+ assert(_PyUnicode_CheckConsistency(string, 1));
+ assert(PyUnicode_GET_LENGTH(string) != 1);
string = &_Py_ID(imag);
_PyUnicode_InternStatic(interp, &string);
assert(_PyUnicode_CheckConsistency(string, 1));
diff --git a/Include/internal/pycore_uop.h b/Include/internal/pycore_uop.h
index e828a1cc5a5..f9be01acb57 100644
--- a/Include/internal/pycore_uop.h
+++ b/Include/internal/pycore_uop.h
@@ -38,11 +38,10 @@ typedef struct _PyUOpInstruction{
// This is the length of the trace we translate initially.
#ifdef Py_DEBUG
// With asserts, the stencils are a lot larger
-#define UOP_MAX_TRACE_LENGTH 2000
+#define UOP_MAX_TRACE_LENGTH 1000
#else
-#define UOP_MAX_TRACE_LENGTH 5000
+#define UOP_MAX_TRACE_LENGTH 2500
#endif
-#define UOP_BUFFER_SIZE (UOP_MAX_TRACE_LENGTH * sizeof(_PyUOpInstruction))
/* Bloom filter with m = 256
* https://en.wikipedia.org/wiki/Bloom_filter */
diff --git a/Include/internal/pycore_uop_ids.h b/Include/internal/pycore_uop_ids.h
index 8fd7cef3368..850ae446dc7 100644
--- a/Include/internal/pycore_uop_ids.h
+++ b/Include/internal/pycore_uop_ids.h
@@ -131,62 +131,73 @@ extern "C" {
#define _GET_YIELD_FROM_ITER GET_YIELD_FROM_ITER
#define _GUARD_BINARY_OP_EXTEND 387
#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS 388
-#define _GUARD_CALLABLE_ISINSTANCE 389
-#define _GUARD_CALLABLE_LEN 390
-#define _GUARD_CALLABLE_LIST_APPEND 391
-#define _GUARD_CALLABLE_STR_1 392
-#define _GUARD_CALLABLE_TUPLE_1 393
-#define _GUARD_CALLABLE_TYPE_1 394
-#define _GUARD_DORV_NO_DICT 395
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 396
-#define _GUARD_GLOBALS_VERSION 397
-#define _GUARD_IP_RETURN_GENERATOR 398
-#define _GUARD_IP_RETURN_VALUE 399
-#define _GUARD_IP_YIELD_VALUE 400
-#define _GUARD_IP__PUSH_FRAME 401
-#define _GUARD_IS_FALSE_POP 402
-#define _GUARD_IS_NONE_POP 403
-#define _GUARD_IS_NOT_NONE_POP 404
-#define _GUARD_IS_TRUE_POP 405
-#define _GUARD_KEYS_VERSION 406
-#define _GUARD_NOS_COMPACT_ASCII 407
-#define _GUARD_NOS_DICT 408
-#define _GUARD_NOS_FLOAT 409
-#define _GUARD_NOS_INT 410
-#define _GUARD_NOS_LIST 411
-#define _GUARD_NOS_NOT_NULL 412
-#define _GUARD_NOS_NULL 413
-#define _GUARD_NOS_OVERFLOWED 414
-#define _GUARD_NOS_TUPLE 415
-#define _GUARD_NOS_UNICODE 416
-#define _GUARD_NOT_EXHAUSTED_LIST 417
-#define _GUARD_NOT_EXHAUSTED_RANGE 418
-#define _GUARD_NOT_EXHAUSTED_TUPLE 419
-#define _GUARD_THIRD_NULL 420
-#define _GUARD_TOS_ANY_SET 421
-#define _GUARD_TOS_DICT 422
-#define _GUARD_TOS_FLOAT 423
-#define _GUARD_TOS_INT 424
-#define _GUARD_TOS_LIST 425
-#define _GUARD_TOS_OVERFLOWED 426
-#define _GUARD_TOS_SLICE 427
-#define _GUARD_TOS_TUPLE 428
-#define _GUARD_TOS_UNICODE 429
-#define _GUARD_TYPE_VERSION 430
-#define _GUARD_TYPE_VERSION_AND_LOCK 431
-#define _HANDLE_PENDING_AND_DEOPT 432
+#define _GUARD_BIT_IS_SET_POP 389
+#define _GUARD_BIT_IS_SET_POP_4 390
+#define _GUARD_BIT_IS_SET_POP_5 391
+#define _GUARD_BIT_IS_SET_POP_6 392
+#define _GUARD_BIT_IS_SET_POP_7 393
+#define _GUARD_BIT_IS_UNSET_POP 394
+#define _GUARD_BIT_IS_UNSET_POP_4 395
+#define _GUARD_BIT_IS_UNSET_POP_5 396
+#define _GUARD_BIT_IS_UNSET_POP_6 397
+#define _GUARD_BIT_IS_UNSET_POP_7 398
+#define _GUARD_CALLABLE_ISINSTANCE 399
+#define _GUARD_CALLABLE_LEN 400
+#define _GUARD_CALLABLE_LIST_APPEND 401
+#define _GUARD_CALLABLE_STR_1 402
+#define _GUARD_CALLABLE_TUPLE_1 403
+#define _GUARD_CALLABLE_TYPE_1 404
+#define _GUARD_DORV_NO_DICT 405
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 406
+#define _GUARD_GLOBALS_VERSION 407
+#define _GUARD_IP_RETURN_GENERATOR 408
+#define _GUARD_IP_RETURN_VALUE 409
+#define _GUARD_IP_YIELD_VALUE 410
+#define _GUARD_IP__PUSH_FRAME 411
+#define _GUARD_IS_FALSE_POP 412
+#define _GUARD_IS_NONE_POP 413
+#define _GUARD_IS_NOT_NONE_POP 414
+#define _GUARD_IS_TRUE_POP 415
+#define _GUARD_KEYS_VERSION 416
+#define _GUARD_NOS_COMPACT_ASCII 417
+#define _GUARD_NOS_DICT 418
+#define _GUARD_NOS_FLOAT 419
+#define _GUARD_NOS_INT 420
+#define _GUARD_NOS_LIST 421
+#define _GUARD_NOS_NOT_NULL 422
+#define _GUARD_NOS_NULL 423
+#define _GUARD_NOS_OVERFLOWED 424
+#define _GUARD_NOS_TUPLE 425
+#define _GUARD_NOS_UNICODE 426
+#define _GUARD_NOT_EXHAUSTED_LIST 427
+#define _GUARD_NOT_EXHAUSTED_RANGE 428
+#define _GUARD_NOT_EXHAUSTED_TUPLE 429
+#define _GUARD_THIRD_NULL 430
+#define _GUARD_TOS_ANY_SET 431
+#define _GUARD_TOS_DICT 432
+#define _GUARD_TOS_FLOAT 433
+#define _GUARD_TOS_INT 434
+#define _GUARD_TOS_LIST 435
+#define _GUARD_TOS_OVERFLOWED 436
+#define _GUARD_TOS_SLICE 437
+#define _GUARD_TOS_TUPLE 438
+#define _GUARD_TOS_UNICODE 439
+#define _GUARD_TYPE_VERSION 440
+#define _GUARD_TYPE_VERSION_AND_LOCK 441
+#define _HANDLE_PENDING_AND_DEOPT 442
#define _IMPORT_FROM IMPORT_FROM
#define _IMPORT_NAME IMPORT_NAME
-#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 433
-#define _INIT_CALL_PY_EXACT_ARGS 434
-#define _INIT_CALL_PY_EXACT_ARGS_0 435
-#define _INIT_CALL_PY_EXACT_ARGS_1 436
-#define _INIT_CALL_PY_EXACT_ARGS_2 437
-#define _INIT_CALL_PY_EXACT_ARGS_3 438
-#define _INIT_CALL_PY_EXACT_ARGS_4 439
-#define _INSERT_1_LOAD_CONST_INLINE_BORROW 440
-#define _INSERT_2_LOAD_CONST_INLINE_BORROW 441
-#define _INSERT_NULL 442
+#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 443
+#define _INIT_CALL_PY_EXACT_ARGS 444
+#define _INIT_CALL_PY_EXACT_ARGS_0 445
+#define _INIT_CALL_PY_EXACT_ARGS_1 446
+#define _INIT_CALL_PY_EXACT_ARGS_2 447
+#define _INIT_CALL_PY_EXACT_ARGS_3 448
+#define _INIT_CALL_PY_EXACT_ARGS_4 449
+#define _INSERT_1_LOAD_CONST_INLINE 450
+#define _INSERT_1_LOAD_CONST_INLINE_BORROW 451
+#define _INSERT_2_LOAD_CONST_INLINE_BORROW 452
+#define _INSERT_NULL 453
#define _INSTRUMENTED_FOR_ITER INSTRUMENTED_FOR_ITER
#define _INSTRUMENTED_INSTRUCTION INSTRUMENTED_INSTRUCTION
#define _INSTRUMENTED_JUMP_FORWARD INSTRUMENTED_JUMP_FORWARD
@@ -196,995 +207,1045 @@ extern "C" {
#define _INSTRUMENTED_POP_JUMP_IF_NONE INSTRUMENTED_POP_JUMP_IF_NONE
#define _INSTRUMENTED_POP_JUMP_IF_NOT_NONE INSTRUMENTED_POP_JUMP_IF_NOT_NONE
#define _INSTRUMENTED_POP_JUMP_IF_TRUE INSTRUMENTED_POP_JUMP_IF_TRUE
-#define _IS_NONE 443
-#define _IS_OP 444
-#define _ITER_CHECK_LIST 445
-#define _ITER_CHECK_RANGE 446
-#define _ITER_CHECK_TUPLE 447
-#define _ITER_JUMP_LIST 448
-#define _ITER_JUMP_RANGE 449
-#define _ITER_JUMP_TUPLE 450
-#define _ITER_NEXT_LIST 451
-#define _ITER_NEXT_LIST_TIER_TWO 452
-#define _ITER_NEXT_RANGE 453
-#define _ITER_NEXT_TUPLE 454
+#define _IS_NONE 454
+#define _IS_OP 455
+#define _ITER_CHECK_LIST 456
+#define _ITER_CHECK_RANGE 457
+#define _ITER_CHECK_TUPLE 458
+#define _ITER_JUMP_LIST 459
+#define _ITER_JUMP_RANGE 460
+#define _ITER_JUMP_TUPLE 461
+#define _ITER_NEXT_LIST 462
+#define _ITER_NEXT_LIST_TIER_TWO 463
+#define _ITER_NEXT_RANGE 464
+#define _ITER_NEXT_TUPLE 465
#define _JUMP_BACKWARD_NO_INTERRUPT JUMP_BACKWARD_NO_INTERRUPT
-#define _JUMP_TO_TOP 455
+#define _JUMP_TO_TOP 466
#define _LIST_APPEND LIST_APPEND
#define _LIST_EXTEND LIST_EXTEND
-#define _LOAD_ATTR 456
-#define _LOAD_ATTR_CLASS 457
+#define _LOAD_ATTR 467
+#define _LOAD_ATTR_CLASS 468
#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
-#define _LOAD_ATTR_INSTANCE_VALUE 458
-#define _LOAD_ATTR_METHOD_LAZY_DICT 459
-#define _LOAD_ATTR_METHOD_NO_DICT 460
-#define _LOAD_ATTR_METHOD_WITH_VALUES 461
-#define _LOAD_ATTR_MODULE 462
-#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 463
-#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 464
-#define _LOAD_ATTR_PROPERTY_FRAME 465
-#define _LOAD_ATTR_SLOT 466
-#define _LOAD_ATTR_WITH_HINT 467
+#define _LOAD_ATTR_INSTANCE_VALUE 469
+#define _LOAD_ATTR_METHOD_LAZY_DICT 470
+#define _LOAD_ATTR_METHOD_NO_DICT 471
+#define _LOAD_ATTR_METHOD_WITH_VALUES 472
+#define _LOAD_ATTR_MODULE 473
+#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 474
+#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 475
+#define _LOAD_ATTR_PROPERTY_FRAME 476
+#define _LOAD_ATTR_SLOT 477
+#define _LOAD_ATTR_WITH_HINT 478
#define _LOAD_BUILD_CLASS LOAD_BUILD_CLASS
-#define _LOAD_BYTECODE 468
+#define _LOAD_BYTECODE 479
#define _LOAD_COMMON_CONSTANT LOAD_COMMON_CONSTANT
#define _LOAD_CONST LOAD_CONST
-#define _LOAD_CONST_INLINE 469
-#define _LOAD_CONST_INLINE_BORROW 470
-#define _LOAD_CONST_UNDER_INLINE 471
-#define _LOAD_CONST_UNDER_INLINE_BORROW 472
+#define _LOAD_CONST_INLINE 480
+#define _LOAD_CONST_INLINE_BORROW 481
+#define _LOAD_CONST_UNDER_INLINE 482
+#define _LOAD_CONST_UNDER_INLINE_BORROW 483
#define _LOAD_DEREF LOAD_DEREF
-#define _LOAD_FAST 473
-#define _LOAD_FAST_0 474
-#define _LOAD_FAST_1 475
-#define _LOAD_FAST_2 476
-#define _LOAD_FAST_3 477
-#define _LOAD_FAST_4 478
-#define _LOAD_FAST_5 479
-#define _LOAD_FAST_6 480
-#define _LOAD_FAST_7 481
+#define _LOAD_FAST 484
+#define _LOAD_FAST_0 485
+#define _LOAD_FAST_1 486
+#define _LOAD_FAST_2 487
+#define _LOAD_FAST_3 488
+#define _LOAD_FAST_4 489
+#define _LOAD_FAST_5 490
+#define _LOAD_FAST_6 491
+#define _LOAD_FAST_7 492
#define _LOAD_FAST_AND_CLEAR LOAD_FAST_AND_CLEAR
-#define _LOAD_FAST_BORROW 482
-#define _LOAD_FAST_BORROW_0 483
-#define _LOAD_FAST_BORROW_1 484
-#define _LOAD_FAST_BORROW_2 485
-#define _LOAD_FAST_BORROW_3 486
-#define _LOAD_FAST_BORROW_4 487
-#define _LOAD_FAST_BORROW_5 488
-#define _LOAD_FAST_BORROW_6 489
-#define _LOAD_FAST_BORROW_7 490
+#define _LOAD_FAST_BORROW 493
+#define _LOAD_FAST_BORROW_0 494
+#define _LOAD_FAST_BORROW_1 495
+#define _LOAD_FAST_BORROW_2 496
+#define _LOAD_FAST_BORROW_3 497
+#define _LOAD_FAST_BORROW_4 498
+#define _LOAD_FAST_BORROW_5 499
+#define _LOAD_FAST_BORROW_6 500
+#define _LOAD_FAST_BORROW_7 501
#define _LOAD_FAST_CHECK LOAD_FAST_CHECK
#define _LOAD_FROM_DICT_OR_DEREF LOAD_FROM_DICT_OR_DEREF
#define _LOAD_FROM_DICT_OR_GLOBALS LOAD_FROM_DICT_OR_GLOBALS
-#define _LOAD_GLOBAL 491
-#define _LOAD_GLOBAL_BUILTINS 492
-#define _LOAD_GLOBAL_MODULE 493
+#define _LOAD_GLOBAL 502
+#define _LOAD_GLOBAL_BUILTINS 503
+#define _LOAD_GLOBAL_MODULE 504
#define _LOAD_LOCALS LOAD_LOCALS
#define _LOAD_NAME LOAD_NAME
-#define _LOAD_SMALL_INT 494
-#define _LOAD_SMALL_INT_0 495
-#define _LOAD_SMALL_INT_1 496
-#define _LOAD_SMALL_INT_2 497
-#define _LOAD_SMALL_INT_3 498
-#define _LOAD_SPECIAL 499
+#define _LOAD_SMALL_INT 505
+#define _LOAD_SMALL_INT_0 506
+#define _LOAD_SMALL_INT_1 507
+#define _LOAD_SMALL_INT_2 508
+#define _LOAD_SMALL_INT_3 509
+#define _LOAD_SPECIAL 510
#define _LOAD_SUPER_ATTR_ATTR LOAD_SUPER_ATTR_ATTR
#define _LOAD_SUPER_ATTR_METHOD LOAD_SUPER_ATTR_METHOD
-#define _MAKE_CALLARGS_A_TUPLE 500
+#define _MAKE_CALLARGS_A_TUPLE 511
#define _MAKE_CELL MAKE_CELL
#define _MAKE_FUNCTION MAKE_FUNCTION
-#define _MAKE_WARM 501
+#define _MAKE_WARM 512
#define _MAP_ADD MAP_ADD
#define _MATCH_CLASS MATCH_CLASS
#define _MATCH_KEYS MATCH_KEYS
#define _MATCH_MAPPING MATCH_MAPPING
#define _MATCH_SEQUENCE MATCH_SEQUENCE
-#define _MAYBE_EXPAND_METHOD 502
-#define _MAYBE_EXPAND_METHOD_KW 503
-#define _MONITOR_CALL 504
-#define _MONITOR_CALL_KW 505
-#define _MONITOR_JUMP_BACKWARD 506
-#define _MONITOR_RESUME 507
+#define _MAYBE_EXPAND_METHOD 513
+#define _MAYBE_EXPAND_METHOD_KW 514
+#define _MONITOR_CALL 515
+#define _MONITOR_CALL_KW 516
+#define _MONITOR_JUMP_BACKWARD 517
+#define _MONITOR_RESUME 518
#define _NOP NOP
-#define _POP_CALL 508
-#define _POP_CALL_LOAD_CONST_INLINE_BORROW 509
-#define _POP_CALL_ONE 510
-#define _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW 511
-#define _POP_CALL_TWO 512
-#define _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW 513
+#define _POP_CALL 519
+#define _POP_CALL_LOAD_CONST_INLINE_BORROW 520
+#define _POP_CALL_ONE 521
+#define _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW 522
+#define _POP_CALL_TWO 523
+#define _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW 524
#define _POP_EXCEPT POP_EXCEPT
#define _POP_ITER POP_ITER
-#define _POP_JUMP_IF_FALSE 514
-#define _POP_JUMP_IF_TRUE 515
+#define _POP_JUMP_IF_FALSE 525
+#define _POP_JUMP_IF_TRUE 526
#define _POP_TOP POP_TOP
-#define _POP_TOP_FLOAT 516
-#define _POP_TOP_INT 517
-#define _POP_TOP_LOAD_CONST_INLINE 518
-#define _POP_TOP_LOAD_CONST_INLINE_BORROW 519
-#define _POP_TOP_NOP 520
-#define _POP_TOP_UNICODE 521
-#define _POP_TWO 522
-#define _POP_TWO_LOAD_CONST_INLINE_BORROW 523
+#define _POP_TOP_FLOAT 527
+#define _POP_TOP_INT 528
+#define _POP_TOP_LOAD_CONST_INLINE 529
+#define _POP_TOP_LOAD_CONST_INLINE_BORROW 530
+#define _POP_TOP_NOP 531
+#define _POP_TOP_UNICODE 532
+#define _POP_TWO 533
+#define _POP_TWO_LOAD_CONST_INLINE_BORROW 534
#define _PUSH_EXC_INFO PUSH_EXC_INFO
-#define _PUSH_FRAME 524
+#define _PUSH_FRAME 535
#define _PUSH_NULL PUSH_NULL
-#define _PUSH_NULL_CONDITIONAL 525
-#define _PY_FRAME_EX 526
-#define _PY_FRAME_GENERAL 527
-#define _PY_FRAME_KW 528
-#define _QUICKEN_RESUME 529
-#define _REPLACE_WITH_TRUE 530
+#define _PUSH_NULL_CONDITIONAL 536
+#define _PY_FRAME_EX 537
+#define _PY_FRAME_GENERAL 538
+#define _PY_FRAME_KW 539
+#define _QUICKEN_RESUME 540
+#define _RECORD_4OS 541
+#define _RECORD_BOUND_METHOD 542
+#define _RECORD_CALLABLE 543
+#define _RECORD_CALLER_CODE 544
+#define _RECORD_NOS 545
+#define _RECORD_TOS 546
+#define _RECORD_TOS_TYPE 547
+#define _REPLACE_WITH_TRUE 548
#define _RESUME_CHECK RESUME_CHECK
-#define _RETURN_GENERATOR RETURN_GENERATOR
-#define _RETURN_VALUE RETURN_VALUE
-#define _SAVE_RETURN_OFFSET 531
-#define _SEND 532
-#define _SEND_GEN_FRAME 533
+#define _RETURN_GENERATOR 549
+#define _RETURN_VALUE 550
+#define _SAVE_RETURN_OFFSET 551
+#define _SEND 552
+#define _SEND_GEN_FRAME 553
#define _SETUP_ANNOTATIONS SETUP_ANNOTATIONS
#define _SET_ADD SET_ADD
#define _SET_FUNCTION_ATTRIBUTE SET_FUNCTION_ATTRIBUTE
#define _SET_UPDATE SET_UPDATE
-#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW 534
-#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW 535
-#define _SPILL_OR_RELOAD 536
-#define _START_EXECUTOR 537
-#define _STORE_ATTR 538
-#define _STORE_ATTR_INSTANCE_VALUE 539
-#define _STORE_ATTR_SLOT 540
-#define _STORE_ATTR_WITH_HINT 541
+#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW 554
+#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW 555
+#define _SPILL_OR_RELOAD 556
+#define _START_EXECUTOR 557
+#define _STORE_ATTR 558
+#define _STORE_ATTR_INSTANCE_VALUE 559
+#define _STORE_ATTR_SLOT 560
+#define _STORE_ATTR_WITH_HINT 561
#define _STORE_DEREF STORE_DEREF
#define _STORE_GLOBAL STORE_GLOBAL
#define _STORE_NAME STORE_NAME
-#define _STORE_SLICE 542
-#define _STORE_SUBSCR 543
-#define _STORE_SUBSCR_DICT 544
-#define _STORE_SUBSCR_LIST_INT 545
-#define _SWAP 546
-#define _SWAP_2 547
-#define _SWAP_3 548
-#define _SWAP_FAST 549
-#define _SWAP_FAST_0 550
-#define _SWAP_FAST_1 551
-#define _SWAP_FAST_2 552
-#define _SWAP_FAST_3 553
-#define _SWAP_FAST_4 554
-#define _SWAP_FAST_5 555
-#define _SWAP_FAST_6 556
-#define _SWAP_FAST_7 557
-#define _TIER2_RESUME_CHECK 558
-#define _TO_BOOL 559
+#define _STORE_SLICE 562
+#define _STORE_SUBSCR 563
+#define _STORE_SUBSCR_DICT 564
+#define _STORE_SUBSCR_LIST_INT 565
+#define _SWAP 566
+#define _SWAP_2 567
+#define _SWAP_3 568
+#define _SWAP_FAST 569
+#define _SWAP_FAST_0 570
+#define _SWAP_FAST_1 571
+#define _SWAP_FAST_2 572
+#define _SWAP_FAST_3 573
+#define _SWAP_FAST_4 574
+#define _SWAP_FAST_5 575
+#define _SWAP_FAST_6 576
+#define _SWAP_FAST_7 577
+#define _TIER2_RESUME_CHECK 578
+#define _TO_BOOL 579
#define _TO_BOOL_BOOL TO_BOOL_BOOL
-#define _TO_BOOL_INT 560
-#define _TO_BOOL_LIST 561
+#define _TO_BOOL_INT 580
+#define _TO_BOOL_LIST 581
#define _TO_BOOL_NONE TO_BOOL_NONE
-#define _TO_BOOL_STR 562
+#define _TO_BOOL_STR 582
#define _TRACE_RECORD TRACE_RECORD
-#define _UNARY_INVERT 563
-#define _UNARY_NEGATIVE 564
+#define _UNARY_INVERT 583
+#define _UNARY_NEGATIVE 584
#define _UNARY_NOT UNARY_NOT
#define _UNPACK_EX UNPACK_EX
-#define _UNPACK_SEQUENCE 565
-#define _UNPACK_SEQUENCE_LIST 566
-#define _UNPACK_SEQUENCE_TUPLE 567
-#define _UNPACK_SEQUENCE_TWO_TUPLE 568
+#define _UNPACK_SEQUENCE 585
+#define _UNPACK_SEQUENCE_LIST 586
+#define _UNPACK_SEQUENCE_TUPLE 587
+#define _UNPACK_SEQUENCE_TWO_TUPLE 588
#define _WITH_EXCEPT_START WITH_EXCEPT_START
-#define _YIELD_VALUE YIELD_VALUE
-#define MAX_UOP_ID 568
-#define _BINARY_OP_r21 569
-#define _BINARY_OP_ADD_FLOAT_r03 570
-#define _BINARY_OP_ADD_FLOAT_r13 571
-#define _BINARY_OP_ADD_FLOAT_r23 572
-#define _BINARY_OP_ADD_INT_r03 573
-#define _BINARY_OP_ADD_INT_r13 574
-#define _BINARY_OP_ADD_INT_r23 575
-#define _BINARY_OP_ADD_UNICODE_r03 576
-#define _BINARY_OP_ADD_UNICODE_r13 577
-#define _BINARY_OP_ADD_UNICODE_r23 578
-#define _BINARY_OP_EXTEND_r21 579
-#define _BINARY_OP_INPLACE_ADD_UNICODE_r21 580
-#define _BINARY_OP_MULTIPLY_FLOAT_r03 581
-#define _BINARY_OP_MULTIPLY_FLOAT_r13 582
-#define _BINARY_OP_MULTIPLY_FLOAT_r23 583
-#define _BINARY_OP_MULTIPLY_INT_r03 584
-#define _BINARY_OP_MULTIPLY_INT_r13 585
-#define _BINARY_OP_MULTIPLY_INT_r23 586
-#define _BINARY_OP_SUBSCR_CHECK_FUNC_r23 587
-#define _BINARY_OP_SUBSCR_DICT_r23 588
-#define _BINARY_OP_SUBSCR_INIT_CALL_r01 589
-#define _BINARY_OP_SUBSCR_INIT_CALL_r11 590
-#define _BINARY_OP_SUBSCR_INIT_CALL_r21 591
-#define _BINARY_OP_SUBSCR_INIT_CALL_r31 592
-#define _BINARY_OP_SUBSCR_LIST_INT_r23 593
-#define _BINARY_OP_SUBSCR_LIST_SLICE_r21 594
-#define _BINARY_OP_SUBSCR_STR_INT_r23 595
-#define _BINARY_OP_SUBSCR_TUPLE_INT_r03 596
-#define _BINARY_OP_SUBSCR_TUPLE_INT_r13 597
-#define _BINARY_OP_SUBSCR_TUPLE_INT_r23 598
-#define _BINARY_OP_SUBSCR_USTR_INT_r23 599
-#define _BINARY_OP_SUBTRACT_FLOAT_r03 600
-#define _BINARY_OP_SUBTRACT_FLOAT_r13 601
-#define _BINARY_OP_SUBTRACT_FLOAT_r23 602
-#define _BINARY_OP_SUBTRACT_INT_r03 603
-#define _BINARY_OP_SUBTRACT_INT_r13 604
-#define _BINARY_OP_SUBTRACT_INT_r23 605
-#define _BINARY_SLICE_r31 606
-#define _BUILD_INTERPOLATION_r01 607
-#define _BUILD_LIST_r01 608
-#define _BUILD_MAP_r01 609
-#define _BUILD_SET_r01 610
-#define _BUILD_SLICE_r01 611
-#define _BUILD_STRING_r01 612
-#define _BUILD_TEMPLATE_r21 613
-#define _BUILD_TUPLE_r01 614
-#define _CALL_BUILTIN_CLASS_r01 615
-#define _CALL_BUILTIN_FAST_r01 616
-#define _CALL_BUILTIN_FAST_WITH_KEYWORDS_r01 617
-#define _CALL_BUILTIN_O_r03 618
-#define _CALL_FUNCTION_EX_NON_PY_GENERAL_r31 619
-#define _CALL_INTRINSIC_1_r11 620
-#define _CALL_INTRINSIC_2_r21 621
-#define _CALL_ISINSTANCE_r31 622
-#define _CALL_KW_NON_PY_r11 623
-#define _CALL_LEN_r33 624
-#define _CALL_LIST_APPEND_r03 625
-#define _CALL_LIST_APPEND_r13 626
-#define _CALL_LIST_APPEND_r23 627
-#define _CALL_LIST_APPEND_r33 628
-#define _CALL_METHOD_DESCRIPTOR_FAST_r01 629
-#define _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS_r01 630
-#define _CALL_METHOD_DESCRIPTOR_NOARGS_r01 631
-#define _CALL_METHOD_DESCRIPTOR_O_r03 632
-#define _CALL_NON_PY_GENERAL_r01 633
-#define _CALL_STR_1_r32 634
-#define _CALL_TUPLE_1_r32 635
-#define _CALL_TYPE_1_r02 636
-#define _CALL_TYPE_1_r12 637
-#define _CALL_TYPE_1_r22 638
-#define _CALL_TYPE_1_r32 639
-#define _CHECK_AND_ALLOCATE_OBJECT_r00 640
-#define _CHECK_ATTR_CLASS_r01 641
-#define _CHECK_ATTR_CLASS_r11 642
-#define _CHECK_ATTR_CLASS_r22 643
-#define _CHECK_ATTR_CLASS_r33 644
-#define _CHECK_ATTR_METHOD_LAZY_DICT_r01 645
-#define _CHECK_ATTR_METHOD_LAZY_DICT_r11 646
-#define _CHECK_ATTR_METHOD_LAZY_DICT_r22 647
-#define _CHECK_ATTR_METHOD_LAZY_DICT_r33 648
-#define _CHECK_CALL_BOUND_METHOD_EXACT_ARGS_r00 649
-#define _CHECK_EG_MATCH_r22 650
-#define _CHECK_EXC_MATCH_r22 651
-#define _CHECK_FUNCTION_EXACT_ARGS_r00 652
-#define _CHECK_FUNCTION_VERSION_r00 653
-#define _CHECK_FUNCTION_VERSION_INLINE_r00 654
-#define _CHECK_FUNCTION_VERSION_INLINE_r11 655
-#define _CHECK_FUNCTION_VERSION_INLINE_r22 656
-#define _CHECK_FUNCTION_VERSION_INLINE_r33 657
-#define _CHECK_FUNCTION_VERSION_KW_r11 658
-#define _CHECK_IS_NOT_PY_CALLABLE_r00 659
-#define _CHECK_IS_NOT_PY_CALLABLE_EX_r03 660
-#define _CHECK_IS_NOT_PY_CALLABLE_EX_r13 661
-#define _CHECK_IS_NOT_PY_CALLABLE_EX_r23 662
-#define _CHECK_IS_NOT_PY_CALLABLE_EX_r33 663
-#define _CHECK_IS_NOT_PY_CALLABLE_KW_r11 664
-#define _CHECK_IS_PY_CALLABLE_EX_r03 665
-#define _CHECK_IS_PY_CALLABLE_EX_r13 666
-#define _CHECK_IS_PY_CALLABLE_EX_r23 667
-#define _CHECK_IS_PY_CALLABLE_EX_r33 668
-#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r01 669
-#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r11 670
-#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r22 671
-#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r33 672
-#define _CHECK_METHOD_VERSION_r00 673
-#define _CHECK_METHOD_VERSION_KW_r11 674
-#define _CHECK_PEP_523_r00 675
-#define _CHECK_PEP_523_r11 676
-#define _CHECK_PEP_523_r22 677
-#define _CHECK_PEP_523_r33 678
-#define _CHECK_PERIODIC_r00 679
-#define _CHECK_PERIODIC_AT_END_r00 680
-#define _CHECK_PERIODIC_IF_NOT_YIELD_FROM_r00 681
-#define _CHECK_RECURSION_REMAINING_r00 682
-#define _CHECK_RECURSION_REMAINING_r11 683
-#define _CHECK_RECURSION_REMAINING_r22 684
-#define _CHECK_RECURSION_REMAINING_r33 685
-#define _CHECK_STACK_SPACE_r00 686
-#define _CHECK_STACK_SPACE_OPERAND_r00 687
-#define _CHECK_STACK_SPACE_OPERAND_r11 688
-#define _CHECK_STACK_SPACE_OPERAND_r22 689
-#define _CHECK_STACK_SPACE_OPERAND_r33 690
-#define _CHECK_VALIDITY_r00 691
-#define _CHECK_VALIDITY_r11 692
-#define _CHECK_VALIDITY_r22 693
-#define _CHECK_VALIDITY_r33 694
-#define _COLD_DYNAMIC_EXIT_r00 695
-#define _COLD_EXIT_r00 696
-#define _COMPARE_OP_r21 697
-#define _COMPARE_OP_FLOAT_r03 698
-#define _COMPARE_OP_FLOAT_r13 699
-#define _COMPARE_OP_FLOAT_r23 700
-#define _COMPARE_OP_INT_r23 701
-#define _COMPARE_OP_STR_r23 702
-#define _CONTAINS_OP_r23 703
-#define _CONTAINS_OP_DICT_r23 704
-#define _CONTAINS_OP_SET_r23 705
-#define _CONVERT_VALUE_r11 706
-#define _COPY_r01 707
-#define _COPY_1_r02 708
-#define _COPY_1_r12 709
-#define _COPY_1_r23 710
-#define _COPY_2_r03 711
-#define _COPY_2_r13 712
-#define _COPY_2_r23 713
-#define _COPY_3_r03 714
-#define _COPY_3_r13 715
-#define _COPY_3_r23 716
-#define _COPY_3_r33 717
-#define _COPY_FREE_VARS_r00 718
-#define _COPY_FREE_VARS_r11 719
-#define _COPY_FREE_VARS_r22 720
-#define _COPY_FREE_VARS_r33 721
-#define _CREATE_INIT_FRAME_r01 722
-#define _DELETE_ATTR_r10 723
-#define _DELETE_DEREF_r00 724
-#define _DELETE_FAST_r00 725
-#define _DELETE_GLOBAL_r00 726
-#define _DELETE_NAME_r00 727
-#define _DELETE_SUBSCR_r20 728
-#define _DEOPT_r00 729
-#define _DEOPT_r10 730
-#define _DEOPT_r20 731
-#define _DEOPT_r30 732
-#define _DICT_MERGE_r10 733
-#define _DICT_UPDATE_r10 734
-#define _DO_CALL_r01 735
-#define _DO_CALL_FUNCTION_EX_r31 736
-#define _DO_CALL_KW_r11 737
-#define _DYNAMIC_EXIT_r00 738
-#define _DYNAMIC_EXIT_r10 739
-#define _DYNAMIC_EXIT_r20 740
-#define _DYNAMIC_EXIT_r30 741
-#define _END_FOR_r10 742
-#define _END_SEND_r21 743
-#define _ERROR_POP_N_r00 744
-#define _EXIT_INIT_CHECK_r10 745
-#define _EXIT_TRACE_r00 746
-#define _EXIT_TRACE_r10 747
-#define _EXIT_TRACE_r20 748
-#define _EXIT_TRACE_r30 749
-#define _EXPAND_METHOD_r00 750
-#define _EXPAND_METHOD_KW_r11 751
-#define _FATAL_ERROR_r00 752
-#define _FATAL_ERROR_r11 753
-#define _FATAL_ERROR_r22 754
-#define _FATAL_ERROR_r33 755
-#define _FORMAT_SIMPLE_r11 756
-#define _FORMAT_WITH_SPEC_r21 757
-#define _FOR_ITER_r23 758
-#define _FOR_ITER_GEN_FRAME_r03 759
-#define _FOR_ITER_GEN_FRAME_r13 760
-#define _FOR_ITER_GEN_FRAME_r23 761
-#define _FOR_ITER_TIER_TWO_r23 762
-#define _GET_AITER_r11 763
-#define _GET_ANEXT_r12 764
-#define _GET_AWAITABLE_r11 765
-#define _GET_ITER_r12 766
-#define _GET_LEN_r12 767
-#define _GET_YIELD_FROM_ITER_r11 768
-#define _GUARD_BINARY_OP_EXTEND_r22 769
-#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r02 770
-#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r12 771
-#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r22 772
-#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r33 773
-#define _GUARD_CALLABLE_ISINSTANCE_r03 774
-#define _GUARD_CALLABLE_ISINSTANCE_r13 775
-#define _GUARD_CALLABLE_ISINSTANCE_r23 776
-#define _GUARD_CALLABLE_ISINSTANCE_r33 777
-#define _GUARD_CALLABLE_LEN_r03 778
-#define _GUARD_CALLABLE_LEN_r13 779
-#define _GUARD_CALLABLE_LEN_r23 780
-#define _GUARD_CALLABLE_LEN_r33 781
-#define _GUARD_CALLABLE_LIST_APPEND_r03 782
-#define _GUARD_CALLABLE_LIST_APPEND_r13 783
-#define _GUARD_CALLABLE_LIST_APPEND_r23 784
-#define _GUARD_CALLABLE_LIST_APPEND_r33 785
-#define _GUARD_CALLABLE_STR_1_r03 786
-#define _GUARD_CALLABLE_STR_1_r13 787
-#define _GUARD_CALLABLE_STR_1_r23 788
-#define _GUARD_CALLABLE_STR_1_r33 789
-#define _GUARD_CALLABLE_TUPLE_1_r03 790
-#define _GUARD_CALLABLE_TUPLE_1_r13 791
-#define _GUARD_CALLABLE_TUPLE_1_r23 792
-#define _GUARD_CALLABLE_TUPLE_1_r33 793
-#define _GUARD_CALLABLE_TYPE_1_r03 794
-#define _GUARD_CALLABLE_TYPE_1_r13 795
-#define _GUARD_CALLABLE_TYPE_1_r23 796
-#define _GUARD_CALLABLE_TYPE_1_r33 797
-#define _GUARD_DORV_NO_DICT_r01 798
-#define _GUARD_DORV_NO_DICT_r11 799
-#define _GUARD_DORV_NO_DICT_r22 800
-#define _GUARD_DORV_NO_DICT_r33 801
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r01 802
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r11 803
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r22 804
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r33 805
-#define _GUARD_GLOBALS_VERSION_r00 806
-#define _GUARD_GLOBALS_VERSION_r11 807
-#define _GUARD_GLOBALS_VERSION_r22 808
-#define _GUARD_GLOBALS_VERSION_r33 809
-#define _GUARD_IP_RETURN_GENERATOR_r00 810
-#define _GUARD_IP_RETURN_GENERATOR_r11 811
-#define _GUARD_IP_RETURN_GENERATOR_r22 812
-#define _GUARD_IP_RETURN_GENERATOR_r33 813
-#define _GUARD_IP_RETURN_VALUE_r00 814
-#define _GUARD_IP_RETURN_VALUE_r11 815
-#define _GUARD_IP_RETURN_VALUE_r22 816
-#define _GUARD_IP_RETURN_VALUE_r33 817
-#define _GUARD_IP_YIELD_VALUE_r00 818
-#define _GUARD_IP_YIELD_VALUE_r11 819
-#define _GUARD_IP_YIELD_VALUE_r22 820
-#define _GUARD_IP_YIELD_VALUE_r33 821
-#define _GUARD_IP__PUSH_FRAME_r00 822
-#define _GUARD_IP__PUSH_FRAME_r11 823
-#define _GUARD_IP__PUSH_FRAME_r22 824
-#define _GUARD_IP__PUSH_FRAME_r33 825
-#define _GUARD_IS_FALSE_POP_r00 826
-#define _GUARD_IS_FALSE_POP_r10 827
-#define _GUARD_IS_FALSE_POP_r21 828
-#define _GUARD_IS_FALSE_POP_r32 829
-#define _GUARD_IS_NONE_POP_r00 830
-#define _GUARD_IS_NONE_POP_r10 831
-#define _GUARD_IS_NONE_POP_r21 832
-#define _GUARD_IS_NONE_POP_r32 833
-#define _GUARD_IS_NOT_NONE_POP_r10 834
-#define _GUARD_IS_TRUE_POP_r00 835
-#define _GUARD_IS_TRUE_POP_r10 836
-#define _GUARD_IS_TRUE_POP_r21 837
-#define _GUARD_IS_TRUE_POP_r32 838
-#define _GUARD_KEYS_VERSION_r01 839
-#define _GUARD_KEYS_VERSION_r11 840
-#define _GUARD_KEYS_VERSION_r22 841
-#define _GUARD_KEYS_VERSION_r33 842
-#define _GUARD_NOS_COMPACT_ASCII_r02 843
-#define _GUARD_NOS_COMPACT_ASCII_r12 844
-#define _GUARD_NOS_COMPACT_ASCII_r22 845
-#define _GUARD_NOS_COMPACT_ASCII_r33 846
-#define _GUARD_NOS_DICT_r02 847
-#define _GUARD_NOS_DICT_r12 848
-#define _GUARD_NOS_DICT_r22 849
-#define _GUARD_NOS_DICT_r33 850
-#define _GUARD_NOS_FLOAT_r02 851
-#define _GUARD_NOS_FLOAT_r12 852
-#define _GUARD_NOS_FLOAT_r22 853
-#define _GUARD_NOS_FLOAT_r33 854
-#define _GUARD_NOS_INT_r02 855
-#define _GUARD_NOS_INT_r12 856
-#define _GUARD_NOS_INT_r22 857
-#define _GUARD_NOS_INT_r33 858
-#define _GUARD_NOS_LIST_r02 859
-#define _GUARD_NOS_LIST_r12 860
-#define _GUARD_NOS_LIST_r22 861
-#define _GUARD_NOS_LIST_r33 862
-#define _GUARD_NOS_NOT_NULL_r02 863
-#define _GUARD_NOS_NOT_NULL_r12 864
-#define _GUARD_NOS_NOT_NULL_r22 865
-#define _GUARD_NOS_NOT_NULL_r33 866
-#define _GUARD_NOS_NULL_r02 867
-#define _GUARD_NOS_NULL_r12 868
-#define _GUARD_NOS_NULL_r22 869
-#define _GUARD_NOS_NULL_r33 870
-#define _GUARD_NOS_OVERFLOWED_r02 871
-#define _GUARD_NOS_OVERFLOWED_r12 872
-#define _GUARD_NOS_OVERFLOWED_r22 873
-#define _GUARD_NOS_OVERFLOWED_r33 874
-#define _GUARD_NOS_TUPLE_r02 875
-#define _GUARD_NOS_TUPLE_r12 876
-#define _GUARD_NOS_TUPLE_r22 877
-#define _GUARD_NOS_TUPLE_r33 878
-#define _GUARD_NOS_UNICODE_r02 879
-#define _GUARD_NOS_UNICODE_r12 880
-#define _GUARD_NOS_UNICODE_r22 881
-#define _GUARD_NOS_UNICODE_r33 882
-#define _GUARD_NOT_EXHAUSTED_LIST_r02 883
-#define _GUARD_NOT_EXHAUSTED_LIST_r12 884
-#define _GUARD_NOT_EXHAUSTED_LIST_r22 885
-#define _GUARD_NOT_EXHAUSTED_LIST_r33 886
-#define _GUARD_NOT_EXHAUSTED_RANGE_r02 887
-#define _GUARD_NOT_EXHAUSTED_RANGE_r12 888
-#define _GUARD_NOT_EXHAUSTED_RANGE_r22 889
-#define _GUARD_NOT_EXHAUSTED_RANGE_r33 890
-#define _GUARD_NOT_EXHAUSTED_TUPLE_r02 891
-#define _GUARD_NOT_EXHAUSTED_TUPLE_r12 892
-#define _GUARD_NOT_EXHAUSTED_TUPLE_r22 893
-#define _GUARD_NOT_EXHAUSTED_TUPLE_r33 894
-#define _GUARD_THIRD_NULL_r03 895
-#define _GUARD_THIRD_NULL_r13 896
-#define _GUARD_THIRD_NULL_r23 897
-#define _GUARD_THIRD_NULL_r33 898
-#define _GUARD_TOS_ANY_SET_r01 899
-#define _GUARD_TOS_ANY_SET_r11 900
-#define _GUARD_TOS_ANY_SET_r22 901
-#define _GUARD_TOS_ANY_SET_r33 902
-#define _GUARD_TOS_DICT_r01 903
-#define _GUARD_TOS_DICT_r11 904
-#define _GUARD_TOS_DICT_r22 905
-#define _GUARD_TOS_DICT_r33 906
-#define _GUARD_TOS_FLOAT_r01 907
-#define _GUARD_TOS_FLOAT_r11 908
-#define _GUARD_TOS_FLOAT_r22 909
-#define _GUARD_TOS_FLOAT_r33 910
-#define _GUARD_TOS_INT_r01 911
-#define _GUARD_TOS_INT_r11 912
-#define _GUARD_TOS_INT_r22 913
-#define _GUARD_TOS_INT_r33 914
-#define _GUARD_TOS_LIST_r01 915
-#define _GUARD_TOS_LIST_r11 916
-#define _GUARD_TOS_LIST_r22 917
-#define _GUARD_TOS_LIST_r33 918
-#define _GUARD_TOS_OVERFLOWED_r01 919
-#define _GUARD_TOS_OVERFLOWED_r11 920
-#define _GUARD_TOS_OVERFLOWED_r22 921
-#define _GUARD_TOS_OVERFLOWED_r33 922
-#define _GUARD_TOS_SLICE_r01 923
-#define _GUARD_TOS_SLICE_r11 924
-#define _GUARD_TOS_SLICE_r22 925
-#define _GUARD_TOS_SLICE_r33 926
-#define _GUARD_TOS_TUPLE_r01 927
-#define _GUARD_TOS_TUPLE_r11 928
-#define _GUARD_TOS_TUPLE_r22 929
-#define _GUARD_TOS_TUPLE_r33 930
-#define _GUARD_TOS_UNICODE_r01 931
-#define _GUARD_TOS_UNICODE_r11 932
-#define _GUARD_TOS_UNICODE_r22 933
-#define _GUARD_TOS_UNICODE_r33 934
-#define _GUARD_TYPE_VERSION_r01 935
-#define _GUARD_TYPE_VERSION_r11 936
-#define _GUARD_TYPE_VERSION_r22 937
-#define _GUARD_TYPE_VERSION_r33 938
-#define _GUARD_TYPE_VERSION_AND_LOCK_r01 939
-#define _GUARD_TYPE_VERSION_AND_LOCK_r11 940
-#define _GUARD_TYPE_VERSION_AND_LOCK_r22 941
-#define _GUARD_TYPE_VERSION_AND_LOCK_r33 942
-#define _HANDLE_PENDING_AND_DEOPT_r00 943
-#define _HANDLE_PENDING_AND_DEOPT_r10 944
-#define _HANDLE_PENDING_AND_DEOPT_r20 945
-#define _HANDLE_PENDING_AND_DEOPT_r30 946
-#define _IMPORT_FROM_r12 947
-#define _IMPORT_NAME_r21 948
-#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS_r00 949
-#define _INIT_CALL_PY_EXACT_ARGS_r01 950
-#define _INIT_CALL_PY_EXACT_ARGS_0_r01 951
-#define _INIT_CALL_PY_EXACT_ARGS_1_r01 952
-#define _INIT_CALL_PY_EXACT_ARGS_2_r01 953
-#define _INIT_CALL_PY_EXACT_ARGS_3_r01 954
-#define _INIT_CALL_PY_EXACT_ARGS_4_r01 955
-#define _INSERT_1_LOAD_CONST_INLINE_BORROW_r02 956
-#define _INSERT_1_LOAD_CONST_INLINE_BORROW_r12 957
-#define _INSERT_1_LOAD_CONST_INLINE_BORROW_r23 958
-#define _INSERT_2_LOAD_CONST_INLINE_BORROW_r03 959
-#define _INSERT_2_LOAD_CONST_INLINE_BORROW_r13 960
-#define _INSERT_2_LOAD_CONST_INLINE_BORROW_r23 961
-#define _INSERT_NULL_r10 962
-#define _INSTRUMENTED_FOR_ITER_r23 963
-#define _INSTRUMENTED_INSTRUCTION_r00 964
-#define _INSTRUMENTED_JUMP_FORWARD_r00 965
-#define _INSTRUMENTED_JUMP_FORWARD_r11 966
-#define _INSTRUMENTED_JUMP_FORWARD_r22 967
-#define _INSTRUMENTED_JUMP_FORWARD_r33 968
-#define _INSTRUMENTED_LINE_r00 969
-#define _INSTRUMENTED_NOT_TAKEN_r00 970
-#define _INSTRUMENTED_NOT_TAKEN_r11 971
-#define _INSTRUMENTED_NOT_TAKEN_r22 972
-#define _INSTRUMENTED_NOT_TAKEN_r33 973
-#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r00 974
-#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r10 975
-#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r21 976
-#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r32 977
-#define _INSTRUMENTED_POP_JUMP_IF_NONE_r10 978
-#define _INSTRUMENTED_POP_JUMP_IF_NOT_NONE_r10 979
-#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r00 980
-#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r10 981
-#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r21 982
-#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r32 983
-#define _IS_NONE_r11 984
-#define _IS_OP_r03 985
-#define _IS_OP_r13 986
-#define _IS_OP_r23 987
-#define _ITER_CHECK_LIST_r02 988
-#define _ITER_CHECK_LIST_r12 989
-#define _ITER_CHECK_LIST_r22 990
-#define _ITER_CHECK_LIST_r33 991
-#define _ITER_CHECK_RANGE_r02 992
-#define _ITER_CHECK_RANGE_r12 993
-#define _ITER_CHECK_RANGE_r22 994
-#define _ITER_CHECK_RANGE_r33 995
-#define _ITER_CHECK_TUPLE_r02 996
-#define _ITER_CHECK_TUPLE_r12 997
-#define _ITER_CHECK_TUPLE_r22 998
-#define _ITER_CHECK_TUPLE_r33 999
-#define _ITER_JUMP_LIST_r02 1000
-#define _ITER_JUMP_LIST_r12 1001
-#define _ITER_JUMP_LIST_r22 1002
-#define _ITER_JUMP_LIST_r33 1003
-#define _ITER_JUMP_RANGE_r02 1004
-#define _ITER_JUMP_RANGE_r12 1005
-#define _ITER_JUMP_RANGE_r22 1006
-#define _ITER_JUMP_RANGE_r33 1007
-#define _ITER_JUMP_TUPLE_r02 1008
-#define _ITER_JUMP_TUPLE_r12 1009
-#define _ITER_JUMP_TUPLE_r22 1010
-#define _ITER_JUMP_TUPLE_r33 1011
-#define _ITER_NEXT_LIST_r23 1012
-#define _ITER_NEXT_LIST_TIER_TWO_r23 1013
-#define _ITER_NEXT_RANGE_r03 1014
-#define _ITER_NEXT_RANGE_r13 1015
-#define _ITER_NEXT_RANGE_r23 1016
-#define _ITER_NEXT_TUPLE_r03 1017
-#define _ITER_NEXT_TUPLE_r13 1018
-#define _ITER_NEXT_TUPLE_r23 1019
-#define _JUMP_BACKWARD_NO_INTERRUPT_r00 1020
-#define _JUMP_BACKWARD_NO_INTERRUPT_r11 1021
-#define _JUMP_BACKWARD_NO_INTERRUPT_r22 1022
-#define _JUMP_BACKWARD_NO_INTERRUPT_r33 1023
-#define _JUMP_TO_TOP_r00 1024
-#define _LIST_APPEND_r10 1025
-#define _LIST_EXTEND_r10 1026
-#define _LOAD_ATTR_r10 1027
-#define _LOAD_ATTR_CLASS_r11 1028
-#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN_r11 1029
-#define _LOAD_ATTR_INSTANCE_VALUE_r02 1030
-#define _LOAD_ATTR_INSTANCE_VALUE_r12 1031
-#define _LOAD_ATTR_INSTANCE_VALUE_r23 1032
-#define _LOAD_ATTR_METHOD_LAZY_DICT_r02 1033
-#define _LOAD_ATTR_METHOD_LAZY_DICT_r12 1034
-#define _LOAD_ATTR_METHOD_LAZY_DICT_r23 1035
-#define _LOAD_ATTR_METHOD_NO_DICT_r02 1036
-#define _LOAD_ATTR_METHOD_NO_DICT_r12 1037
-#define _LOAD_ATTR_METHOD_NO_DICT_r23 1038
-#define _LOAD_ATTR_METHOD_WITH_VALUES_r02 1039
-#define _LOAD_ATTR_METHOD_WITH_VALUES_r12 1040
-#define _LOAD_ATTR_METHOD_WITH_VALUES_r23 1041
-#define _LOAD_ATTR_MODULE_r11 1042
-#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT_r11 1043
-#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES_r11 1044
-#define _LOAD_ATTR_PROPERTY_FRAME_r11 1045
-#define _LOAD_ATTR_SLOT_r02 1046
-#define _LOAD_ATTR_SLOT_r12 1047
-#define _LOAD_ATTR_SLOT_r23 1048
-#define _LOAD_ATTR_WITH_HINT_r12 1049
-#define _LOAD_BUILD_CLASS_r01 1050
-#define _LOAD_BYTECODE_r00 1051
-#define _LOAD_COMMON_CONSTANT_r01 1052
-#define _LOAD_COMMON_CONSTANT_r12 1053
-#define _LOAD_COMMON_CONSTANT_r23 1054
-#define _LOAD_CONST_r01 1055
-#define _LOAD_CONST_r12 1056
-#define _LOAD_CONST_r23 1057
-#define _LOAD_CONST_INLINE_r01 1058
-#define _LOAD_CONST_INLINE_r12 1059
-#define _LOAD_CONST_INLINE_r23 1060
-#define _LOAD_CONST_INLINE_BORROW_r01 1061
-#define _LOAD_CONST_INLINE_BORROW_r12 1062
-#define _LOAD_CONST_INLINE_BORROW_r23 1063
-#define _LOAD_CONST_UNDER_INLINE_r02 1064
-#define _LOAD_CONST_UNDER_INLINE_r12 1065
-#define _LOAD_CONST_UNDER_INLINE_r23 1066
-#define _LOAD_CONST_UNDER_INLINE_BORROW_r02 1067
-#define _LOAD_CONST_UNDER_INLINE_BORROW_r12 1068
-#define _LOAD_CONST_UNDER_INLINE_BORROW_r23 1069
-#define _LOAD_DEREF_r01 1070
-#define _LOAD_FAST_r01 1071
-#define _LOAD_FAST_r12 1072
-#define _LOAD_FAST_r23 1073
-#define _LOAD_FAST_0_r01 1074
-#define _LOAD_FAST_0_r12 1075
-#define _LOAD_FAST_0_r23 1076
-#define _LOAD_FAST_1_r01 1077
-#define _LOAD_FAST_1_r12 1078
-#define _LOAD_FAST_1_r23 1079
-#define _LOAD_FAST_2_r01 1080
-#define _LOAD_FAST_2_r12 1081
-#define _LOAD_FAST_2_r23 1082
-#define _LOAD_FAST_3_r01 1083
-#define _LOAD_FAST_3_r12 1084
-#define _LOAD_FAST_3_r23 1085
-#define _LOAD_FAST_4_r01 1086
-#define _LOAD_FAST_4_r12 1087
-#define _LOAD_FAST_4_r23 1088
-#define _LOAD_FAST_5_r01 1089
-#define _LOAD_FAST_5_r12 1090
-#define _LOAD_FAST_5_r23 1091
-#define _LOAD_FAST_6_r01 1092
-#define _LOAD_FAST_6_r12 1093
-#define _LOAD_FAST_6_r23 1094
-#define _LOAD_FAST_7_r01 1095
-#define _LOAD_FAST_7_r12 1096
-#define _LOAD_FAST_7_r23 1097
-#define _LOAD_FAST_AND_CLEAR_r01 1098
-#define _LOAD_FAST_AND_CLEAR_r12 1099
-#define _LOAD_FAST_AND_CLEAR_r23 1100
-#define _LOAD_FAST_BORROW_r01 1101
-#define _LOAD_FAST_BORROW_r12 1102
-#define _LOAD_FAST_BORROW_r23 1103
-#define _LOAD_FAST_BORROW_0_r01 1104
-#define _LOAD_FAST_BORROW_0_r12 1105
-#define _LOAD_FAST_BORROW_0_r23 1106
-#define _LOAD_FAST_BORROW_1_r01 1107
-#define _LOAD_FAST_BORROW_1_r12 1108
-#define _LOAD_FAST_BORROW_1_r23 1109
-#define _LOAD_FAST_BORROW_2_r01 1110
-#define _LOAD_FAST_BORROW_2_r12 1111
-#define _LOAD_FAST_BORROW_2_r23 1112
-#define _LOAD_FAST_BORROW_3_r01 1113
-#define _LOAD_FAST_BORROW_3_r12 1114
-#define _LOAD_FAST_BORROW_3_r23 1115
-#define _LOAD_FAST_BORROW_4_r01 1116
-#define _LOAD_FAST_BORROW_4_r12 1117
-#define _LOAD_FAST_BORROW_4_r23 1118
-#define _LOAD_FAST_BORROW_5_r01 1119
-#define _LOAD_FAST_BORROW_5_r12 1120
-#define _LOAD_FAST_BORROW_5_r23 1121
-#define _LOAD_FAST_BORROW_6_r01 1122
-#define _LOAD_FAST_BORROW_6_r12 1123
-#define _LOAD_FAST_BORROW_6_r23 1124
-#define _LOAD_FAST_BORROW_7_r01 1125
-#define _LOAD_FAST_BORROW_7_r12 1126
-#define _LOAD_FAST_BORROW_7_r23 1127
-#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r02 1128
-#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r13 1129
-#define _LOAD_FAST_CHECK_r01 1130
-#define _LOAD_FAST_CHECK_r12 1131
-#define _LOAD_FAST_CHECK_r23 1132
-#define _LOAD_FAST_LOAD_FAST_r02 1133
-#define _LOAD_FAST_LOAD_FAST_r13 1134
-#define _LOAD_FROM_DICT_OR_DEREF_r11 1135
-#define _LOAD_FROM_DICT_OR_GLOBALS_r11 1136
-#define _LOAD_GLOBAL_r00 1137
-#define _LOAD_GLOBAL_BUILTINS_r01 1138
-#define _LOAD_GLOBAL_MODULE_r01 1139
-#define _LOAD_LOCALS_r01 1140
-#define _LOAD_LOCALS_r12 1141
-#define _LOAD_LOCALS_r23 1142
-#define _LOAD_NAME_r01 1143
-#define _LOAD_SMALL_INT_r01 1144
-#define _LOAD_SMALL_INT_r12 1145
-#define _LOAD_SMALL_INT_r23 1146
-#define _LOAD_SMALL_INT_0_r01 1147
-#define _LOAD_SMALL_INT_0_r12 1148
-#define _LOAD_SMALL_INT_0_r23 1149
-#define _LOAD_SMALL_INT_1_r01 1150
-#define _LOAD_SMALL_INT_1_r12 1151
-#define _LOAD_SMALL_INT_1_r23 1152
-#define _LOAD_SMALL_INT_2_r01 1153
-#define _LOAD_SMALL_INT_2_r12 1154
-#define _LOAD_SMALL_INT_2_r23 1155
-#define _LOAD_SMALL_INT_3_r01 1156
-#define _LOAD_SMALL_INT_3_r12 1157
-#define _LOAD_SMALL_INT_3_r23 1158
-#define _LOAD_SPECIAL_r00 1159
-#define _LOAD_SUPER_ATTR_ATTR_r31 1160
-#define _LOAD_SUPER_ATTR_METHOD_r32 1161
-#define _MAKE_CALLARGS_A_TUPLE_r33 1162
-#define _MAKE_CELL_r00 1163
-#define _MAKE_FUNCTION_r11 1164
-#define _MAKE_WARM_r00 1165
-#define _MAKE_WARM_r11 1166
-#define _MAKE_WARM_r22 1167
-#define _MAKE_WARM_r33 1168
-#define _MAP_ADD_r20 1169
-#define _MATCH_CLASS_r31 1170
-#define _MATCH_KEYS_r23 1171
-#define _MATCH_MAPPING_r02 1172
-#define _MATCH_MAPPING_r12 1173
-#define _MATCH_MAPPING_r23 1174
-#define _MATCH_SEQUENCE_r02 1175
-#define _MATCH_SEQUENCE_r12 1176
-#define _MATCH_SEQUENCE_r23 1177
-#define _MAYBE_EXPAND_METHOD_r00 1178
-#define _MAYBE_EXPAND_METHOD_KW_r11 1179
-#define _MONITOR_CALL_r00 1180
-#define _MONITOR_CALL_KW_r11 1181
-#define _MONITOR_JUMP_BACKWARD_r00 1182
-#define _MONITOR_JUMP_BACKWARD_r11 1183
-#define _MONITOR_JUMP_BACKWARD_r22 1184
-#define _MONITOR_JUMP_BACKWARD_r33 1185
-#define _MONITOR_RESUME_r00 1186
-#define _NOP_r00 1187
-#define _NOP_r11 1188
-#define _NOP_r22 1189
-#define _NOP_r33 1190
-#define _POP_CALL_r20 1191
-#define _POP_CALL_LOAD_CONST_INLINE_BORROW_r21 1192
-#define _POP_CALL_ONE_r30 1193
-#define _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW_r31 1194
-#define _POP_CALL_TWO_r30 1195
-#define _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW_r31 1196
-#define _POP_EXCEPT_r10 1197
-#define _POP_ITER_r20 1198
-#define _POP_JUMP_IF_FALSE_r00 1199
-#define _POP_JUMP_IF_FALSE_r10 1200
-#define _POP_JUMP_IF_FALSE_r21 1201
-#define _POP_JUMP_IF_FALSE_r32 1202
-#define _POP_JUMP_IF_TRUE_r00 1203
-#define _POP_JUMP_IF_TRUE_r10 1204
-#define _POP_JUMP_IF_TRUE_r21 1205
-#define _POP_JUMP_IF_TRUE_r32 1206
-#define _POP_TOP_r10 1207
-#define _POP_TOP_FLOAT_r00 1208
-#define _POP_TOP_FLOAT_r10 1209
-#define _POP_TOP_FLOAT_r21 1210
-#define _POP_TOP_FLOAT_r32 1211
-#define _POP_TOP_INT_r00 1212
-#define _POP_TOP_INT_r10 1213
-#define _POP_TOP_INT_r21 1214
-#define _POP_TOP_INT_r32 1215
-#define _POP_TOP_LOAD_CONST_INLINE_r11 1216
-#define _POP_TOP_LOAD_CONST_INLINE_BORROW_r11 1217
-#define _POP_TOP_NOP_r00 1218
-#define _POP_TOP_NOP_r10 1219
-#define _POP_TOP_NOP_r21 1220
-#define _POP_TOP_NOP_r32 1221
-#define _POP_TOP_UNICODE_r00 1222
-#define _POP_TOP_UNICODE_r10 1223
-#define _POP_TOP_UNICODE_r21 1224
-#define _POP_TOP_UNICODE_r32 1225
-#define _POP_TWO_r20 1226
-#define _POP_TWO_LOAD_CONST_INLINE_BORROW_r21 1227
-#define _PUSH_EXC_INFO_r02 1228
-#define _PUSH_EXC_INFO_r12 1229
-#define _PUSH_EXC_INFO_r23 1230
-#define _PUSH_FRAME_r10 1231
-#define _PUSH_NULL_r01 1232
-#define _PUSH_NULL_r12 1233
-#define _PUSH_NULL_r23 1234
-#define _PUSH_NULL_CONDITIONAL_r00 1235
-#define _PY_FRAME_EX_r31 1236
-#define _PY_FRAME_GENERAL_r01 1237
-#define _PY_FRAME_KW_r11 1238
-#define _QUICKEN_RESUME_r00 1239
-#define _QUICKEN_RESUME_r11 1240
-#define _QUICKEN_RESUME_r22 1241
-#define _QUICKEN_RESUME_r33 1242
-#define _REPLACE_WITH_TRUE_r02 1243
-#define _REPLACE_WITH_TRUE_r12 1244
-#define _REPLACE_WITH_TRUE_r23 1245
-#define _RESUME_CHECK_r00 1246
-#define _RESUME_CHECK_r11 1247
-#define _RESUME_CHECK_r22 1248
-#define _RESUME_CHECK_r33 1249
-#define _RETURN_GENERATOR_r01 1250
-#define _RETURN_VALUE_r11 1251
-#define _SAVE_RETURN_OFFSET_r00 1252
-#define _SAVE_RETURN_OFFSET_r11 1253
-#define _SAVE_RETURN_OFFSET_r22 1254
-#define _SAVE_RETURN_OFFSET_r33 1255
-#define _SEND_r22 1256
-#define _SEND_GEN_FRAME_r22 1257
-#define _SETUP_ANNOTATIONS_r00 1258
-#define _SET_ADD_r10 1259
-#define _SET_FUNCTION_ATTRIBUTE_r01 1260
-#define _SET_FUNCTION_ATTRIBUTE_r11 1261
-#define _SET_FUNCTION_ATTRIBUTE_r21 1262
-#define _SET_FUNCTION_ATTRIBUTE_r32 1263
-#define _SET_IP_r00 1264
-#define _SET_IP_r11 1265
-#define _SET_IP_r22 1266
-#define _SET_IP_r33 1267
-#define _SET_UPDATE_r10 1268
-#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r02 1269
-#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r12 1270
-#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r22 1271
-#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r32 1272
-#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r03 1273
-#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r13 1274
-#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r23 1275
-#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r33 1276
-#define _SPILL_OR_RELOAD_r01 1277
-#define _SPILL_OR_RELOAD_r02 1278
-#define _SPILL_OR_RELOAD_r03 1279
-#define _SPILL_OR_RELOAD_r10 1280
-#define _SPILL_OR_RELOAD_r12 1281
-#define _SPILL_OR_RELOAD_r13 1282
-#define _SPILL_OR_RELOAD_r20 1283
-#define _SPILL_OR_RELOAD_r21 1284
-#define _SPILL_OR_RELOAD_r23 1285
-#define _SPILL_OR_RELOAD_r30 1286
-#define _SPILL_OR_RELOAD_r31 1287
-#define _SPILL_OR_RELOAD_r32 1288
-#define _START_EXECUTOR_r00 1289
-#define _STORE_ATTR_r20 1290
-#define _STORE_ATTR_INSTANCE_VALUE_r21 1291
-#define _STORE_ATTR_SLOT_r21 1292
-#define _STORE_ATTR_WITH_HINT_r21 1293
-#define _STORE_DEREF_r10 1294
-#define _STORE_FAST_LOAD_FAST_r11 1295
-#define _STORE_FAST_STORE_FAST_r20 1296
-#define _STORE_GLOBAL_r10 1297
-#define _STORE_NAME_r10 1298
-#define _STORE_SLICE_r30 1299
-#define _STORE_SUBSCR_r30 1300
-#define _STORE_SUBSCR_DICT_r31 1301
-#define _STORE_SUBSCR_LIST_INT_r32 1302
-#define _SWAP_r11 1303
-#define _SWAP_2_r02 1304
-#define _SWAP_2_r12 1305
-#define _SWAP_2_r22 1306
-#define _SWAP_2_r33 1307
-#define _SWAP_3_r03 1308
-#define _SWAP_3_r13 1309
-#define _SWAP_3_r23 1310
-#define _SWAP_3_r33 1311
-#define _SWAP_FAST_r01 1312
-#define _SWAP_FAST_r11 1313
-#define _SWAP_FAST_r22 1314
-#define _SWAP_FAST_r33 1315
-#define _SWAP_FAST_0_r01 1316
-#define _SWAP_FAST_0_r11 1317
-#define _SWAP_FAST_0_r22 1318
-#define _SWAP_FAST_0_r33 1319
-#define _SWAP_FAST_1_r01 1320
-#define _SWAP_FAST_1_r11 1321
-#define _SWAP_FAST_1_r22 1322
-#define _SWAP_FAST_1_r33 1323
-#define _SWAP_FAST_2_r01 1324
-#define _SWAP_FAST_2_r11 1325
-#define _SWAP_FAST_2_r22 1326
-#define _SWAP_FAST_2_r33 1327
-#define _SWAP_FAST_3_r01 1328
-#define _SWAP_FAST_3_r11 1329
-#define _SWAP_FAST_3_r22 1330
-#define _SWAP_FAST_3_r33 1331
-#define _SWAP_FAST_4_r01 1332
-#define _SWAP_FAST_4_r11 1333
-#define _SWAP_FAST_4_r22 1334
-#define _SWAP_FAST_4_r33 1335
-#define _SWAP_FAST_5_r01 1336
-#define _SWAP_FAST_5_r11 1337
-#define _SWAP_FAST_5_r22 1338
-#define _SWAP_FAST_5_r33 1339
-#define _SWAP_FAST_6_r01 1340
-#define _SWAP_FAST_6_r11 1341
-#define _SWAP_FAST_6_r22 1342
-#define _SWAP_FAST_6_r33 1343
-#define _SWAP_FAST_7_r01 1344
-#define _SWAP_FAST_7_r11 1345
-#define _SWAP_FAST_7_r22 1346
-#define _SWAP_FAST_7_r33 1347
-#define _TIER2_RESUME_CHECK_r00 1348
-#define _TIER2_RESUME_CHECK_r11 1349
-#define _TIER2_RESUME_CHECK_r22 1350
-#define _TIER2_RESUME_CHECK_r33 1351
-#define _TO_BOOL_r11 1352
-#define _TO_BOOL_BOOL_r01 1353
-#define _TO_BOOL_BOOL_r11 1354
-#define _TO_BOOL_BOOL_r22 1355
-#define _TO_BOOL_BOOL_r33 1356
-#define _TO_BOOL_INT_r02 1357
-#define _TO_BOOL_INT_r12 1358
-#define _TO_BOOL_INT_r23 1359
-#define _TO_BOOL_LIST_r02 1360
-#define _TO_BOOL_LIST_r12 1361
-#define _TO_BOOL_LIST_r23 1362
-#define _TO_BOOL_NONE_r01 1363
-#define _TO_BOOL_NONE_r11 1364
-#define _TO_BOOL_NONE_r22 1365
-#define _TO_BOOL_NONE_r33 1366
-#define _TO_BOOL_STR_r02 1367
-#define _TO_BOOL_STR_r12 1368
-#define _TO_BOOL_STR_r23 1369
-#define _TRACE_RECORD_r00 1370
-#define _UNARY_INVERT_r12 1371
-#define _UNARY_NEGATIVE_r12 1372
-#define _UNARY_NOT_r01 1373
-#define _UNARY_NOT_r11 1374
-#define _UNARY_NOT_r22 1375
-#define _UNARY_NOT_r33 1376
-#define _UNPACK_EX_r10 1377
-#define _UNPACK_SEQUENCE_r10 1378
-#define _UNPACK_SEQUENCE_LIST_r10 1379
-#define _UNPACK_SEQUENCE_TUPLE_r10 1380
-#define _UNPACK_SEQUENCE_TWO_TUPLE_r12 1381
-#define _WITH_EXCEPT_START_r33 1382
-#define _YIELD_VALUE_r11 1383
-#define MAX_UOP_REGS_ID 1383
+#define _YIELD_VALUE 589
+#define MAX_UOP_ID 589
+#define _BINARY_OP_r23 590
+#define _BINARY_OP_ADD_FLOAT_r03 591
+#define _BINARY_OP_ADD_FLOAT_r13 592
+#define _BINARY_OP_ADD_FLOAT_r23 593
+#define _BINARY_OP_ADD_INT_r03 594
+#define _BINARY_OP_ADD_INT_r13 595
+#define _BINARY_OP_ADD_INT_r23 596
+#define _BINARY_OP_ADD_UNICODE_r03 597
+#define _BINARY_OP_ADD_UNICODE_r13 598
+#define _BINARY_OP_ADD_UNICODE_r23 599
+#define _BINARY_OP_EXTEND_r23 600
+#define _BINARY_OP_INPLACE_ADD_UNICODE_r21 601
+#define _BINARY_OP_MULTIPLY_FLOAT_r03 602
+#define _BINARY_OP_MULTIPLY_FLOAT_r13 603
+#define _BINARY_OP_MULTIPLY_FLOAT_r23 604
+#define _BINARY_OP_MULTIPLY_INT_r03 605
+#define _BINARY_OP_MULTIPLY_INT_r13 606
+#define _BINARY_OP_MULTIPLY_INT_r23 607
+#define _BINARY_OP_SUBSCR_CHECK_FUNC_r23 608
+#define _BINARY_OP_SUBSCR_DICT_r23 609
+#define _BINARY_OP_SUBSCR_INIT_CALL_r01 610
+#define _BINARY_OP_SUBSCR_INIT_CALL_r11 611
+#define _BINARY_OP_SUBSCR_INIT_CALL_r21 612
+#define _BINARY_OP_SUBSCR_INIT_CALL_r31 613
+#define _BINARY_OP_SUBSCR_LIST_INT_r23 614
+#define _BINARY_OP_SUBSCR_LIST_SLICE_r21 615
+#define _BINARY_OP_SUBSCR_STR_INT_r23 616
+#define _BINARY_OP_SUBSCR_TUPLE_INT_r03 617
+#define _BINARY_OP_SUBSCR_TUPLE_INT_r13 618
+#define _BINARY_OP_SUBSCR_TUPLE_INT_r23 619
+#define _BINARY_OP_SUBSCR_USTR_INT_r23 620
+#define _BINARY_OP_SUBTRACT_FLOAT_r03 621
+#define _BINARY_OP_SUBTRACT_FLOAT_r13 622
+#define _BINARY_OP_SUBTRACT_FLOAT_r23 623
+#define _BINARY_OP_SUBTRACT_INT_r03 624
+#define _BINARY_OP_SUBTRACT_INT_r13 625
+#define _BINARY_OP_SUBTRACT_INT_r23 626
+#define _BINARY_SLICE_r31 627
+#define _BUILD_INTERPOLATION_r01 628
+#define _BUILD_LIST_r01 629
+#define _BUILD_MAP_r01 630
+#define _BUILD_SET_r01 631
+#define _BUILD_SLICE_r01 632
+#define _BUILD_STRING_r01 633
+#define _BUILD_TEMPLATE_r21 634
+#define _BUILD_TUPLE_r01 635
+#define _CALL_BUILTIN_CLASS_r01 636
+#define _CALL_BUILTIN_FAST_r01 637
+#define _CALL_BUILTIN_FAST_WITH_KEYWORDS_r01 638
+#define _CALL_BUILTIN_O_r03 639
+#define _CALL_FUNCTION_EX_NON_PY_GENERAL_r31 640
+#define _CALL_INTRINSIC_1_r11 641
+#define _CALL_INTRINSIC_2_r21 642
+#define _CALL_ISINSTANCE_r31 643
+#define _CALL_KW_NON_PY_r11 644
+#define _CALL_LEN_r33 645
+#define _CALL_LIST_APPEND_r03 646
+#define _CALL_LIST_APPEND_r13 647
+#define _CALL_LIST_APPEND_r23 648
+#define _CALL_LIST_APPEND_r33 649
+#define _CALL_METHOD_DESCRIPTOR_FAST_r01 650
+#define _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS_r01 651
+#define _CALL_METHOD_DESCRIPTOR_NOARGS_r01 652
+#define _CALL_METHOD_DESCRIPTOR_O_r03 653
+#define _CALL_NON_PY_GENERAL_r01 654
+#define _CALL_STR_1_r32 655
+#define _CALL_TUPLE_1_r32 656
+#define _CALL_TYPE_1_r02 657
+#define _CALL_TYPE_1_r12 658
+#define _CALL_TYPE_1_r22 659
+#define _CALL_TYPE_1_r32 660
+#define _CHECK_AND_ALLOCATE_OBJECT_r00 661
+#define _CHECK_ATTR_CLASS_r01 662
+#define _CHECK_ATTR_CLASS_r11 663
+#define _CHECK_ATTR_CLASS_r22 664
+#define _CHECK_ATTR_CLASS_r33 665
+#define _CHECK_ATTR_METHOD_LAZY_DICT_r01 666
+#define _CHECK_ATTR_METHOD_LAZY_DICT_r11 667
+#define _CHECK_ATTR_METHOD_LAZY_DICT_r22 668
+#define _CHECK_ATTR_METHOD_LAZY_DICT_r33 669
+#define _CHECK_CALL_BOUND_METHOD_EXACT_ARGS_r00 670
+#define _CHECK_EG_MATCH_r22 671
+#define _CHECK_EXC_MATCH_r22 672
+#define _CHECK_FUNCTION_EXACT_ARGS_r00 673
+#define _CHECK_FUNCTION_VERSION_r00 674
+#define _CHECK_FUNCTION_VERSION_INLINE_r00 675
+#define _CHECK_FUNCTION_VERSION_INLINE_r11 676
+#define _CHECK_FUNCTION_VERSION_INLINE_r22 677
+#define _CHECK_FUNCTION_VERSION_INLINE_r33 678
+#define _CHECK_FUNCTION_VERSION_KW_r11 679
+#define _CHECK_IS_NOT_PY_CALLABLE_r00 680
+#define _CHECK_IS_NOT_PY_CALLABLE_EX_r03 681
+#define _CHECK_IS_NOT_PY_CALLABLE_EX_r13 682
+#define _CHECK_IS_NOT_PY_CALLABLE_EX_r23 683
+#define _CHECK_IS_NOT_PY_CALLABLE_EX_r33 684
+#define _CHECK_IS_NOT_PY_CALLABLE_KW_r11 685
+#define _CHECK_IS_PY_CALLABLE_EX_r03 686
+#define _CHECK_IS_PY_CALLABLE_EX_r13 687
+#define _CHECK_IS_PY_CALLABLE_EX_r23 688
+#define _CHECK_IS_PY_CALLABLE_EX_r33 689
+#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r01 690
+#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r11 691
+#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r22 692
+#define _CHECK_MANAGED_OBJECT_HAS_VALUES_r33 693
+#define _CHECK_METHOD_VERSION_r00 694
+#define _CHECK_METHOD_VERSION_KW_r11 695
+#define _CHECK_PEP_523_r00 696
+#define _CHECK_PEP_523_r11 697
+#define _CHECK_PEP_523_r22 698
+#define _CHECK_PEP_523_r33 699
+#define _CHECK_PERIODIC_r00 700
+#define _CHECK_PERIODIC_AT_END_r00 701
+#define _CHECK_PERIODIC_IF_NOT_YIELD_FROM_r00 702
+#define _CHECK_RECURSION_REMAINING_r00 703
+#define _CHECK_RECURSION_REMAINING_r11 704
+#define _CHECK_RECURSION_REMAINING_r22 705
+#define _CHECK_RECURSION_REMAINING_r33 706
+#define _CHECK_STACK_SPACE_r00 707
+#define _CHECK_STACK_SPACE_OPERAND_r00 708
+#define _CHECK_STACK_SPACE_OPERAND_r11 709
+#define _CHECK_STACK_SPACE_OPERAND_r22 710
+#define _CHECK_STACK_SPACE_OPERAND_r33 711
+#define _CHECK_VALIDITY_r00 712
+#define _CHECK_VALIDITY_r11 713
+#define _CHECK_VALIDITY_r22 714
+#define _CHECK_VALIDITY_r33 715
+#define _COLD_DYNAMIC_EXIT_r00 716
+#define _COLD_EXIT_r00 717
+#define _COMPARE_OP_r21 718
+#define _COMPARE_OP_FLOAT_r03 719
+#define _COMPARE_OP_FLOAT_r13 720
+#define _COMPARE_OP_FLOAT_r23 721
+#define _COMPARE_OP_INT_r23 722
+#define _COMPARE_OP_STR_r23 723
+#define _CONTAINS_OP_r23 724
+#define _CONTAINS_OP_DICT_r23 725
+#define _CONTAINS_OP_SET_r23 726
+#define _CONVERT_VALUE_r11 727
+#define _COPY_r01 728
+#define _COPY_1_r02 729
+#define _COPY_1_r12 730
+#define _COPY_1_r23 731
+#define _COPY_2_r03 732
+#define _COPY_2_r13 733
+#define _COPY_2_r23 734
+#define _COPY_3_r03 735
+#define _COPY_3_r13 736
+#define _COPY_3_r23 737
+#define _COPY_3_r33 738
+#define _COPY_FREE_VARS_r00 739
+#define _COPY_FREE_VARS_r11 740
+#define _COPY_FREE_VARS_r22 741
+#define _COPY_FREE_VARS_r33 742
+#define _CREATE_INIT_FRAME_r01 743
+#define _DELETE_ATTR_r10 744
+#define _DELETE_DEREF_r00 745
+#define _DELETE_FAST_r00 746
+#define _DELETE_GLOBAL_r00 747
+#define _DELETE_NAME_r00 748
+#define _DELETE_SUBSCR_r20 749
+#define _DEOPT_r00 750
+#define _DEOPT_r10 751
+#define _DEOPT_r20 752
+#define _DEOPT_r30 753
+#define _DICT_MERGE_r10 754
+#define _DICT_UPDATE_r10 755
+#define _DO_CALL_r01 756
+#define _DO_CALL_FUNCTION_EX_r31 757
+#define _DO_CALL_KW_r11 758
+#define _DYNAMIC_EXIT_r00 759
+#define _DYNAMIC_EXIT_r10 760
+#define _DYNAMIC_EXIT_r20 761
+#define _DYNAMIC_EXIT_r30 762
+#define _END_FOR_r10 763
+#define _END_SEND_r21 764
+#define _ERROR_POP_N_r00 765
+#define _EXIT_INIT_CHECK_r10 766
+#define _EXIT_TRACE_r00 767
+#define _EXIT_TRACE_r10 768
+#define _EXIT_TRACE_r20 769
+#define _EXIT_TRACE_r30 770
+#define _EXPAND_METHOD_r00 771
+#define _EXPAND_METHOD_KW_r11 772
+#define _FATAL_ERROR_r00 773
+#define _FATAL_ERROR_r11 774
+#define _FATAL_ERROR_r22 775
+#define _FATAL_ERROR_r33 776
+#define _FORMAT_SIMPLE_r11 777
+#define _FORMAT_WITH_SPEC_r21 778
+#define _FOR_ITER_r23 779
+#define _FOR_ITER_GEN_FRAME_r03 780
+#define _FOR_ITER_GEN_FRAME_r13 781
+#define _FOR_ITER_GEN_FRAME_r23 782
+#define _FOR_ITER_TIER_TWO_r23 783
+#define _GET_AITER_r11 784
+#define _GET_ANEXT_r12 785
+#define _GET_AWAITABLE_r11 786
+#define _GET_ITER_r12 787
+#define _GET_LEN_r12 788
+#define _GET_YIELD_FROM_ITER_r11 789
+#define _GUARD_BINARY_OP_EXTEND_r22 790
+#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r02 791
+#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r12 792
+#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r22 793
+#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r33 794
+#define _GUARD_BIT_IS_SET_POP_r00 795
+#define _GUARD_BIT_IS_SET_POP_r10 796
+#define _GUARD_BIT_IS_SET_POP_r21 797
+#define _GUARD_BIT_IS_SET_POP_r32 798
+#define _GUARD_BIT_IS_SET_POP_4_r00 799
+#define _GUARD_BIT_IS_SET_POP_4_r10 800
+#define _GUARD_BIT_IS_SET_POP_4_r21 801
+#define _GUARD_BIT_IS_SET_POP_4_r32 802
+#define _GUARD_BIT_IS_SET_POP_5_r00 803
+#define _GUARD_BIT_IS_SET_POP_5_r10 804
+#define _GUARD_BIT_IS_SET_POP_5_r21 805
+#define _GUARD_BIT_IS_SET_POP_5_r32 806
+#define _GUARD_BIT_IS_SET_POP_6_r00 807
+#define _GUARD_BIT_IS_SET_POP_6_r10 808
+#define _GUARD_BIT_IS_SET_POP_6_r21 809
+#define _GUARD_BIT_IS_SET_POP_6_r32 810
+#define _GUARD_BIT_IS_SET_POP_7_r00 811
+#define _GUARD_BIT_IS_SET_POP_7_r10 812
+#define _GUARD_BIT_IS_SET_POP_7_r21 813
+#define _GUARD_BIT_IS_SET_POP_7_r32 814
+#define _GUARD_BIT_IS_UNSET_POP_r00 815
+#define _GUARD_BIT_IS_UNSET_POP_r10 816
+#define _GUARD_BIT_IS_UNSET_POP_r21 817
+#define _GUARD_BIT_IS_UNSET_POP_r32 818
+#define _GUARD_BIT_IS_UNSET_POP_4_r00 819
+#define _GUARD_BIT_IS_UNSET_POP_4_r10 820
+#define _GUARD_BIT_IS_UNSET_POP_4_r21 821
+#define _GUARD_BIT_IS_UNSET_POP_4_r32 822
+#define _GUARD_BIT_IS_UNSET_POP_5_r00 823
+#define _GUARD_BIT_IS_UNSET_POP_5_r10 824
+#define _GUARD_BIT_IS_UNSET_POP_5_r21 825
+#define _GUARD_BIT_IS_UNSET_POP_5_r32 826
+#define _GUARD_BIT_IS_UNSET_POP_6_r00 827
+#define _GUARD_BIT_IS_UNSET_POP_6_r10 828
+#define _GUARD_BIT_IS_UNSET_POP_6_r21 829
+#define _GUARD_BIT_IS_UNSET_POP_6_r32 830
+#define _GUARD_BIT_IS_UNSET_POP_7_r00 831
+#define _GUARD_BIT_IS_UNSET_POP_7_r10 832
+#define _GUARD_BIT_IS_UNSET_POP_7_r21 833
+#define _GUARD_BIT_IS_UNSET_POP_7_r32 834
+#define _GUARD_CALLABLE_ISINSTANCE_r03 835
+#define _GUARD_CALLABLE_ISINSTANCE_r13 836
+#define _GUARD_CALLABLE_ISINSTANCE_r23 837
+#define _GUARD_CALLABLE_ISINSTANCE_r33 838
+#define _GUARD_CALLABLE_LEN_r03 839
+#define _GUARD_CALLABLE_LEN_r13 840
+#define _GUARD_CALLABLE_LEN_r23 841
+#define _GUARD_CALLABLE_LEN_r33 842
+#define _GUARD_CALLABLE_LIST_APPEND_r03 843
+#define _GUARD_CALLABLE_LIST_APPEND_r13 844
+#define _GUARD_CALLABLE_LIST_APPEND_r23 845
+#define _GUARD_CALLABLE_LIST_APPEND_r33 846
+#define _GUARD_CALLABLE_STR_1_r03 847
+#define _GUARD_CALLABLE_STR_1_r13 848
+#define _GUARD_CALLABLE_STR_1_r23 849
+#define _GUARD_CALLABLE_STR_1_r33 850
+#define _GUARD_CALLABLE_TUPLE_1_r03 851
+#define _GUARD_CALLABLE_TUPLE_1_r13 852
+#define _GUARD_CALLABLE_TUPLE_1_r23 853
+#define _GUARD_CALLABLE_TUPLE_1_r33 854
+#define _GUARD_CALLABLE_TYPE_1_r03 855
+#define _GUARD_CALLABLE_TYPE_1_r13 856
+#define _GUARD_CALLABLE_TYPE_1_r23 857
+#define _GUARD_CALLABLE_TYPE_1_r33 858
+#define _GUARD_DORV_NO_DICT_r01 859
+#define _GUARD_DORV_NO_DICT_r11 860
+#define _GUARD_DORV_NO_DICT_r22 861
+#define _GUARD_DORV_NO_DICT_r33 862
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r01 863
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r11 864
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r22 865
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r33 866
+#define _GUARD_GLOBALS_VERSION_r00 867
+#define _GUARD_GLOBALS_VERSION_r11 868
+#define _GUARD_GLOBALS_VERSION_r22 869
+#define _GUARD_GLOBALS_VERSION_r33 870
+#define _GUARD_IP_RETURN_GENERATOR_r00 871
+#define _GUARD_IP_RETURN_GENERATOR_r11 872
+#define _GUARD_IP_RETURN_GENERATOR_r22 873
+#define _GUARD_IP_RETURN_GENERATOR_r33 874
+#define _GUARD_IP_RETURN_VALUE_r00 875
+#define _GUARD_IP_RETURN_VALUE_r11 876
+#define _GUARD_IP_RETURN_VALUE_r22 877
+#define _GUARD_IP_RETURN_VALUE_r33 878
+#define _GUARD_IP_YIELD_VALUE_r00 879
+#define _GUARD_IP_YIELD_VALUE_r11 880
+#define _GUARD_IP_YIELD_VALUE_r22 881
+#define _GUARD_IP_YIELD_VALUE_r33 882
+#define _GUARD_IP__PUSH_FRAME_r00 883
+#define _GUARD_IP__PUSH_FRAME_r11 884
+#define _GUARD_IP__PUSH_FRAME_r22 885
+#define _GUARD_IP__PUSH_FRAME_r33 886
+#define _GUARD_IS_FALSE_POP_r00 887
+#define _GUARD_IS_FALSE_POP_r10 888
+#define _GUARD_IS_FALSE_POP_r21 889
+#define _GUARD_IS_FALSE_POP_r32 890
+#define _GUARD_IS_NONE_POP_r00 891
+#define _GUARD_IS_NONE_POP_r10 892
+#define _GUARD_IS_NONE_POP_r21 893
+#define _GUARD_IS_NONE_POP_r32 894
+#define _GUARD_IS_NOT_NONE_POP_r10 895
+#define _GUARD_IS_TRUE_POP_r00 896
+#define _GUARD_IS_TRUE_POP_r10 897
+#define _GUARD_IS_TRUE_POP_r21 898
+#define _GUARD_IS_TRUE_POP_r32 899
+#define _GUARD_KEYS_VERSION_r01 900
+#define _GUARD_KEYS_VERSION_r11 901
+#define _GUARD_KEYS_VERSION_r22 902
+#define _GUARD_KEYS_VERSION_r33 903
+#define _GUARD_NOS_COMPACT_ASCII_r02 904
+#define _GUARD_NOS_COMPACT_ASCII_r12 905
+#define _GUARD_NOS_COMPACT_ASCII_r22 906
+#define _GUARD_NOS_COMPACT_ASCII_r33 907
+#define _GUARD_NOS_DICT_r02 908
+#define _GUARD_NOS_DICT_r12 909
+#define _GUARD_NOS_DICT_r22 910
+#define _GUARD_NOS_DICT_r33 911
+#define _GUARD_NOS_FLOAT_r02 912
+#define _GUARD_NOS_FLOAT_r12 913
+#define _GUARD_NOS_FLOAT_r22 914
+#define _GUARD_NOS_FLOAT_r33 915
+#define _GUARD_NOS_INT_r02 916
+#define _GUARD_NOS_INT_r12 917
+#define _GUARD_NOS_INT_r22 918
+#define _GUARD_NOS_INT_r33 919
+#define _GUARD_NOS_LIST_r02 920
+#define _GUARD_NOS_LIST_r12 921
+#define _GUARD_NOS_LIST_r22 922
+#define _GUARD_NOS_LIST_r33 923
+#define _GUARD_NOS_NOT_NULL_r02 924
+#define _GUARD_NOS_NOT_NULL_r12 925
+#define _GUARD_NOS_NOT_NULL_r22 926
+#define _GUARD_NOS_NOT_NULL_r33 927
+#define _GUARD_NOS_NULL_r02 928
+#define _GUARD_NOS_NULL_r12 929
+#define _GUARD_NOS_NULL_r22 930
+#define _GUARD_NOS_NULL_r33 931
+#define _GUARD_NOS_OVERFLOWED_r02 932
+#define _GUARD_NOS_OVERFLOWED_r12 933
+#define _GUARD_NOS_OVERFLOWED_r22 934
+#define _GUARD_NOS_OVERFLOWED_r33 935
+#define _GUARD_NOS_TUPLE_r02 936
+#define _GUARD_NOS_TUPLE_r12 937
+#define _GUARD_NOS_TUPLE_r22 938
+#define _GUARD_NOS_TUPLE_r33 939
+#define _GUARD_NOS_UNICODE_r02 940
+#define _GUARD_NOS_UNICODE_r12 941
+#define _GUARD_NOS_UNICODE_r22 942
+#define _GUARD_NOS_UNICODE_r33 943
+#define _GUARD_NOT_EXHAUSTED_LIST_r02 944
+#define _GUARD_NOT_EXHAUSTED_LIST_r12 945
+#define _GUARD_NOT_EXHAUSTED_LIST_r22 946
+#define _GUARD_NOT_EXHAUSTED_LIST_r33 947
+#define _GUARD_NOT_EXHAUSTED_RANGE_r02 948
+#define _GUARD_NOT_EXHAUSTED_RANGE_r12 949
+#define _GUARD_NOT_EXHAUSTED_RANGE_r22 950
+#define _GUARD_NOT_EXHAUSTED_RANGE_r33 951
+#define _GUARD_NOT_EXHAUSTED_TUPLE_r02 952
+#define _GUARD_NOT_EXHAUSTED_TUPLE_r12 953
+#define _GUARD_NOT_EXHAUSTED_TUPLE_r22 954
+#define _GUARD_NOT_EXHAUSTED_TUPLE_r33 955
+#define _GUARD_THIRD_NULL_r03 956
+#define _GUARD_THIRD_NULL_r13 957
+#define _GUARD_THIRD_NULL_r23 958
+#define _GUARD_THIRD_NULL_r33 959
+#define _GUARD_TOS_ANY_SET_r01 960
+#define _GUARD_TOS_ANY_SET_r11 961
+#define _GUARD_TOS_ANY_SET_r22 962
+#define _GUARD_TOS_ANY_SET_r33 963
+#define _GUARD_TOS_DICT_r01 964
+#define _GUARD_TOS_DICT_r11 965
+#define _GUARD_TOS_DICT_r22 966
+#define _GUARD_TOS_DICT_r33 967
+#define _GUARD_TOS_FLOAT_r01 968
+#define _GUARD_TOS_FLOAT_r11 969
+#define _GUARD_TOS_FLOAT_r22 970
+#define _GUARD_TOS_FLOAT_r33 971
+#define _GUARD_TOS_INT_r01 972
+#define _GUARD_TOS_INT_r11 973
+#define _GUARD_TOS_INT_r22 974
+#define _GUARD_TOS_INT_r33 975
+#define _GUARD_TOS_LIST_r01 976
+#define _GUARD_TOS_LIST_r11 977
+#define _GUARD_TOS_LIST_r22 978
+#define _GUARD_TOS_LIST_r33 979
+#define _GUARD_TOS_OVERFLOWED_r01 980
+#define _GUARD_TOS_OVERFLOWED_r11 981
+#define _GUARD_TOS_OVERFLOWED_r22 982
+#define _GUARD_TOS_OVERFLOWED_r33 983
+#define _GUARD_TOS_SLICE_r01 984
+#define _GUARD_TOS_SLICE_r11 985
+#define _GUARD_TOS_SLICE_r22 986
+#define _GUARD_TOS_SLICE_r33 987
+#define _GUARD_TOS_TUPLE_r01 988
+#define _GUARD_TOS_TUPLE_r11 989
+#define _GUARD_TOS_TUPLE_r22 990
+#define _GUARD_TOS_TUPLE_r33 991
+#define _GUARD_TOS_UNICODE_r01 992
+#define _GUARD_TOS_UNICODE_r11 993
+#define _GUARD_TOS_UNICODE_r22 994
+#define _GUARD_TOS_UNICODE_r33 995
+#define _GUARD_TYPE_VERSION_r01 996
+#define _GUARD_TYPE_VERSION_r11 997
+#define _GUARD_TYPE_VERSION_r22 998
+#define _GUARD_TYPE_VERSION_r33 999
+#define _GUARD_TYPE_VERSION_AND_LOCK_r01 1000
+#define _GUARD_TYPE_VERSION_AND_LOCK_r11 1001
+#define _GUARD_TYPE_VERSION_AND_LOCK_r22 1002
+#define _GUARD_TYPE_VERSION_AND_LOCK_r33 1003
+#define _HANDLE_PENDING_AND_DEOPT_r00 1004
+#define _HANDLE_PENDING_AND_DEOPT_r10 1005
+#define _HANDLE_PENDING_AND_DEOPT_r20 1006
+#define _HANDLE_PENDING_AND_DEOPT_r30 1007
+#define _IMPORT_FROM_r12 1008
+#define _IMPORT_NAME_r21 1009
+#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS_r00 1010
+#define _INIT_CALL_PY_EXACT_ARGS_r01 1011
+#define _INIT_CALL_PY_EXACT_ARGS_0_r01 1012
+#define _INIT_CALL_PY_EXACT_ARGS_1_r01 1013
+#define _INIT_CALL_PY_EXACT_ARGS_2_r01 1014
+#define _INIT_CALL_PY_EXACT_ARGS_3_r01 1015
+#define _INIT_CALL_PY_EXACT_ARGS_4_r01 1016
+#define _INSERT_1_LOAD_CONST_INLINE_r02 1017
+#define _INSERT_1_LOAD_CONST_INLINE_r12 1018
+#define _INSERT_1_LOAD_CONST_INLINE_r23 1019
+#define _INSERT_1_LOAD_CONST_INLINE_BORROW_r02 1020
+#define _INSERT_1_LOAD_CONST_INLINE_BORROW_r12 1021
+#define _INSERT_1_LOAD_CONST_INLINE_BORROW_r23 1022
+#define _INSERT_2_LOAD_CONST_INLINE_BORROW_r03 1023
+#define _INSERT_2_LOAD_CONST_INLINE_BORROW_r13 1024
+#define _INSERT_2_LOAD_CONST_INLINE_BORROW_r23 1025
+#define _INSERT_NULL_r10 1026
+#define _INSTRUMENTED_FOR_ITER_r23 1027
+#define _INSTRUMENTED_INSTRUCTION_r00 1028
+#define _INSTRUMENTED_JUMP_FORWARD_r00 1029
+#define _INSTRUMENTED_JUMP_FORWARD_r11 1030
+#define _INSTRUMENTED_JUMP_FORWARD_r22 1031
+#define _INSTRUMENTED_JUMP_FORWARD_r33 1032
+#define _INSTRUMENTED_LINE_r00 1033
+#define _INSTRUMENTED_NOT_TAKEN_r00 1034
+#define _INSTRUMENTED_NOT_TAKEN_r11 1035
+#define _INSTRUMENTED_NOT_TAKEN_r22 1036
+#define _INSTRUMENTED_NOT_TAKEN_r33 1037
+#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r00 1038
+#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r10 1039
+#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r21 1040
+#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r32 1041
+#define _INSTRUMENTED_POP_JUMP_IF_NONE_r10 1042
+#define _INSTRUMENTED_POP_JUMP_IF_NOT_NONE_r10 1043
+#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r00 1044
+#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r10 1045
+#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r21 1046
+#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r32 1047
+#define _IS_NONE_r11 1048
+#define _IS_OP_r03 1049
+#define _IS_OP_r13 1050
+#define _IS_OP_r23 1051
+#define _ITER_CHECK_LIST_r02 1052
+#define _ITER_CHECK_LIST_r12 1053
+#define _ITER_CHECK_LIST_r22 1054
+#define _ITER_CHECK_LIST_r33 1055
+#define _ITER_CHECK_RANGE_r02 1056
+#define _ITER_CHECK_RANGE_r12 1057
+#define _ITER_CHECK_RANGE_r22 1058
+#define _ITER_CHECK_RANGE_r33 1059
+#define _ITER_CHECK_TUPLE_r02 1060
+#define _ITER_CHECK_TUPLE_r12 1061
+#define _ITER_CHECK_TUPLE_r22 1062
+#define _ITER_CHECK_TUPLE_r33 1063
+#define _ITER_JUMP_LIST_r02 1064
+#define _ITER_JUMP_LIST_r12 1065
+#define _ITER_JUMP_LIST_r22 1066
+#define _ITER_JUMP_LIST_r33 1067
+#define _ITER_JUMP_RANGE_r02 1068
+#define _ITER_JUMP_RANGE_r12 1069
+#define _ITER_JUMP_RANGE_r22 1070
+#define _ITER_JUMP_RANGE_r33 1071
+#define _ITER_JUMP_TUPLE_r02 1072
+#define _ITER_JUMP_TUPLE_r12 1073
+#define _ITER_JUMP_TUPLE_r22 1074
+#define _ITER_JUMP_TUPLE_r33 1075
+#define _ITER_NEXT_LIST_r23 1076
+#define _ITER_NEXT_LIST_TIER_TWO_r23 1077
+#define _ITER_NEXT_RANGE_r03 1078
+#define _ITER_NEXT_RANGE_r13 1079
+#define _ITER_NEXT_RANGE_r23 1080
+#define _ITER_NEXT_TUPLE_r03 1081
+#define _ITER_NEXT_TUPLE_r13 1082
+#define _ITER_NEXT_TUPLE_r23 1083
+#define _JUMP_BACKWARD_NO_INTERRUPT_r00 1084
+#define _JUMP_BACKWARD_NO_INTERRUPT_r11 1085
+#define _JUMP_BACKWARD_NO_INTERRUPT_r22 1086
+#define _JUMP_BACKWARD_NO_INTERRUPT_r33 1087
+#define _JUMP_TO_TOP_r00 1088
+#define _LIST_APPEND_r10 1089
+#define _LIST_EXTEND_r10 1090
+#define _LOAD_ATTR_r10 1091
+#define _LOAD_ATTR_CLASS_r11 1092
+#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN_r11 1093
+#define _LOAD_ATTR_INSTANCE_VALUE_r02 1094
+#define _LOAD_ATTR_INSTANCE_VALUE_r12 1095
+#define _LOAD_ATTR_INSTANCE_VALUE_r23 1096
+#define _LOAD_ATTR_METHOD_LAZY_DICT_r02 1097
+#define _LOAD_ATTR_METHOD_LAZY_DICT_r12 1098
+#define _LOAD_ATTR_METHOD_LAZY_DICT_r23 1099
+#define _LOAD_ATTR_METHOD_NO_DICT_r02 1100
+#define _LOAD_ATTR_METHOD_NO_DICT_r12 1101
+#define _LOAD_ATTR_METHOD_NO_DICT_r23 1102
+#define _LOAD_ATTR_METHOD_WITH_VALUES_r02 1103
+#define _LOAD_ATTR_METHOD_WITH_VALUES_r12 1104
+#define _LOAD_ATTR_METHOD_WITH_VALUES_r23 1105
+#define _LOAD_ATTR_MODULE_r12 1106
+#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT_r11 1107
+#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES_r11 1108
+#define _LOAD_ATTR_PROPERTY_FRAME_r11 1109
+#define _LOAD_ATTR_SLOT_r02 1110
+#define _LOAD_ATTR_SLOT_r12 1111
+#define _LOAD_ATTR_SLOT_r23 1112
+#define _LOAD_ATTR_WITH_HINT_r12 1113
+#define _LOAD_BUILD_CLASS_r01 1114
+#define _LOAD_BYTECODE_r00 1115
+#define _LOAD_COMMON_CONSTANT_r01 1116
+#define _LOAD_COMMON_CONSTANT_r12 1117
+#define _LOAD_COMMON_CONSTANT_r23 1118
+#define _LOAD_CONST_r01 1119
+#define _LOAD_CONST_r12 1120
+#define _LOAD_CONST_r23 1121
+#define _LOAD_CONST_INLINE_r01 1122
+#define _LOAD_CONST_INLINE_r12 1123
+#define _LOAD_CONST_INLINE_r23 1124
+#define _LOAD_CONST_INLINE_BORROW_r01 1125
+#define _LOAD_CONST_INLINE_BORROW_r12 1126
+#define _LOAD_CONST_INLINE_BORROW_r23 1127
+#define _LOAD_CONST_UNDER_INLINE_r02 1128
+#define _LOAD_CONST_UNDER_INLINE_r12 1129
+#define _LOAD_CONST_UNDER_INLINE_r23 1130
+#define _LOAD_CONST_UNDER_INLINE_BORROW_r02 1131
+#define _LOAD_CONST_UNDER_INLINE_BORROW_r12 1132
+#define _LOAD_CONST_UNDER_INLINE_BORROW_r23 1133
+#define _LOAD_DEREF_r01 1134
+#define _LOAD_FAST_r01 1135
+#define _LOAD_FAST_r12 1136
+#define _LOAD_FAST_r23 1137
+#define _LOAD_FAST_0_r01 1138
+#define _LOAD_FAST_0_r12 1139
+#define _LOAD_FAST_0_r23 1140
+#define _LOAD_FAST_1_r01 1141
+#define _LOAD_FAST_1_r12 1142
+#define _LOAD_FAST_1_r23 1143
+#define _LOAD_FAST_2_r01 1144
+#define _LOAD_FAST_2_r12 1145
+#define _LOAD_FAST_2_r23 1146
+#define _LOAD_FAST_3_r01 1147
+#define _LOAD_FAST_3_r12 1148
+#define _LOAD_FAST_3_r23 1149
+#define _LOAD_FAST_4_r01 1150
+#define _LOAD_FAST_4_r12 1151
+#define _LOAD_FAST_4_r23 1152
+#define _LOAD_FAST_5_r01 1153
+#define _LOAD_FAST_5_r12 1154
+#define _LOAD_FAST_5_r23 1155
+#define _LOAD_FAST_6_r01 1156
+#define _LOAD_FAST_6_r12 1157
+#define _LOAD_FAST_6_r23 1158
+#define _LOAD_FAST_7_r01 1159
+#define _LOAD_FAST_7_r12 1160
+#define _LOAD_FAST_7_r23 1161
+#define _LOAD_FAST_AND_CLEAR_r01 1162
+#define _LOAD_FAST_AND_CLEAR_r12 1163
+#define _LOAD_FAST_AND_CLEAR_r23 1164
+#define _LOAD_FAST_BORROW_r01 1165
+#define _LOAD_FAST_BORROW_r12 1166
+#define _LOAD_FAST_BORROW_r23 1167
+#define _LOAD_FAST_BORROW_0_r01 1168
+#define _LOAD_FAST_BORROW_0_r12 1169
+#define _LOAD_FAST_BORROW_0_r23 1170
+#define _LOAD_FAST_BORROW_1_r01 1171
+#define _LOAD_FAST_BORROW_1_r12 1172
+#define _LOAD_FAST_BORROW_1_r23 1173
+#define _LOAD_FAST_BORROW_2_r01 1174
+#define _LOAD_FAST_BORROW_2_r12 1175
+#define _LOAD_FAST_BORROW_2_r23 1176
+#define _LOAD_FAST_BORROW_3_r01 1177
+#define _LOAD_FAST_BORROW_3_r12 1178
+#define _LOAD_FAST_BORROW_3_r23 1179
+#define _LOAD_FAST_BORROW_4_r01 1180
+#define _LOAD_FAST_BORROW_4_r12 1181
+#define _LOAD_FAST_BORROW_4_r23 1182
+#define _LOAD_FAST_BORROW_5_r01 1183
+#define _LOAD_FAST_BORROW_5_r12 1184
+#define _LOAD_FAST_BORROW_5_r23 1185
+#define _LOAD_FAST_BORROW_6_r01 1186
+#define _LOAD_FAST_BORROW_6_r12 1187
+#define _LOAD_FAST_BORROW_6_r23 1188
+#define _LOAD_FAST_BORROW_7_r01 1189
+#define _LOAD_FAST_BORROW_7_r12 1190
+#define _LOAD_FAST_BORROW_7_r23 1191
+#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r02 1192
+#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r13 1193
+#define _LOAD_FAST_CHECK_r01 1194
+#define _LOAD_FAST_CHECK_r12 1195
+#define _LOAD_FAST_CHECK_r23 1196
+#define _LOAD_FAST_LOAD_FAST_r02 1197
+#define _LOAD_FAST_LOAD_FAST_r13 1198
+#define _LOAD_FROM_DICT_OR_DEREF_r11 1199
+#define _LOAD_FROM_DICT_OR_GLOBALS_r11 1200
+#define _LOAD_GLOBAL_r00 1201
+#define _LOAD_GLOBAL_BUILTINS_r01 1202
+#define _LOAD_GLOBAL_MODULE_r01 1203
+#define _LOAD_LOCALS_r01 1204
+#define _LOAD_LOCALS_r12 1205
+#define _LOAD_LOCALS_r23 1206
+#define _LOAD_NAME_r01 1207
+#define _LOAD_SMALL_INT_r01 1208
+#define _LOAD_SMALL_INT_r12 1209
+#define _LOAD_SMALL_INT_r23 1210
+#define _LOAD_SMALL_INT_0_r01 1211
+#define _LOAD_SMALL_INT_0_r12 1212
+#define _LOAD_SMALL_INT_0_r23 1213
+#define _LOAD_SMALL_INT_1_r01 1214
+#define _LOAD_SMALL_INT_1_r12 1215
+#define _LOAD_SMALL_INT_1_r23 1216
+#define _LOAD_SMALL_INT_2_r01 1217
+#define _LOAD_SMALL_INT_2_r12 1218
+#define _LOAD_SMALL_INT_2_r23 1219
+#define _LOAD_SMALL_INT_3_r01 1220
+#define _LOAD_SMALL_INT_3_r12 1221
+#define _LOAD_SMALL_INT_3_r23 1222
+#define _LOAD_SPECIAL_r00 1223
+#define _LOAD_SUPER_ATTR_ATTR_r31 1224
+#define _LOAD_SUPER_ATTR_METHOD_r32 1225
+#define _MAKE_CALLARGS_A_TUPLE_r33 1226
+#define _MAKE_CELL_r00 1227
+#define _MAKE_FUNCTION_r11 1228
+#define _MAKE_WARM_r00 1229
+#define _MAKE_WARM_r11 1230
+#define _MAKE_WARM_r22 1231
+#define _MAKE_WARM_r33 1232
+#define _MAP_ADD_r20 1233
+#define _MATCH_CLASS_r31 1234
+#define _MATCH_KEYS_r23 1235
+#define _MATCH_MAPPING_r02 1236
+#define _MATCH_MAPPING_r12 1237
+#define _MATCH_MAPPING_r23 1238
+#define _MATCH_SEQUENCE_r02 1239
+#define _MATCH_SEQUENCE_r12 1240
+#define _MATCH_SEQUENCE_r23 1241
+#define _MAYBE_EXPAND_METHOD_r00 1242
+#define _MAYBE_EXPAND_METHOD_KW_r11 1243
+#define _MONITOR_CALL_r00 1244
+#define _MONITOR_CALL_KW_r11 1245
+#define _MONITOR_JUMP_BACKWARD_r00 1246
+#define _MONITOR_JUMP_BACKWARD_r11 1247
+#define _MONITOR_JUMP_BACKWARD_r22 1248
+#define _MONITOR_JUMP_BACKWARD_r33 1249
+#define _MONITOR_RESUME_r00 1250
+#define _NOP_r00 1251
+#define _NOP_r11 1252
+#define _NOP_r22 1253
+#define _NOP_r33 1254
+#define _POP_CALL_r20 1255
+#define _POP_CALL_LOAD_CONST_INLINE_BORROW_r21 1256
+#define _POP_CALL_ONE_r30 1257
+#define _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW_r31 1258
+#define _POP_CALL_TWO_r30 1259
+#define _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW_r31 1260
+#define _POP_EXCEPT_r10 1261
+#define _POP_ITER_r20 1262
+#define _POP_JUMP_IF_FALSE_r00 1263
+#define _POP_JUMP_IF_FALSE_r10 1264
+#define _POP_JUMP_IF_FALSE_r21 1265
+#define _POP_JUMP_IF_FALSE_r32 1266
+#define _POP_JUMP_IF_TRUE_r00 1267
+#define _POP_JUMP_IF_TRUE_r10 1268
+#define _POP_JUMP_IF_TRUE_r21 1269
+#define _POP_JUMP_IF_TRUE_r32 1270
+#define _POP_TOP_r10 1271
+#define _POP_TOP_FLOAT_r00 1272
+#define _POP_TOP_FLOAT_r10 1273
+#define _POP_TOP_FLOAT_r21 1274
+#define _POP_TOP_FLOAT_r32 1275
+#define _POP_TOP_INT_r00 1276
+#define _POP_TOP_INT_r10 1277
+#define _POP_TOP_INT_r21 1278
+#define _POP_TOP_INT_r32 1279
+#define _POP_TOP_LOAD_CONST_INLINE_r11 1280
+#define _POP_TOP_LOAD_CONST_INLINE_BORROW_r11 1281
+#define _POP_TOP_NOP_r00 1282
+#define _POP_TOP_NOP_r10 1283
+#define _POP_TOP_NOP_r21 1284
+#define _POP_TOP_NOP_r32 1285
+#define _POP_TOP_UNICODE_r00 1286
+#define _POP_TOP_UNICODE_r10 1287
+#define _POP_TOP_UNICODE_r21 1288
+#define _POP_TOP_UNICODE_r32 1289
+#define _POP_TWO_r20 1290
+#define _POP_TWO_LOAD_CONST_INLINE_BORROW_r21 1291
+#define _PUSH_EXC_INFO_r02 1292
+#define _PUSH_EXC_INFO_r12 1293
+#define _PUSH_EXC_INFO_r23 1294
+#define _PUSH_FRAME_r10 1295
+#define _PUSH_NULL_r01 1296
+#define _PUSH_NULL_r12 1297
+#define _PUSH_NULL_r23 1298
+#define _PUSH_NULL_CONDITIONAL_r00 1299
+#define _PY_FRAME_EX_r31 1300
+#define _PY_FRAME_GENERAL_r01 1301
+#define _PY_FRAME_KW_r11 1302
+#define _QUICKEN_RESUME_r00 1303
+#define _QUICKEN_RESUME_r11 1304
+#define _QUICKEN_RESUME_r22 1305
+#define _QUICKEN_RESUME_r33 1306
+#define _REPLACE_WITH_TRUE_r02 1307
+#define _REPLACE_WITH_TRUE_r12 1308
+#define _REPLACE_WITH_TRUE_r23 1309
+#define _RESUME_CHECK_r00 1310
+#define _RESUME_CHECK_r11 1311
+#define _RESUME_CHECK_r22 1312
+#define _RESUME_CHECK_r33 1313
+#define _RETURN_GENERATOR_r01 1314
+#define _RETURN_VALUE_r11 1315
+#define _SAVE_RETURN_OFFSET_r00 1316
+#define _SAVE_RETURN_OFFSET_r11 1317
+#define _SAVE_RETURN_OFFSET_r22 1318
+#define _SAVE_RETURN_OFFSET_r33 1319
+#define _SEND_r22 1320
+#define _SEND_GEN_FRAME_r22 1321
+#define _SETUP_ANNOTATIONS_r00 1322
+#define _SET_ADD_r10 1323
+#define _SET_FUNCTION_ATTRIBUTE_r01 1324
+#define _SET_FUNCTION_ATTRIBUTE_r11 1325
+#define _SET_FUNCTION_ATTRIBUTE_r21 1326
+#define _SET_FUNCTION_ATTRIBUTE_r32 1327
+#define _SET_IP_r00 1328
+#define _SET_IP_r11 1329
+#define _SET_IP_r22 1330
+#define _SET_IP_r33 1331
+#define _SET_UPDATE_r10 1332
+#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r02 1333
+#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r12 1334
+#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r22 1335
+#define _SHUFFLE_2_LOAD_CONST_INLINE_BORROW_r32 1336
+#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r03 1337
+#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r13 1338
+#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r23 1339
+#define _SHUFFLE_3_LOAD_CONST_INLINE_BORROW_r33 1340
+#define _SPILL_OR_RELOAD_r01 1341
+#define _SPILL_OR_RELOAD_r02 1342
+#define _SPILL_OR_RELOAD_r03 1343
+#define _SPILL_OR_RELOAD_r10 1344
+#define _SPILL_OR_RELOAD_r12 1345
+#define _SPILL_OR_RELOAD_r13 1346
+#define _SPILL_OR_RELOAD_r20 1347
+#define _SPILL_OR_RELOAD_r21 1348
+#define _SPILL_OR_RELOAD_r23 1349
+#define _SPILL_OR_RELOAD_r30 1350
+#define _SPILL_OR_RELOAD_r31 1351
+#define _SPILL_OR_RELOAD_r32 1352
+#define _START_EXECUTOR_r00 1353
+#define _STORE_ATTR_r20 1354
+#define _STORE_ATTR_INSTANCE_VALUE_r21 1355
+#define _STORE_ATTR_SLOT_r21 1356
+#define _STORE_ATTR_WITH_HINT_r21 1357
+#define _STORE_DEREF_r10 1358
+#define _STORE_FAST_LOAD_FAST_r11 1359
+#define _STORE_FAST_STORE_FAST_r20 1360
+#define _STORE_GLOBAL_r10 1361
+#define _STORE_NAME_r10 1362
+#define _STORE_SLICE_r30 1363
+#define _STORE_SUBSCR_r30 1364
+#define _STORE_SUBSCR_DICT_r31 1365
+#define _STORE_SUBSCR_LIST_INT_r32 1366
+#define _SWAP_r11 1367
+#define _SWAP_2_r02 1368
+#define _SWAP_2_r12 1369
+#define _SWAP_2_r22 1370
+#define _SWAP_2_r33 1371
+#define _SWAP_3_r03 1372
+#define _SWAP_3_r13 1373
+#define _SWAP_3_r23 1374
+#define _SWAP_3_r33 1375
+#define _SWAP_FAST_r01 1376
+#define _SWAP_FAST_r11 1377
+#define _SWAP_FAST_r22 1378
+#define _SWAP_FAST_r33 1379
+#define _SWAP_FAST_0_r01 1380
+#define _SWAP_FAST_0_r11 1381
+#define _SWAP_FAST_0_r22 1382
+#define _SWAP_FAST_0_r33 1383
+#define _SWAP_FAST_1_r01 1384
+#define _SWAP_FAST_1_r11 1385
+#define _SWAP_FAST_1_r22 1386
+#define _SWAP_FAST_1_r33 1387
+#define _SWAP_FAST_2_r01 1388
+#define _SWAP_FAST_2_r11 1389
+#define _SWAP_FAST_2_r22 1390
+#define _SWAP_FAST_2_r33 1391
+#define _SWAP_FAST_3_r01 1392
+#define _SWAP_FAST_3_r11 1393
+#define _SWAP_FAST_3_r22 1394
+#define _SWAP_FAST_3_r33 1395
+#define _SWAP_FAST_4_r01 1396
+#define _SWAP_FAST_4_r11 1397
+#define _SWAP_FAST_4_r22 1398
+#define _SWAP_FAST_4_r33 1399
+#define _SWAP_FAST_5_r01 1400
+#define _SWAP_FAST_5_r11 1401
+#define _SWAP_FAST_5_r22 1402
+#define _SWAP_FAST_5_r33 1403
+#define _SWAP_FAST_6_r01 1404
+#define _SWAP_FAST_6_r11 1405
+#define _SWAP_FAST_6_r22 1406
+#define _SWAP_FAST_6_r33 1407
+#define _SWAP_FAST_7_r01 1408
+#define _SWAP_FAST_7_r11 1409
+#define _SWAP_FAST_7_r22 1410
+#define _SWAP_FAST_7_r33 1411
+#define _TIER2_RESUME_CHECK_r00 1412
+#define _TIER2_RESUME_CHECK_r11 1413
+#define _TIER2_RESUME_CHECK_r22 1414
+#define _TIER2_RESUME_CHECK_r33 1415
+#define _TO_BOOL_r11 1416
+#define _TO_BOOL_BOOL_r01 1417
+#define _TO_BOOL_BOOL_r11 1418
+#define _TO_BOOL_BOOL_r22 1419
+#define _TO_BOOL_BOOL_r33 1420
+#define _TO_BOOL_INT_r02 1421
+#define _TO_BOOL_INT_r12 1422
+#define _TO_BOOL_INT_r23 1423
+#define _TO_BOOL_LIST_r02 1424
+#define _TO_BOOL_LIST_r12 1425
+#define _TO_BOOL_LIST_r23 1426
+#define _TO_BOOL_NONE_r01 1427
+#define _TO_BOOL_NONE_r11 1428
+#define _TO_BOOL_NONE_r22 1429
+#define _TO_BOOL_NONE_r33 1430
+#define _TO_BOOL_STR_r02 1431
+#define _TO_BOOL_STR_r12 1432
+#define _TO_BOOL_STR_r23 1433
+#define _TRACE_RECORD_r00 1434
+#define _UNARY_INVERT_r12 1435
+#define _UNARY_NEGATIVE_r12 1436
+#define _UNARY_NOT_r01 1437
+#define _UNARY_NOT_r11 1438
+#define _UNARY_NOT_r22 1439
+#define _UNARY_NOT_r33 1440
+#define _UNPACK_EX_r10 1441
+#define _UNPACK_SEQUENCE_r10 1442
+#define _UNPACK_SEQUENCE_LIST_r10 1443
+#define _UNPACK_SEQUENCE_TUPLE_r10 1444
+#define _UNPACK_SEQUENCE_TWO_TUPLE_r12 1445
+#define _WITH_EXCEPT_START_r33 1446
+#define _YIELD_VALUE_r11 1447
+#define MAX_UOP_REGS_ID 1447
#ifdef __cplusplus
}
diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h
index 7989c2f3366..85f2948ece4 100644
--- a/Include/internal/pycore_uop_metadata.h
+++ b/Include/internal/pycore_uop_metadata.h
@@ -115,7 +115,7 @@ const uint32_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_BINARY_OP_ADD_UNICODE] = HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_PURE_FLAG,
[_BINARY_OP_INPLACE_ADD_UNICODE] = HAS_LOCAL_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
[_GUARD_BINARY_OP_EXTEND] = HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
- [_BINARY_OP_EXTEND] = HAS_ESCAPES_FLAG,
+ [_BINARY_OP_EXTEND] = HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
[_BINARY_SLICE] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
[_STORE_SLICE] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
[_BINARY_OP_SUBSCR_LIST_INT] = HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
@@ -193,7 +193,7 @@ const uint32_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_GUARD_TYPE_VERSION_AND_LOCK] = HAS_EXIT_FLAG,
[_CHECK_MANAGED_OBJECT_HAS_VALUES] = HAS_DEOPT_FLAG,
[_LOAD_ATTR_INSTANCE_VALUE] = HAS_DEOPT_FLAG,
- [_LOAD_ATTR_MODULE] = HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
+ [_LOAD_ATTR_MODULE] = HAS_DEOPT_FLAG,
[_LOAD_ATTR_WITH_HINT] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG,
[_LOAD_ATTR_SLOT] = HAS_DEOPT_FLAG,
[_CHECK_ATTR_CLASS] = HAS_EXIT_FLAG,
@@ -323,6 +323,16 @@ const uint32_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_SWAP] = HAS_ARG_FLAG | HAS_PURE_FLAG,
[_GUARD_IS_TRUE_POP] = HAS_EXIT_FLAG,
[_GUARD_IS_FALSE_POP] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_SET_POP_4] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_SET_POP_5] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_SET_POP_6] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_SET_POP_7] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_SET_POP] = HAS_ARG_FLAG | HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_UNSET_POP_4] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_UNSET_POP_5] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_UNSET_POP_6] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_UNSET_POP_7] = HAS_EXIT_FLAG,
+ [_GUARD_BIT_IS_UNSET_POP] = HAS_ARG_FLAG | HAS_EXIT_FLAG,
[_GUARD_IS_NONE_POP] = HAS_EXIT_FLAG,
[_GUARD_IS_NOT_NONE_POP] = HAS_EXIT_FLAG | HAS_ESCAPES_FLAG,
[_JUMP_TO_TOP] = 0,
@@ -342,6 +352,7 @@ const uint32_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_POP_TWO_LOAD_CONST_INLINE_BORROW] = HAS_ESCAPES_FLAG,
[_POP_CALL_LOAD_CONST_INLINE_BORROW] = HAS_ESCAPES_FLAG,
[_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW] = HAS_ESCAPES_FLAG,
+ [_INSERT_1_LOAD_CONST_INLINE] = 0,
[_INSERT_1_LOAD_CONST_INLINE_BORROW] = 0,
[_INSERT_2_LOAD_CONST_INLINE_BORROW] = 0,
[_SHUFFLE_2_LOAD_CONST_INLINE_BORROW] = 0,
@@ -363,6 +374,13 @@ const uint32_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_GUARD_IP_YIELD_VALUE] = HAS_EXIT_FLAG,
[_GUARD_IP_RETURN_VALUE] = HAS_EXIT_FLAG,
[_GUARD_IP_RETURN_GENERATOR] = HAS_EXIT_FLAG,
+ [_RECORD_TOS] = HAS_RECORDS_VALUE_FLAG,
+ [_RECORD_TOS_TYPE] = HAS_RECORDS_VALUE_FLAG,
+ [_RECORD_NOS] = HAS_RECORDS_VALUE_FLAG,
+ [_RECORD_4OS] = HAS_RECORDS_VALUE_FLAG,
+ [_RECORD_CALLABLE] = HAS_ARG_FLAG | HAS_RECORDS_VALUE_FLAG,
+ [_RECORD_BOUND_METHOD] = HAS_ARG_FLAG | HAS_RECORDS_VALUE_FLAG,
+ [_RECORD_CALLER_CODE] = HAS_RECORDS_VALUE_FLAG,
};
const ReplicationRange _PyUop_Replication[MAX_UOP_ID+1] = {
@@ -373,6 +391,8 @@ const ReplicationRange _PyUop_Replication[MAX_UOP_ID+1] = {
[_INIT_CALL_PY_EXACT_ARGS] = { 0, 5 },
[_COPY] = { 1, 4 },
[_SWAP] = { 2, 4 },
+ [_GUARD_BIT_IS_SET_POP] = { 4, 8 },
+ [_GUARD_BIT_IS_UNSET_POP] = { 4, 8 },
};
const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = {
@@ -1101,7 +1121,7 @@ const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = {
.entries = {
{ -1, -1, -1 },
{ -1, -1, -1 },
- { 1, 2, _BINARY_OP_EXTEND_r21 },
+ { 3, 2, _BINARY_OP_EXTEND_r23 },
{ -1, -1, -1 },
},
},
@@ -1802,7 +1822,7 @@ const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = {
.best = { 1, 1, 1, 1 },
.entries = {
{ -1, -1, -1 },
- { 1, 1, _LOAD_ATTR_MODULE_r11 },
+ { 2, 1, _LOAD_ATTR_MODULE_r12 },
{ -1, -1, -1 },
{ -1, -1, -1 },
},
@@ -2919,7 +2939,7 @@ const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = {
.entries = {
{ -1, -1, -1 },
{ -1, -1, -1 },
- { 1, 2, _BINARY_OP_r21 },
+ { 3, 2, _BINARY_OP_r23 },
{ -1, -1, -1 },
},
},
@@ -2968,6 +2988,96 @@ const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = {
{ 2, 2, _GUARD_IS_FALSE_POP_r32 },
},
},
+ [_GUARD_BIT_IS_SET_POP_4] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_SET_POP_4_r00 },
+ { 0, 0, _GUARD_BIT_IS_SET_POP_4_r10 },
+ { 1, 1, _GUARD_BIT_IS_SET_POP_4_r21 },
+ { 2, 2, _GUARD_BIT_IS_SET_POP_4_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_SET_POP_5] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_SET_POP_5_r00 },
+ { 0, 0, _GUARD_BIT_IS_SET_POP_5_r10 },
+ { 1, 1, _GUARD_BIT_IS_SET_POP_5_r21 },
+ { 2, 2, _GUARD_BIT_IS_SET_POP_5_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_SET_POP_6] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_SET_POP_6_r00 },
+ { 0, 0, _GUARD_BIT_IS_SET_POP_6_r10 },
+ { 1, 1, _GUARD_BIT_IS_SET_POP_6_r21 },
+ { 2, 2, _GUARD_BIT_IS_SET_POP_6_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_SET_POP_7] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_SET_POP_7_r00 },
+ { 0, 0, _GUARD_BIT_IS_SET_POP_7_r10 },
+ { 1, 1, _GUARD_BIT_IS_SET_POP_7_r21 },
+ { 2, 2, _GUARD_BIT_IS_SET_POP_7_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_SET_POP] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_SET_POP_r00 },
+ { 0, 0, _GUARD_BIT_IS_SET_POP_r10 },
+ { 1, 1, _GUARD_BIT_IS_SET_POP_r21 },
+ { 2, 2, _GUARD_BIT_IS_SET_POP_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_UNSET_POP_4] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_4_r00 },
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_4_r10 },
+ { 1, 1, _GUARD_BIT_IS_UNSET_POP_4_r21 },
+ { 2, 2, _GUARD_BIT_IS_UNSET_POP_4_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_UNSET_POP_5] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_5_r00 },
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_5_r10 },
+ { 1, 1, _GUARD_BIT_IS_UNSET_POP_5_r21 },
+ { 2, 2, _GUARD_BIT_IS_UNSET_POP_5_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_UNSET_POP_6] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_6_r00 },
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_6_r10 },
+ { 1, 1, _GUARD_BIT_IS_UNSET_POP_6_r21 },
+ { 2, 2, _GUARD_BIT_IS_UNSET_POP_6_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_UNSET_POP_7] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_7_r00 },
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_7_r10 },
+ { 1, 1, _GUARD_BIT_IS_UNSET_POP_7_r21 },
+ { 2, 2, _GUARD_BIT_IS_UNSET_POP_7_r32 },
+ },
+ },
+ [_GUARD_BIT_IS_UNSET_POP] = {
+ .best = { 0, 1, 2, 3 },
+ .entries = {
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_r00 },
+ { 0, 0, _GUARD_BIT_IS_UNSET_POP_r10 },
+ { 1, 1, _GUARD_BIT_IS_UNSET_POP_r21 },
+ { 2, 2, _GUARD_BIT_IS_UNSET_POP_r32 },
+ },
+ },
[_GUARD_IS_NONE_POP] = {
.best = { 0, 1, 2, 3 },
.entries = {
@@ -3139,6 +3249,15 @@ const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = {
{ 1, 3, _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW_r31 },
},
},
+ [_INSERT_1_LOAD_CONST_INLINE] = {
+ .best = { 0, 1, 2, 2 },
+ .entries = {
+ { 2, 0, _INSERT_1_LOAD_CONST_INLINE_r02 },
+ { 2, 1, _INSERT_1_LOAD_CONST_INLINE_r12 },
+ { 3, 2, _INSERT_1_LOAD_CONST_INLINE_r23 },
+ { -1, -1, -1 },
+ },
+ },
[_INSERT_1_LOAD_CONST_INLINE_BORROW] = {
.best = { 0, 1, 2, 2 },
.entries = {
@@ -3568,7 +3687,7 @@ const uint16_t _PyUop_Uncached[MAX_UOP_REGS_ID+1] = {
[_BINARY_OP_ADD_UNICODE_r23] = _BINARY_OP_ADD_UNICODE,
[_BINARY_OP_INPLACE_ADD_UNICODE_r21] = _BINARY_OP_INPLACE_ADD_UNICODE,
[_GUARD_BINARY_OP_EXTEND_r22] = _GUARD_BINARY_OP_EXTEND,
- [_BINARY_OP_EXTEND_r21] = _BINARY_OP_EXTEND,
+ [_BINARY_OP_EXTEND_r23] = _BINARY_OP_EXTEND,
[_BINARY_SLICE_r31] = _BINARY_SLICE,
[_STORE_SLICE_r30] = _STORE_SLICE,
[_BINARY_OP_SUBSCR_LIST_INT_r23] = _BINARY_OP_SUBSCR_LIST_INT,
@@ -3687,7 +3806,7 @@ const uint16_t _PyUop_Uncached[MAX_UOP_REGS_ID+1] = {
[_LOAD_ATTR_INSTANCE_VALUE_r02] = _LOAD_ATTR_INSTANCE_VALUE,
[_LOAD_ATTR_INSTANCE_VALUE_r12] = _LOAD_ATTR_INSTANCE_VALUE,
[_LOAD_ATTR_INSTANCE_VALUE_r23] = _LOAD_ATTR_INSTANCE_VALUE,
- [_LOAD_ATTR_MODULE_r11] = _LOAD_ATTR_MODULE,
+ [_LOAD_ATTR_MODULE_r12] = _LOAD_ATTR_MODULE,
[_LOAD_ATTR_WITH_HINT_r12] = _LOAD_ATTR_WITH_HINT,
[_LOAD_ATTR_SLOT_r02] = _LOAD_ATTR_SLOT,
[_LOAD_ATTR_SLOT_r12] = _LOAD_ATTR_SLOT,
@@ -3929,7 +4048,7 @@ const uint16_t _PyUop_Uncached[MAX_UOP_REGS_ID+1] = {
[_COPY_3_r23] = _COPY_3,
[_COPY_3_r33] = _COPY_3,
[_COPY_r01] = _COPY,
- [_BINARY_OP_r21] = _BINARY_OP,
+ [_BINARY_OP_r23] = _BINARY_OP,
[_SWAP_2_r02] = _SWAP_2,
[_SWAP_2_r12] = _SWAP_2,
[_SWAP_2_r22] = _SWAP_2,
@@ -3947,6 +4066,46 @@ const uint16_t _PyUop_Uncached[MAX_UOP_REGS_ID+1] = {
[_GUARD_IS_FALSE_POP_r10] = _GUARD_IS_FALSE_POP,
[_GUARD_IS_FALSE_POP_r21] = _GUARD_IS_FALSE_POP,
[_GUARD_IS_FALSE_POP_r32] = _GUARD_IS_FALSE_POP,
+ [_GUARD_BIT_IS_SET_POP_4_r00] = _GUARD_BIT_IS_SET_POP_4,
+ [_GUARD_BIT_IS_SET_POP_4_r10] = _GUARD_BIT_IS_SET_POP_4,
+ [_GUARD_BIT_IS_SET_POP_4_r21] = _GUARD_BIT_IS_SET_POP_4,
+ [_GUARD_BIT_IS_SET_POP_4_r32] = _GUARD_BIT_IS_SET_POP_4,
+ [_GUARD_BIT_IS_SET_POP_5_r00] = _GUARD_BIT_IS_SET_POP_5,
+ [_GUARD_BIT_IS_SET_POP_5_r10] = _GUARD_BIT_IS_SET_POP_5,
+ [_GUARD_BIT_IS_SET_POP_5_r21] = _GUARD_BIT_IS_SET_POP_5,
+ [_GUARD_BIT_IS_SET_POP_5_r32] = _GUARD_BIT_IS_SET_POP_5,
+ [_GUARD_BIT_IS_SET_POP_6_r00] = _GUARD_BIT_IS_SET_POP_6,
+ [_GUARD_BIT_IS_SET_POP_6_r10] = _GUARD_BIT_IS_SET_POP_6,
+ [_GUARD_BIT_IS_SET_POP_6_r21] = _GUARD_BIT_IS_SET_POP_6,
+ [_GUARD_BIT_IS_SET_POP_6_r32] = _GUARD_BIT_IS_SET_POP_6,
+ [_GUARD_BIT_IS_SET_POP_7_r00] = _GUARD_BIT_IS_SET_POP_7,
+ [_GUARD_BIT_IS_SET_POP_7_r10] = _GUARD_BIT_IS_SET_POP_7,
+ [_GUARD_BIT_IS_SET_POP_7_r21] = _GUARD_BIT_IS_SET_POP_7,
+ [_GUARD_BIT_IS_SET_POP_7_r32] = _GUARD_BIT_IS_SET_POP_7,
+ [_GUARD_BIT_IS_SET_POP_r00] = _GUARD_BIT_IS_SET_POP,
+ [_GUARD_BIT_IS_SET_POP_r10] = _GUARD_BIT_IS_SET_POP,
+ [_GUARD_BIT_IS_SET_POP_r21] = _GUARD_BIT_IS_SET_POP,
+ [_GUARD_BIT_IS_SET_POP_r32] = _GUARD_BIT_IS_SET_POP,
+ [_GUARD_BIT_IS_UNSET_POP_4_r00] = _GUARD_BIT_IS_UNSET_POP_4,
+ [_GUARD_BIT_IS_UNSET_POP_4_r10] = _GUARD_BIT_IS_UNSET_POP_4,
+ [_GUARD_BIT_IS_UNSET_POP_4_r21] = _GUARD_BIT_IS_UNSET_POP_4,
+ [_GUARD_BIT_IS_UNSET_POP_4_r32] = _GUARD_BIT_IS_UNSET_POP_4,
+ [_GUARD_BIT_IS_UNSET_POP_5_r00] = _GUARD_BIT_IS_UNSET_POP_5,
+ [_GUARD_BIT_IS_UNSET_POP_5_r10] = _GUARD_BIT_IS_UNSET_POP_5,
+ [_GUARD_BIT_IS_UNSET_POP_5_r21] = _GUARD_BIT_IS_UNSET_POP_5,
+ [_GUARD_BIT_IS_UNSET_POP_5_r32] = _GUARD_BIT_IS_UNSET_POP_5,
+ [_GUARD_BIT_IS_UNSET_POP_6_r00] = _GUARD_BIT_IS_UNSET_POP_6,
+ [_GUARD_BIT_IS_UNSET_POP_6_r10] = _GUARD_BIT_IS_UNSET_POP_6,
+ [_GUARD_BIT_IS_UNSET_POP_6_r21] = _GUARD_BIT_IS_UNSET_POP_6,
+ [_GUARD_BIT_IS_UNSET_POP_6_r32] = _GUARD_BIT_IS_UNSET_POP_6,
+ [_GUARD_BIT_IS_UNSET_POP_7_r00] = _GUARD_BIT_IS_UNSET_POP_7,
+ [_GUARD_BIT_IS_UNSET_POP_7_r10] = _GUARD_BIT_IS_UNSET_POP_7,
+ [_GUARD_BIT_IS_UNSET_POP_7_r21] = _GUARD_BIT_IS_UNSET_POP_7,
+ [_GUARD_BIT_IS_UNSET_POP_7_r32] = _GUARD_BIT_IS_UNSET_POP_7,
+ [_GUARD_BIT_IS_UNSET_POP_r00] = _GUARD_BIT_IS_UNSET_POP,
+ [_GUARD_BIT_IS_UNSET_POP_r10] = _GUARD_BIT_IS_UNSET_POP,
+ [_GUARD_BIT_IS_UNSET_POP_r21] = _GUARD_BIT_IS_UNSET_POP,
+ [_GUARD_BIT_IS_UNSET_POP_r32] = _GUARD_BIT_IS_UNSET_POP,
[_GUARD_IS_NONE_POP_r00] = _GUARD_IS_NONE_POP,
[_GUARD_IS_NONE_POP_r10] = _GUARD_IS_NONE_POP,
[_GUARD_IS_NONE_POP_r21] = _GUARD_IS_NONE_POP,
@@ -3991,6 +4150,9 @@ const uint16_t _PyUop_Uncached[MAX_UOP_REGS_ID+1] = {
[_POP_TWO_LOAD_CONST_INLINE_BORROW_r21] = _POP_TWO_LOAD_CONST_INLINE_BORROW,
[_POP_CALL_LOAD_CONST_INLINE_BORROW_r21] = _POP_CALL_LOAD_CONST_INLINE_BORROW,
[_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW_r31] = _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW,
+ [_INSERT_1_LOAD_CONST_INLINE_r02] = _INSERT_1_LOAD_CONST_INLINE,
+ [_INSERT_1_LOAD_CONST_INLINE_r12] = _INSERT_1_LOAD_CONST_INLINE,
+ [_INSERT_1_LOAD_CONST_INLINE_r23] = _INSERT_1_LOAD_CONST_INLINE,
[_INSERT_1_LOAD_CONST_INLINE_BORROW_r02] = _INSERT_1_LOAD_CONST_INLINE_BORROW,
[_INSERT_1_LOAD_CONST_INLINE_BORROW_r12] = _INSERT_1_LOAD_CONST_INLINE_BORROW,
[_INSERT_1_LOAD_CONST_INLINE_BORROW_r23] = _INSERT_1_LOAD_CONST_INLINE_BORROW,
@@ -4083,7 +4245,7 @@ const uint16_t _PyUop_SpillsAndReloads[4][4] = {
const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = {
[_BINARY_OP] = "_BINARY_OP",
- [_BINARY_OP_r21] = "_BINARY_OP_r21",
+ [_BINARY_OP_r23] = "_BINARY_OP_r23",
[_BINARY_OP_ADD_FLOAT] = "_BINARY_OP_ADD_FLOAT",
[_BINARY_OP_ADD_FLOAT_r03] = "_BINARY_OP_ADD_FLOAT_r03",
[_BINARY_OP_ADD_FLOAT_r13] = "_BINARY_OP_ADD_FLOAT_r13",
@@ -4097,7 +4259,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = {
[_BINARY_OP_ADD_UNICODE_r13] = "_BINARY_OP_ADD_UNICODE_r13",
[_BINARY_OP_ADD_UNICODE_r23] = "_BINARY_OP_ADD_UNICODE_r23",
[_BINARY_OP_EXTEND] = "_BINARY_OP_EXTEND",
- [_BINARY_OP_EXTEND_r21] = "_BINARY_OP_EXTEND_r21",
+ [_BINARY_OP_EXTEND_r23] = "_BINARY_OP_EXTEND_r23",
[_BINARY_OP_INPLACE_ADD_UNICODE] = "_BINARY_OP_INPLACE_ADD_UNICODE",
[_BINARY_OP_INPLACE_ADD_UNICODE_r21] = "_BINARY_OP_INPLACE_ADD_UNICODE_r21",
[_BINARY_OP_MULTIPLY_FLOAT] = "_BINARY_OP_MULTIPLY_FLOAT",
@@ -4398,6 +4560,56 @@ const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = {
[_GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r12] = "_GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r12",
[_GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r22] = "_GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r22",
[_GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r33] = "_GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r33",
+ [_GUARD_BIT_IS_SET_POP] = "_GUARD_BIT_IS_SET_POP",
+ [_GUARD_BIT_IS_SET_POP_r00] = "_GUARD_BIT_IS_SET_POP_r00",
+ [_GUARD_BIT_IS_SET_POP_r10] = "_GUARD_BIT_IS_SET_POP_r10",
+ [_GUARD_BIT_IS_SET_POP_r21] = "_GUARD_BIT_IS_SET_POP_r21",
+ [_GUARD_BIT_IS_SET_POP_r32] = "_GUARD_BIT_IS_SET_POP_r32",
+ [_GUARD_BIT_IS_SET_POP_4] = "_GUARD_BIT_IS_SET_POP_4",
+ [_GUARD_BIT_IS_SET_POP_4_r00] = "_GUARD_BIT_IS_SET_POP_4_r00",
+ [_GUARD_BIT_IS_SET_POP_4_r10] = "_GUARD_BIT_IS_SET_POP_4_r10",
+ [_GUARD_BIT_IS_SET_POP_4_r21] = "_GUARD_BIT_IS_SET_POP_4_r21",
+ [_GUARD_BIT_IS_SET_POP_4_r32] = "_GUARD_BIT_IS_SET_POP_4_r32",
+ [_GUARD_BIT_IS_SET_POP_5] = "_GUARD_BIT_IS_SET_POP_5",
+ [_GUARD_BIT_IS_SET_POP_5_r00] = "_GUARD_BIT_IS_SET_POP_5_r00",
+ [_GUARD_BIT_IS_SET_POP_5_r10] = "_GUARD_BIT_IS_SET_POP_5_r10",
+ [_GUARD_BIT_IS_SET_POP_5_r21] = "_GUARD_BIT_IS_SET_POP_5_r21",
+ [_GUARD_BIT_IS_SET_POP_5_r32] = "_GUARD_BIT_IS_SET_POP_5_r32",
+ [_GUARD_BIT_IS_SET_POP_6] = "_GUARD_BIT_IS_SET_POP_6",
+ [_GUARD_BIT_IS_SET_POP_6_r00] = "_GUARD_BIT_IS_SET_POP_6_r00",
+ [_GUARD_BIT_IS_SET_POP_6_r10] = "_GUARD_BIT_IS_SET_POP_6_r10",
+ [_GUARD_BIT_IS_SET_POP_6_r21] = "_GUARD_BIT_IS_SET_POP_6_r21",
+ [_GUARD_BIT_IS_SET_POP_6_r32] = "_GUARD_BIT_IS_SET_POP_6_r32",
+ [_GUARD_BIT_IS_SET_POP_7] = "_GUARD_BIT_IS_SET_POP_7",
+ [_GUARD_BIT_IS_SET_POP_7_r00] = "_GUARD_BIT_IS_SET_POP_7_r00",
+ [_GUARD_BIT_IS_SET_POP_7_r10] = "_GUARD_BIT_IS_SET_POP_7_r10",
+ [_GUARD_BIT_IS_SET_POP_7_r21] = "_GUARD_BIT_IS_SET_POP_7_r21",
+ [_GUARD_BIT_IS_SET_POP_7_r32] = "_GUARD_BIT_IS_SET_POP_7_r32",
+ [_GUARD_BIT_IS_UNSET_POP] = "_GUARD_BIT_IS_UNSET_POP",
+ [_GUARD_BIT_IS_UNSET_POP_r00] = "_GUARD_BIT_IS_UNSET_POP_r00",
+ [_GUARD_BIT_IS_UNSET_POP_r10] = "_GUARD_BIT_IS_UNSET_POP_r10",
+ [_GUARD_BIT_IS_UNSET_POP_r21] = "_GUARD_BIT_IS_UNSET_POP_r21",
+ [_GUARD_BIT_IS_UNSET_POP_r32] = "_GUARD_BIT_IS_UNSET_POP_r32",
+ [_GUARD_BIT_IS_UNSET_POP_4] = "_GUARD_BIT_IS_UNSET_POP_4",
+ [_GUARD_BIT_IS_UNSET_POP_4_r00] = "_GUARD_BIT_IS_UNSET_POP_4_r00",
+ [_GUARD_BIT_IS_UNSET_POP_4_r10] = "_GUARD_BIT_IS_UNSET_POP_4_r10",
+ [_GUARD_BIT_IS_UNSET_POP_4_r21] = "_GUARD_BIT_IS_UNSET_POP_4_r21",
+ [_GUARD_BIT_IS_UNSET_POP_4_r32] = "_GUARD_BIT_IS_UNSET_POP_4_r32",
+ [_GUARD_BIT_IS_UNSET_POP_5] = "_GUARD_BIT_IS_UNSET_POP_5",
+ [_GUARD_BIT_IS_UNSET_POP_5_r00] = "_GUARD_BIT_IS_UNSET_POP_5_r00",
+ [_GUARD_BIT_IS_UNSET_POP_5_r10] = "_GUARD_BIT_IS_UNSET_POP_5_r10",
+ [_GUARD_BIT_IS_UNSET_POP_5_r21] = "_GUARD_BIT_IS_UNSET_POP_5_r21",
+ [_GUARD_BIT_IS_UNSET_POP_5_r32] = "_GUARD_BIT_IS_UNSET_POP_5_r32",
+ [_GUARD_BIT_IS_UNSET_POP_6] = "_GUARD_BIT_IS_UNSET_POP_6",
+ [_GUARD_BIT_IS_UNSET_POP_6_r00] = "_GUARD_BIT_IS_UNSET_POP_6_r00",
+ [_GUARD_BIT_IS_UNSET_POP_6_r10] = "_GUARD_BIT_IS_UNSET_POP_6_r10",
+ [_GUARD_BIT_IS_UNSET_POP_6_r21] = "_GUARD_BIT_IS_UNSET_POP_6_r21",
+ [_GUARD_BIT_IS_UNSET_POP_6_r32] = "_GUARD_BIT_IS_UNSET_POP_6_r32",
+ [_GUARD_BIT_IS_UNSET_POP_7] = "_GUARD_BIT_IS_UNSET_POP_7",
+ [_GUARD_BIT_IS_UNSET_POP_7_r00] = "_GUARD_BIT_IS_UNSET_POP_7_r00",
+ [_GUARD_BIT_IS_UNSET_POP_7_r10] = "_GUARD_BIT_IS_UNSET_POP_7_r10",
+ [_GUARD_BIT_IS_UNSET_POP_7_r21] = "_GUARD_BIT_IS_UNSET_POP_7_r21",
+ [_GUARD_BIT_IS_UNSET_POP_7_r32] = "_GUARD_BIT_IS_UNSET_POP_7_r32",
[_GUARD_CALLABLE_ISINSTANCE] = "_GUARD_CALLABLE_ISINSTANCE",
[_GUARD_CALLABLE_ISINSTANCE_r03] = "_GUARD_CALLABLE_ISINSTANCE_r03",
[_GUARD_CALLABLE_ISINSTANCE_r13] = "_GUARD_CALLABLE_ISINSTANCE_r13",
@@ -4633,6 +4845,10 @@ const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = {
[_INIT_CALL_PY_EXACT_ARGS_3_r01] = "_INIT_CALL_PY_EXACT_ARGS_3_r01",
[_INIT_CALL_PY_EXACT_ARGS_4] = "_INIT_CALL_PY_EXACT_ARGS_4",
[_INIT_CALL_PY_EXACT_ARGS_4_r01] = "_INIT_CALL_PY_EXACT_ARGS_4_r01",
+ [_INSERT_1_LOAD_CONST_INLINE] = "_INSERT_1_LOAD_CONST_INLINE",
+ [_INSERT_1_LOAD_CONST_INLINE_r02] = "_INSERT_1_LOAD_CONST_INLINE_r02",
+ [_INSERT_1_LOAD_CONST_INLINE_r12] = "_INSERT_1_LOAD_CONST_INLINE_r12",
+ [_INSERT_1_LOAD_CONST_INLINE_r23] = "_INSERT_1_LOAD_CONST_INLINE_r23",
[_INSERT_1_LOAD_CONST_INLINE_BORROW] = "_INSERT_1_LOAD_CONST_INLINE_BORROW",
[_INSERT_1_LOAD_CONST_INLINE_BORROW_r02] = "_INSERT_1_LOAD_CONST_INLINE_BORROW_r02",
[_INSERT_1_LOAD_CONST_INLINE_BORROW_r12] = "_INSERT_1_LOAD_CONST_INLINE_BORROW_r12",
@@ -4701,7 +4917,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = {
[_LOAD_ATTR_METHOD_WITH_VALUES_r12] = "_LOAD_ATTR_METHOD_WITH_VALUES_r12",
[_LOAD_ATTR_METHOD_WITH_VALUES_r23] = "_LOAD_ATTR_METHOD_WITH_VALUES_r23",
[_LOAD_ATTR_MODULE] = "_LOAD_ATTR_MODULE",
- [_LOAD_ATTR_MODULE_r11] = "_LOAD_ATTR_MODULE_r11",
+ [_LOAD_ATTR_MODULE_r12] = "_LOAD_ATTR_MODULE_r12",
[_LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = "_LOAD_ATTR_NONDESCRIPTOR_NO_DICT",
[_LOAD_ATTR_NONDESCRIPTOR_NO_DICT_r11] = "_LOAD_ATTR_NONDESCRIPTOR_NO_DICT_r11",
[_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = "_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES",
@@ -4960,6 +5176,13 @@ const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = {
[_PY_FRAME_GENERAL_r01] = "_PY_FRAME_GENERAL_r01",
[_PY_FRAME_KW] = "_PY_FRAME_KW",
[_PY_FRAME_KW_r11] = "_PY_FRAME_KW_r11",
+ [_RECORD_4OS] = "_RECORD_4OS",
+ [_RECORD_BOUND_METHOD] = "_RECORD_BOUND_METHOD",
+ [_RECORD_CALLABLE] = "_RECORD_CALLABLE",
+ [_RECORD_CALLER_CODE] = "_RECORD_CALLER_CODE",
+ [_RECORD_NOS] = "_RECORD_NOS",
+ [_RECORD_TOS] = "_RECORD_TOS",
+ [_RECORD_TOS_TYPE] = "_RECORD_TOS_TYPE",
[_REPLACE_WITH_TRUE] = "_REPLACE_WITH_TRUE",
[_REPLACE_WITH_TRUE_r02] = "_REPLACE_WITH_TRUE_r02",
[_REPLACE_WITH_TRUE_r12] = "_REPLACE_WITH_TRUE_r12",
@@ -5732,6 +5955,26 @@ int _PyUop_num_popped(int opcode, int oparg)
return 1;
case _GUARD_IS_FALSE_POP:
return 1;
+ case _GUARD_BIT_IS_SET_POP_4:
+ return 1;
+ case _GUARD_BIT_IS_SET_POP_5:
+ return 1;
+ case _GUARD_BIT_IS_SET_POP_6:
+ return 1;
+ case _GUARD_BIT_IS_SET_POP_7:
+ return 1;
+ case _GUARD_BIT_IS_SET_POP:
+ return 1;
+ case _GUARD_BIT_IS_UNSET_POP_4:
+ return 1;
+ case _GUARD_BIT_IS_UNSET_POP_5:
+ return 1;
+ case _GUARD_BIT_IS_UNSET_POP_6:
+ return 1;
+ case _GUARD_BIT_IS_UNSET_POP_7:
+ return 1;
+ case _GUARD_BIT_IS_UNSET_POP:
+ return 1;
case _GUARD_IS_NONE_POP:
return 1;
case _GUARD_IS_NOT_NONE_POP:
@@ -5770,6 +6013,8 @@ int _PyUop_num_popped(int opcode, int oparg)
return 2;
case _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW:
return 3;
+ case _INSERT_1_LOAD_CONST_INLINE:
+ return 1;
case _INSERT_1_LOAD_CONST_INLINE_BORROW:
return 1;
case _INSERT_2_LOAD_CONST_INLINE_BORROW:
@@ -5812,6 +6057,20 @@ int _PyUop_num_popped(int opcode, int oparg)
return 0;
case _GUARD_IP_RETURN_GENERATOR:
return 0;
+ case _RECORD_TOS:
+ return 0;
+ case _RECORD_TOS_TYPE:
+ return 0;
+ case _RECORD_NOS:
+ return 0;
+ case _RECORD_4OS:
+ return 0;
+ case _RECORD_CALLABLE:
+ return 0;
+ case _RECORD_BOUND_METHOD:
+ return 0;
+ case _RECORD_CALLER_CODE:
+ return 0;
default:
return -1;
}
diff --git a/Include/longobject.h b/Include/longobject.h
index 19f06977036..38673bc1878 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -166,6 +166,44 @@ PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int);
PyAPI_FUNC(unsigned long) PyOS_strtoul(const char *, char **, int);
PyAPI_FUNC(long) PyOS_strtol(const char *, char **, int);
+/* --- Import/Export API -------------------------------------------------- */
+
+typedef struct PyLongLayout {
+ uint8_t bits_per_digit;
+ uint8_t digit_size;
+ int8_t digits_order;
+ int8_t digit_endianness;
+} PyLongLayout;
+
+PyAPI_FUNC(const PyLongLayout*) PyLong_GetNativeLayout(void);
+
+typedef struct PyLongExport {
+ int64_t value;
+ uint8_t negative;
+ Py_ssize_t ndigits;
+ const void *digits;
+ // Member used internally, must not be used for other purpose.
+ Py_uintptr_t _reserved;
+} PyLongExport;
+
+PyAPI_FUNC(int) PyLong_Export(
+ PyObject *obj,
+ PyLongExport *export_long);
+PyAPI_FUNC(void) PyLong_FreeExport(
+ PyLongExport *export_long);
+
+
+/* --- PyLongWriter API --------------------------------------------------- */
+
+typedef struct PyLongWriter PyLongWriter;
+
+PyAPI_FUNC(PyLongWriter*) PyLongWriter_Create(
+ int negative,
+ Py_ssize_t ndigits,
+ void **digits);
+PyAPI_FUNC(PyObject*) PyLongWriter_Finish(PyLongWriter *writer);
+PyAPI_FUNC(void) PyLongWriter_Discard(PyLongWriter *writer);
+
#ifndef Py_LIMITED_API
# define Py_CPYTHON_LONGOBJECT_H
# include "cpython/longobject.h"
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index e83bc395aa4..d1dde7982ad 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -118,11 +118,11 @@ PyAPI_FUNC(int) PyUnstable_Module_SetGIL(PyObject *module, void *gil);
#endif
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 15)
-PyAPI_FUNC(PyObject *) PyModule_FromSlotsAndSpec(const PyModuleDef_Slot *,
+PyAPI_FUNC(PyObject *) PyModule_FromSlotsAndSpec(const PyModuleDef_Slot *slots,
PyObject *spec);
-PyAPI_FUNC(int) PyModule_Exec(PyObject *mod);
-PyAPI_FUNC(int) PyModule_GetStateSize(PyObject *mod, Py_ssize_t *result);
-PyAPI_FUNC(int) PyModule_GetToken(PyObject *, void **result);
+PyAPI_FUNC(int) PyModule_Exec(PyObject *module);
+PyAPI_FUNC(int) PyModule_GetStateSize(PyObject *module, Py_ssize_t *result);
+PyAPI_FUNC(int) PyModule_GetToken(PyObject *module, void **result);
#endif
#ifndef _Py_OPAQUE_PYOBJECT
diff --git a/Lib/_android_support.py b/Lib/_android_support.py
index a439d03a144..320dab52acd 100644
--- a/Lib/_android_support.py
+++ b/Lib/_android_support.py
@@ -168,6 +168,13 @@ def write(self, prio, tag, message):
# message.
message = message.replace(b"\x00", b"\xc0\x80")
+ # On API level 30 and higher, Logcat will strip any number of leading
+ # newlines. This is visible in all `logcat` modes, even --binary. Work
+ # around this by adding a leading space, which shouldn't make any
+ # difference to the log's usability.
+ if message.startswith(b"\n"):
+ message = b" " + message
+
with self._lock:
now = time()
self._bucket_level += (
diff --git a/Lib/annotationlib.py b/Lib/annotationlib.py
index 4085cc6bef7..832d160de7f 100644
--- a/Lib/annotationlib.py
+++ b/Lib/annotationlib.py
@@ -279,7 +279,13 @@ def __eq__(self, other):
# because dictionaries are not hashable.
and self.__globals__ is other.__globals__
and self.__forward_is_class__ == other.__forward_is_class__
- and self.__cell__ == other.__cell__
+ # Two separate cells are always considered unequal in forward refs.
+ and (
+ {name: id(cell) for name, cell in self.__cell__.items()}
+ == {name: id(cell) for name, cell in other.__cell__.items()}
+ if isinstance(self.__cell__, dict) and isinstance(other.__cell__, dict)
+ else self.__cell__ is other.__cell__
+ )
and self.__owner__ == other.__owner__
and (
(tuple(sorted(self.__extra_names__.items())) if self.__extra_names__ else None) ==
@@ -293,7 +299,10 @@ def __hash__(self):
self.__forward_module__,
id(self.__globals__), # dictionaries are not hashable, so hash by identity
self.__forward_is_class__,
- tuple(sorted(self.__cell__.items())) if isinstance(self.__cell__, dict) else self.__cell__,
+ ( # cells are not hashable as well
+ tuple(sorted([(name, id(cell)) for name, cell in self.__cell__.items()]))
+ if isinstance(self.__cell__, dict) else id(self.__cell__),
+ ),
self.__owner__,
tuple(sorted(self.__extra_names__.items())) if self.__extra_names__ else None,
))
diff --git a/Lib/base64.py b/Lib/base64.py
index e62ae6aff58..7cb22e3efc1 100644
--- a/Lib/base64.py
+++ b/Lib/base64.py
@@ -26,6 +26,8 @@
]
+_NOT_SPECIFIED = ['NOT SPECIFIED']
+
bytes_types = (bytes, bytearray) # Types acceptable as binary data
def _bytes_from_decode_data(s):
@@ -62,7 +64,7 @@ def b64encode(s, altchars=None, *, wrapcol=0):
return encoded
-def b64decode(s, altchars=None, validate=False):
+def b64decode(s, altchars=None, validate=_NOT_SPECIFIED, *, ignorechars=_NOT_SPECIFIED):
"""Decode the Base64 encoded bytes-like object or ASCII string s.
Optional altchars must be a bytes-like object or ASCII string of length 2
@@ -72,20 +74,53 @@ def b64decode(s, altchars=None, validate=False):
The result is returned as a bytes object. A binascii.Error is raised if
s is incorrectly padded.
- If validate is False (the default), characters that are neither in the
- normal base-64 alphabet nor the alternative alphabet are discarded prior
- to the padding check. If validate is True, these non-alphabet characters
- in the input result in a binascii.Error.
+ If ignorechars is specified, it should be a byte string containing
+ characters to ignore from the input. The default value of validate is
+ True if ignorechars is specified, False otherwise.
+
+ If validate is false, characters that are neither in the normal base-64
+ alphabet nor the alternative alphabet are discarded prior to the
+ padding check. If validate is true, these non-alphabet characters in
+ the input result in a binascii.Error if they are not in ignorechars.
For more information about the strict base64 check, see:
https://docs.python.org/3.11/library/binascii.html#binascii.a2b_base64
"""
s = _bytes_from_decode_data(s)
+ if validate is _NOT_SPECIFIED:
+ validate = ignorechars is not _NOT_SPECIFIED
+ badchar = None
if altchars is not None:
altchars = _bytes_from_decode_data(altchars)
- assert len(altchars) == 2, repr(altchars)
- s = s.translate(bytes.maketrans(altchars, b'+/'))
- return binascii.a2b_base64(s, strict_mode=validate)
+ if len(altchars) != 2:
+ raise ValueError(f'invalid altchars: {altchars!r}')
+ if ignorechars is _NOT_SPECIFIED:
+ for b in b'+/':
+ if b not in altchars and b in s:
+ badchar = b
+ break
+ s = s.translate(bytes.maketrans(altchars, b'+/'))
+ else:
+ trans = bytes.maketrans(b'+/' + altchars, altchars + b'+/')
+ s = s.translate(trans)
+ ignorechars = ignorechars.translate(trans)
+ if ignorechars is _NOT_SPECIFIED:
+ ignorechars = b''
+ result = binascii.a2b_base64(s, strict_mode=validate,
+ ignorechars=ignorechars)
+ if badchar is not None:
+ import warnings
+ if validate:
+ warnings.warn(f'invalid character {chr(badchar)!a} in Base64 data '
+ f'with altchars={altchars!r} and validate=True '
+ f'will be an error in future Python versions',
+ DeprecationWarning, stacklevel=2)
+ else:
+ warnings.warn(f'invalid character {chr(badchar)!a} in Base64 data '
+ f'with altchars={altchars!r} and validate=False '
+ f'will be discarded in future Python versions',
+ FutureWarning, stacklevel=2)
+ return result
def standard_b64encode(s):
@@ -130,8 +165,19 @@ def urlsafe_b64decode(s):
The alphabet uses '-' instead of '+' and '_' instead of '/'.
"""
s = _bytes_from_decode_data(s)
+ badchar = None
+ for b in b'+/':
+ if b in s:
+ badchar = b
+ break
s = s.translate(_urlsafe_decode_translation)
- return b64decode(s)
+ result = binascii.a2b_base64(s, strict_mode=False)
+ if badchar is not None:
+ import warnings
+ warnings.warn(f'invalid character {chr(badchar)!a} in URL-safe Base64 data '
+ f'will be discarded in future Python versions',
+ FutureWarning, stacklevel=2)
+ return result
diff --git a/Lib/dbm/dumb.py b/Lib/dbm/dumb.py
index 1bc239a84ff..c1c38da5101 100644
--- a/Lib/dbm/dumb.py
+++ b/Lib/dbm/dumb.py
@@ -9,7 +9,7 @@
- seems to contain a bug when updating...
- reclaim free space (currently, space once occupied by deleted or expanded
-items is not reused exept if .reorganize() is called)
+items is not reused except if .reorganize() is called)
- support concurrent access (currently, if two processes take turns making
updates, they can mess up the index)
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
index 46fef2048ba..172f9ef9e5f 100644
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -101,6 +101,12 @@ def make_quoted_pairs(value):
return str(value).replace('\\', '\\\\').replace('"', '\\"')
+def make_parenthesis_pairs(value):
+ """Escape parenthesis and backslash for use within a comment."""
+ return str(value).replace('\\', '\\\\') \
+ .replace('(', '\\(').replace(')', '\\)')
+
+
def quote_string(value):
escaped = make_quoted_pairs(value)
return f'"{escaped}"'
@@ -943,7 +949,7 @@ def value(self):
return ' '
def startswith_fws(self):
- return True
+ return self and self[0] in WSP
class ValueTerminal(Terminal):
@@ -2963,6 +2969,13 @@ def _refold_parse_tree(parse_tree, *, policy):
[ValueTerminal(make_quoted_pairs(p), 'ptext')
for p in newparts] +
[ValueTerminal('"', 'ptext')])
+ if part.token_type == 'comment':
+ newparts = (
+ [ValueTerminal('(', 'ptext')] +
+ [ValueTerminal(make_parenthesis_pairs(p), 'ptext')
+ if p.token_type == 'ptext' else p
+ for p in newparts] +
+ [ValueTerminal(')', 'ptext')])
if not part.as_ew_allowed:
wrap_as_ew_blocked += 1
newparts.append(end_ew_not_allowed)
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
index 03524c96559..cebbc416087 100644
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -22,6 +22,7 @@
NLCRE = re.compile(r'\r\n|\r|\n')
fcre = re.compile(r'^From ', re.MULTILINE)
NEWLINE_WITHOUT_FWSP = re.compile(r'\r\n[^ \t]|\r[^ \n\t]|\n[^ \t]')
+NEWLINE_WITHOUT_FWSP_BYTES = re.compile(br'\r\n[^ \t]|\r[^ \n\t]|\n[^ \t]')
class Generator:
@@ -429,7 +430,16 @@ def _write_headers(self, msg):
# This is almost the same as the string version, except for handling
# strings with 8bit bytes.
for h, v in msg.raw_items():
- self._fp.write(self.policy.fold_binary(h, v))
+ folded = self.policy.fold_binary(h, v)
+ if self.policy.verify_generated_headers:
+ linesep = self.policy.linesep.encode()
+ if not folded.endswith(linesep):
+ raise HeaderWriteError(
+ f'folded header does not end with {linesep!r}: {folded!r}')
+ if NEWLINE_WITHOUT_FWSP_BYTES.search(folded.removesuffix(linesep)):
+ raise HeaderWriteError(
+ f'folded header contains newline: {folded!r}')
+ self._fp.write(folded)
# A blank line always separates headers from body
self.write(self._NL)
diff --git a/Lib/functools.py b/Lib/functools.py
index 075418b1605..59fc2a8fbf6 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -602,6 +602,9 @@ def decorating_function(user_function):
return decorating_function
def _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo):
+ if not callable(user_function):
+ raise TypeError("the first argument must be callable")
+
# Constants shared by all lru cache instances:
sentinel = object() # unique object used to signal cache misses
make_key = _make_key # build a key from the function arguments
diff --git a/Lib/graphlib.py b/Lib/graphlib.py
index 7961c9c5cac..af5245ccbcd 100644
--- a/Lib/graphlib.py
+++ b/Lib/graphlib.py
@@ -199,6 +199,7 @@ def done(self, *nodes):
self._ready_nodes.append(successor)
self._nfinished += 1
+ # See note "On Finding Cycles" at the bottom.
def _find_cycle(self):
n2i = self._node2info
stack = []
@@ -212,8 +213,6 @@ def _find_cycle(self):
while True:
if node in seen:
- # If we have seen already the node and is in the
- # current stack we have found a cycle.
if node in node2stacki:
return stack[node2stacki[node] :] + [node]
# else go on to get next successor
@@ -228,11 +227,15 @@ def _find_cycle(self):
while stack:
try:
node = itstack[-1]()
- break
+ break # resume at top of "while True:"
except StopIteration:
+ # no more successors; pop the stack
+ # and continue looking up
del node2stacki[stack.pop()]
itstack.pop()
else:
+ # stack is empty; look for a fresh node to
+ # start over from (a node not yet in seen)
break
return None
@@ -252,3 +255,55 @@ def static_order(self):
self.done(*node_group)
__class_getitem__ = classmethod(GenericAlias)
+
+
+# On Finding Cycles
+# -----------------
+# There is a (at least one) total order if and only if the graph is
+# acyclic.
+#
+# When it is cyclic, "there's a cycle - somewhere!" isn't very helpful.
+# In theory, it would be most helpful to partition the graph into
+# strongly connected components (SCCs) and display those with more than
+# one node. Then all cycles could easily be identified "by eyeball".
+#
+# That's a lot of work, though, and we can get most of the benefit much
+# more easily just by showing a single specific cycle.
+#
+# Approaches to that are based on breadth first or depth first search
+# (BFS or DFS). BFS is most natural, which can easily be arranged to
+# find a shortest-possible cycle. But memory burden can be high, because
+# every path-in-progress has to keep its own idea of what "the path" is
+# so far.
+#
+# DFS is much easier on RAM, only requiring keeping track of _the_ path
+# from the starting node to the current node at the current recursion
+# level. But there may be any number of nodes, and so there's no bound
+# on recursion depth short of the total number of nodes.
+#
+# So we use an iterative version of DFS, keeping an exploit list
+# (`stack`) of the path so far. A parallel stack (`itstack`) holds the
+# `__next__` method of an iterator over the current level's node's
+# successors, so when backtracking to a shallower level we can just call
+# that to get the node's next successor. This is state that a recursive
+# version would implicitly store in a `for` loop's internals.
+#
+# `seen()` is a set recording which nodes have already been, at some
+# time, pushed on the stack. If a node has been pushed on the stack, DFS
+# will find any cycle it's part of, so there's no need to ever look at
+# it again.
+#
+# Finally, `node2stacki` maps a node to its index on the current stack,
+# for and only for nodes currently _on_ the stack. If a successor to be
+# pushed on the stack is in that dict, the node is already on the path,
+# at that index. The cycle is then `stack[that_index :] + [node]`.
+#
+# As is often the case when removing recursion, the control flow looks a
+# bit off. The "while True:" loop here rarely actually loops - it's only
+# looking to go "up the stack" until finding a level that has another
+# successor to consider, emulating a chain of returns in a recursive
+# version.
+#
+# Worst cases: O(V+E) for time, and O(V) for memory, where V is the
+# number of nodes and E the number of edges (which may be quadratic in
+# V!). It requires care to ensure these bounds are met.
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py
index 74349bb63d6..917280037d4 100644
--- a/Lib/http/cookies.py
+++ b/Lib/http/cookies.py
@@ -87,9 +87,9 @@
such trickeries do not confuse it.
>>> C = cookies.SimpleCookie()
- >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
+ >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=;";')
>>> print(C)
- Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
+ Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=;"
Each element of the Cookie also supports all of the RFC 2109
Cookie attributes. Here's an example which sets the Path
@@ -170,6 +170,15 @@ class CookieError(Exception):
})
_is_legal_key = re.compile('[%s]+' % re.escape(_LegalChars)).fullmatch
+_control_character_re = re.compile(r'[\x00-\x1F\x7F]')
+
+
+def _has_control_character(*val):
+ """Detects control characters within a value.
+ Supports any type, as header values can be any type.
+ """
+ return any(_control_character_re.search(str(v)) for v in val)
+
def _quote(str):
r"""Quote a string for use in a cookie header.
@@ -294,12 +303,16 @@ def __setitem__(self, K, V):
K = K.lower()
if not K in self._reserved:
raise CookieError("Invalid attribute %r" % (K,))
+ if _has_control_character(K, V):
+ raise CookieError(f"Control characters are not allowed in cookies {K!r} {V!r}")
dict.__setitem__(self, K, V)
def setdefault(self, key, val=None):
key = key.lower()
if key not in self._reserved:
raise CookieError("Invalid attribute %r" % (key,))
+ if _has_control_character(key, val):
+ raise CookieError("Control characters are not allowed in cookies %r %r" % (key, val,))
return dict.setdefault(self, key, val)
def __eq__(self, morsel):
@@ -335,6 +348,9 @@ def set(self, key, val, coded_val):
raise CookieError('Attempt to set a reserved key %r' % (key,))
if not _is_legal_key(key):
raise CookieError('Illegal key %r' % (key,))
+ if _has_control_character(key, val, coded_val):
+ raise CookieError(
+ "Control characters are not allowed in cookies %r %r %r" % (key, val, coded_val,))
# It's a good key, so save it.
self._key = key
@@ -488,7 +504,10 @@ def output(self, attrs=None, header="Set-Cookie:", sep="\015\012"):
result = []
items = sorted(self.items())
for key, value in items:
- result.append(value.output(attrs, header))
+ value_output = value.output(attrs, header)
+ if _has_control_character(value_output):
+ raise CookieError("Control characters are not allowed in cookies")
+ result.append(value_output)
return sep.join(result)
__str__ = output
diff --git a/Lib/idlelib/News3.txt b/Lib/idlelib/News3.txt
index 53d83762f99..0f61da8368f 100644
--- a/Lib/idlelib/News3.txt
+++ b/Lib/idlelib/News3.txt
@@ -1,9 +1,20 @@
+What's New in IDLE 3.15.0
+(since 3.14.0)
+Released on 2026-10-01
+=========================
+
+
+gh-143774: Better explain the operation of Format / Format Paragraph.
+Patch by Terry J. Reedy.
+
+gh-139742: Colorize t-string prefixes for template strings in IDLE,
+as done for f-string prefixes. Patch by Anuradha Agrawal.
+
What's New in IDLE 3.14.0
(since 3.13.0)
Released on 2025-10-07
=========================
-
gh-129873: Simplify displaying the IDLE doc by only copying the text
section of idle.html to idlelib/help.html. Patch by Stan Ulbrych.
diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html
index 9eb18d8f39b..eda16ac5bed 100644
--- a/Lib/idlelib/help.html
+++ b/Lib/idlelib/help.html
@@ -111,14 +111,14 @@ line visible. A request past the end of the file goes to the end.
Clear any selection and update the line and column status.
Show Completions
Open a scrollable list allowing selection of existing names. See
-Completions in the Editing and navigation section below.
+Completions in the Editing and Navigation section below.
Expand Word
Expand a prefix you have typed to match a full word in the same window;
repeat to get a different expansion.
Show Call Tip
After an unclosed parenthesis for a function, open a small window with
function parameter hints. See Calltips in the
-Editing and navigation section below.
+Editing and Navigation section below.
Show Surrounding Parens
Highlight the surrounding parenthesis.
@@ -127,9 +127,9 @@ Editing and navigation section below.
Reformat the current blank-line-delimited paragraph in comment block or
-multiline string or selected line in a string. All lines in the
-paragraph will be formatted to less than N columns, where N defaults to 72.
+
Format Paragraph
Rewrap the text block containing the text insert cursor.
+Avoid code lines. See Format block in the
+Editing and Navigation section below.
Indent Region
Shift selected lines right by the indent width (default 4 spaces).
@@ -443,8 +443,19 @@ will display a calltip.
One might want to run a file after writing import statements, after
adding function definitions, or after opening an existing file.
Reformat Paragraph rewraps a block (โparagraphโ) of contiguous equally
+indented non-blank comments, a similar block of text within a multiline
+string, or a selected subset of either.
+If needed, add a blank line to separate string from code.
+Partial lines in a selection expand to complete lines.
+The resulting lines have the same indent as before
+but have maximum total length of N columns (characters).
+Change the default N of 72 on the Window tab of IDLE Settings.
Within an editor window containing Python code, code context can be toggled
in order to show or hide a pane at the top of the window. When shown, this
pane freezes the opening lines for block code, such as those beginning with
@@ -791,7 +802,7 @@ with the default subprocess if at all possible.