mirror of
https://github.com/python/cpython.git
synced 2025-11-09 10:01:42 +00:00
GH-91432: Specialize FOR_ITER (GH-91713)
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations. * Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
This commit is contained in:
parent
c735d54534
commit
5fcfdd87c9
22 changed files with 447 additions and 282 deletions
|
|
@ -403,12 +403,12 @@ def _write_atomic(path, data, mode=0o666):
|
|||
# Python 3.11a7 3492 (make POP_JUMP_IF_NONE/NOT_NONE/TRUE/FALSE relative)
|
||||
# Python 3.11a7 3493 (Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative)
|
||||
# Python 3.11a7 3494 (New location info table)
|
||||
|
||||
# Python 3.12a1 3500 (Remove PRECALL opcode)
|
||||
# Python 3.12a1 3501 (YIELD_VALUE oparg == stack_depth)
|
||||
# Python 3.12a1 3502 (LOAD_FAST_CHECK, no NULL-check in LOAD_FAST)
|
||||
# Python 3.12a1 3503 (Shrink LOAD_METHOD cache)
|
||||
# Python 3.12a1 3504 (Merge LOAD_METHOD back into LOAD_ATTR)
|
||||
# Python 3.12a1 3505 (Specialization/Cache for FOR_ITER)
|
||||
|
||||
# Python 3.13 will start with 3550
|
||||
|
||||
|
|
@ -422,7 +422,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 = (3504).to_bytes(2, 'little') + b'\r\n'
|
||||
MAGIC_NUMBER = (3505).to_bytes(2, 'little') + b'\r\n'
|
||||
|
||||
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue