8000 bpo-46841: Move the cache for `LOAD_GLOBAL` inline. by markshannon · Pull Request #31575 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46841: Move the cache for LOAD_GLOBAL inline. #31575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bump version number.
  • Loading branch information
markshannon committed Feb 28, 2022
commit 92a4b04ec39ba0721608e745eda11ad5198b3170
5 changes: 3 additions & 2 deletions Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def _write_atomic(path, data, mode=0o666):
# Python 3.11a5 3478 (New CALL opcodes)
# Python 3.11a5 3479 (Add PUSH_NULL opcode)
# Python 3.11a5 3480 (New CALL opcodes, second iteration)
# Python 3.11a5 3481 (Use inline CACHE instructions)
# Python 3.11a5 3481 (Use inline cache for BINARY_OP)
# Python 3.11a5 3482 (Use inline cache for LOAD_GLOBAL)

# Python 3.12 will start with magic number 3500

Expand All @@ -402,7 +403,7 @@ def _write_atomic(path, data, mode=0o666):
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.

MAGIC_NUMBER = (3481).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3482).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

_PYCACHE = '__pycache__'
Expand Down
0