summaryrefslogtreecommitdiffstats
path: root/Python/opcode_targets.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2020-01-23 09:25:17 (GMT)
committerGitHub <noreply@github.com>2020-01-23 09:25:17 (GMT)
commit13bc13960cc83dbd1cb5701d9a59ac9b9144b205 (patch)
tree582d8286864561b8a29be0491f837c22efd1f07e /Python/opcode_targets.h
parentf9e07e116c32b6dc4561d0bdeb452ccde13b0e7c (diff)
downloadcpython-13bc13960cc83dbd1cb5701d9a59ac9b9144b205.zip
cpython-13bc13960cc83dbd1cb5701d9a59ac9b9144b205.tar.gz
cpython-13bc13960cc83dbd1cb5701d9a59ac9b9144b205.tar.bz2
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.
Diffstat (limited to 'Python/opcode_targets.h')
-rw-r--r--Python/opcode_targets.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h
index c0a0bf5..d413bab 100644
--- a/Python/opcode_targets.h
+++ b/Python/opcode_targets.h
@@ -81,7 +81,7 @@ static void *opcode_targets[256] = {
&&TARGET_INPLACE_OR,
&&_unknown_opcode,
&&_unknown_opcode,
- &&_unknown_opcode,
+ &&TARGET_LIST_TO_TUPLE,
&&TARGET_RETURN_VALUE,
&&TARGET_IMPORT_STAR,
&&TARGET_SETUP_ANNOTATIONS,
@@ -148,21 +148,21 @@ static void *opcode_targets[256] = {
&&TARGET_SET_ADD,
&&TARGET_MAP_ADD,
&&TARGET_LOAD_CLASSDEREF,
- &&TARGET_BUILD_LIST_UNPACK,
+ &&_unknown_opcode,
&&TARGET_BUILD_MAP_UNPACK,
&&TARGET_BUILD_MAP_UNPACK_WITH_CALL,
- &&TARGET_BUILD_TUPLE_UNPACK,
- &&TARGET_BUILD_SET_UNPACK,
+ &&_unknown_opcode,
+ &&_unknown_opcode,
&&TARGET_SETUP_ASYNC_WITH,
&&TARGET_FORMAT_VALUE,
&&TARGET_BUILD_CONST_KEY_MAP,
&&TARGET_BUILD_STRING,
- &&TARGET_BUILD_TUPLE_UNPACK_WITH_CALL,
+ &&_unknown_opcode,
&&_unknown_opcode,
&&TARGET_LOAD_METHOD,
&&TARGET_CALL_METHOD,
- &&_unknown_opcode,
- &&_unknown_opcode,
+ &&TARGET_LIST_EXTEND,
+ &&TARGET_SET_UPDATE,
&&_unknown_opcode,
&&_unknown_opcode,
&&_unknown_opcode,