summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap_external.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-01-28 12:42:30 (GMT)
committerGitHub <noreply@github.com>2022-01-28 12:42:30 (GMT)
commit89fd7c34520aac493a8784a221366ed04452612b (patch)
treeda2dd6dfe862b1351063e2c0ee2a3564c4773416 /Lib/importlib/_bootstrap_external.py
parent5a9e423473bf2c4eb32a0982e8d73420875db1da (diff)
downloadcpython-89fd7c34520aac493a8784a221366ed04452612b.zip
cpython-89fd7c34520aac493a8784a221366ed04452612b.tar.gz
cpython-89fd7c34520aac493a8784a221366ed04452612b.tar.bz2
bpo-46329: Split calls into precall and call instructions. (GH-30855)
* Add PRECALL_FUNCTION opcode. * Move 'call shape' varaibles into struct. * Replace CALL_NO_KW and CALL_KW with KW_NAMES and CALL instructions. * Specialize for builtin methods taking using the METH_FASTCALL | METH_KEYWORDS protocol. * Allow kwnames for specialized calls to builtin types. * Specialize calls to tuple(arg) and str(arg).
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r--Lib/importlib/_bootstrap_external.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index c05add9..7b9803d 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -384,9 +384,14 @@ _code_type = type(_write_atomic.__code__)
# Python 3.11a5 3476 (Add ASYNC_GEN_WRAP opcode)
# Python 3.11a5 3477 (Replace DUP_TOP/DUP_TOP_TWO with COPY and
# ROT_TWO/ROT_THREE/ROT_FOUR/ROT_N with SWAP)
+# Python 3.11a5 3478 (New CALL opcodes)
# Python 3.12 will start with magic number 3500
+
+# Python 3.12 will start with magic number 3500
+
+
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
@@ -397,7 +402,7 @@ _code_type = type(_write_atomic.__code__)
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
-MAGIC_NUMBER = (3477).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3478).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'