diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2021-06-07 22:52:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 22:52:00 (GMT) |
commit | 631f9938b1604d4f893417ec339b9e0fa9196fb1 (patch) | |
tree | 6a72bf35dafb42ad3d00e153e244538db4a646ee /Lib/importlib | |
parent | e915db3e9e512249a6f494c0b331db2d021e1f56 (diff) | |
download | cpython-631f9938b1604d4f893417ec339b9e0fa9196fb1.zip cpython-631f9938b1604d4f893417ec339b9e0fa9196fb1.tar.gz cpython-631f9938b1604d4f893417ec339b9e0fa9196fb1.tar.bz2 |
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)
This moves logic out of the frame initialization code and into the compiler and eval loop. Doing so simplifies the runtime code and allows us to optimize it better.
https://bugs.python.org/issue43693
Diffstat (limited to 'Lib/importlib')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 3955218..009b45f 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -357,6 +357,7 @@ _code_type = type(_write_atomic.__code__) # Python 3.11a1 3452 (drop nlocals from marshaled code objects) # Python 3.11a1 3453 (add co_fastlocalnames and co_fastlocalkinds) # Python 3.11a1 3454 (compute cell offsets relative to locals bpo-43693) +# Python 3.11a1 3455 (add MAKE_CELL bpo-43693) # # MAGIC must change whenever the bytecode emitted by the compiler may no @@ -366,7 +367,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 = (3454).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3455).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' |