summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2023-03-11 01:01:16 (GMT)
committerGitHub <noreply@github.com>2023-03-11 01:01:16 (GMT)
commit08b67fb34f4519be1b0bb4673643a2c761c7ae92 (patch)
treee7ab280d96ddc896b3f44845d1d322d317a7d0a0 /Lib/importlib
parent767d3a8f6f2f94daa15ad3759d0ecdf4c009b7ab (diff)
downloadcpython-08b67fb34f4519be1b0bb4673643a2c761c7ae92.zip
cpython-08b67fb34f4519be1b0bb4673643a2c761c7ae92.tar.gz
cpython-08b67fb34f4519be1b0bb4673643a2c761c7ae92.tar.bz2
GH-90997: Shrink the LOAD_GLOBAL caches (#102569)
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap_external.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 954401c..a01a095 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -431,12 +431,17 @@ _code_type = type(_write_atomic.__code__)
# Python 3.12a5 3515 (Embed jump mask in COMPARE_OP oparg)
# Python 3.12a5 3516 (Add COMPARE_AND_BRANCH instruction)
# Python 3.12a5 3517 (Change YIELD_VALUE oparg to exception block depth)
-# Python 3.12a5 3518 (Add RETURN_CONST instruction)
-# Python 3.12a5 3519 (Modify SEND instruction)
-# Python 3.12a5 3520 (Remove PREP_RERAISE_STAR, add CALL_INTRINSIC_2)
+# Python 3.12a6 3518 (Add RETURN_CONST instruction)
+# Python 3.12a6 3519 (Modify SEND instruction)
+# Python 3.12a6 3520 (Remove PREP_RERAISE_STAR, add CALL_INTRINSIC_2)
+# Python 3.12a7 3521 (Shrink the LOAD_GLOBAL caches)
# Python 3.13 will start with 3550
+# Please don't copy-paste the same pre-release tag for new entries above!!!
+# You should always use the *upcoming* tag. For example, if 3.12a6 came out
+# a week ago, I should put "Python 3.12a7" next to my new magic number.
+
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
# due to the addition of new opcodes).
@@ -446,7 +451,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 = (3520).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3521).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c