mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-26110: Add `CALL_METHOD_KW
` opcode to speedup method calls with keywords (GH-26014)
* Add CALL_METHOD_KW * Make CALL_METHOD branchless too since it shares the same code * Place parentheses in STACK_SHRINK
This commit is contained in:
parent
e4e931a67e
commit
f24afda591
10 changed files with 247 additions and 180 deletions
|
@ -353,6 +353,7 @@ _code_type = type(_write_atomic.__code__)
|
|||
# Python 3.10b1 3438 Safer line number table handling.
|
||||
# Python 3.10b1 3439 (Add ROT_N)
|
||||
# Python 3.11a1 3450 Use exception table for unwinding ("zero cost" exception handling)
|
||||
# Python 3.11a1 3451 (Add CALL_METHOD_KW)
|
||||
|
||||
#
|
||||
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
||||
|
@ -362,7 +363,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 = (3450).to_bytes(2, 'little') + b'\r\n'
|
||||
MAGIC_NUMBER = (3451).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