Permalink
Please
sign in to comment.
Browse files
bpo-39320: Handle unpacking of *values in compiler (GH-17984)
* Add three new bytecodes: LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE. Use them to implement star unpacking expressions. * Remove four bytecodes BUILD_LIST_UNPACK, BUILD_TUPLE_UNPACK, BUILD_SET_UNPACK and BUILD_TUPLE_UNPACK_WITH_CALL opcodes as they are now unused. * Update magic number and dis.rst for new bytecodes.
- Loading branch information
Showing
with
2,336 additions
and 2,347 deletions.
- +9 β28 Doc/library/dis.rst
- +3 β4 Include/opcode.h
- +3 β1 Lib/importlib/_bootstrap_external.py
- +4 β4 Lib/opcode.py
- +2 β2 Lib/test/test_extcall.py
- +15 β0 Misc/NEWS.d/next/Core and Builtins/2020-01-15-15-33-44.bpo-39320.b4hnJW.rst
- +34 β53 Python/ceval.c
- +107 β96 Python/compile.c
- +2,152 β2,152 Python/importlib_external.h
- +7 β7 Python/opcode_targets.h
| @@ -0,0 +1,15 @@ | ||
| Replace four complex bytecodes for building sequences with three simpler ones. | ||
|
|
||
|
|
||
| The following four bytecodes have been removed: | ||
|
|
||
| * BUILD_LIST_UNPACK | ||
| * BUILD_TUPLE_UNPACK | ||
| * BUILD_SET_UNPACK | ||
| * BUILD_TUPLE_UNPACK_WITH_CALL | ||
|
|
||
| The following three bytecodes have been added: | ||
|
|
||
| * LIST_TO_TUPLE | ||
| * LIST_EXTEND | ||
| * SET_UPDATE |
Oops, something went wrong.
0 comments on commit
13bc139