mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
This commit is contained in:
parent
d60457a667
commit
9f8f45144b
15 changed files with 395 additions and 236 deletions
|
@ -372,6 +372,7 @@ _code_type = type(_write_atomic.__code__)
|
|||
# BINARY_OP)
|
||||
# Python 3.11a3 3465 (Add COPY_FREE_VARS opcode)
|
||||
# Python 3.11a3 3466 (bpo-45292: PEP-654 except*)
|
||||
# Python 3.11a4 3467 (Change CALL_xxx opcodes)
|
||||
|
||||
#
|
||||
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
||||
|
@ -381,7 +382,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 = (3466).to_bytes(2, 'little') + b'\r\n'
|
||||
MAGIC_NUMBER = (3467).to_bytes(2, 'little') + b'\r\n'
|
||||
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
|
||||
|
||||
_PYCACHE = '__pycache__'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue