mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-77273: Better bytecodes for f-strings (GH-6132)
This commit is contained in:
parent
307bceaa65
commit
1d857da7f0
15 changed files with 525 additions and 485 deletions
|
@ -447,7 +447,9 @@ _code_type = type(_write_atomic.__code__)
|
|||
# Python 3.12b1 3531 (Add PEP 695 changes)
|
||||
# Python 3.13a1 3550 (Plugin optimizer support)
|
||||
# Python 3.13a1 3551 (Compact superinstructions)
|
||||
# Python 3.13a1 3552 (Add SET_FUNCTION_ATTRIBUTE)
|
||||
# Python 3.13a1 3552 (Remove LOAD_FAST__LOAD_CONST and LOAD_CONST__LOAD_FAST)
|
||||
# Python 3.13a1 3553 (Add SET_FUNCTION_ATTRIBUTE)
|
||||
# Python 3.13a1 3554 (more efficient bytecodes for f-strings)
|
||||
|
||||
# Python 3.14 will start with 3600
|
||||
|
||||
|
@ -464,7 +466,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 = (3552).to_bytes(2, 'little') + b'\r\n'
|
||||
MAGIC_NUMBER = (3554).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