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
|
@ -443,18 +443,20 @@ dis_fstring = """\
|
|||
%3d RESUME 0
|
||||
|
||||
%3d LOAD_FAST 0 (a)
|
||||
FORMAT_VALUE 0
|
||||
FORMAT_SIMPLE
|
||||
LOAD_CONST 1 (' ')
|
||||
LOAD_FAST 1 (b)
|
||||
LOAD_CONST 2 ('4')
|
||||
FORMAT_VALUE 4 (with format)
|
||||
FORMAT_WITH_SPEC
|
||||
LOAD_CONST 1 (' ')
|
||||
LOAD_FAST 2 (c)
|
||||
FORMAT_VALUE 2 (repr)
|
||||
CONVERT_VALUE 2 (repr)
|
||||
FORMAT_SIMPLE
|
||||
LOAD_CONST 1 (' ')
|
||||
LOAD_FAST 3 (d)
|
||||
CONVERT_VALUE 2 (repr)
|
||||
LOAD_CONST 2 ('4')
|
||||
FORMAT_VALUE 6 (repr, with format)
|
||||
FORMAT_WITH_SPEC
|
||||
BUILD_STRING 7
|
||||
RETURN_VALUE
|
||||
""" % (_fstring.__code__.co_firstlineno, _fstring.__code__.co_firstlineno + 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue