diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-04 18:43:52 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-04 18:43:52 (GMT) |
commit | 74a69fa662fb844ad3c60eb27b09e5fa1e577305 (patch) | |
tree | 251ba06cc429ab62a204e28bece4f382e179c7bf /Lib/opcode.py | |
parent | ef0e6c3b0485e83444b15c07f9cb1d905203791a (diff) | |
download | cpython-74a69fa662fb844ad3c60eb27b09e5fa1e577305.zip cpython-74a69fa662fb844ad3c60eb27b09e5fa1e577305.tar.gz cpython-74a69fa662fb844ad3c60eb27b09e5fa1e577305.tar.bz2 |
Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but
our bytecode is a bit simplified. Patch by Demur Rumed.
Diffstat (limited to 'Lib/opcode.py')
-rw-r--r-- | Lib/opcode.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py index e8cccc3..9833b6c 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -48,7 +48,7 @@ def_op('POP_TOP', 1) def_op('ROT_TWO', 2) def_op('ROT_THREE', 3) def_op('DUP_TOP', 4) -def_op('ROT_FOUR', 5) +def_op('DUP_TOP_TWO', 5) def_op('NOP', 9) def_op('UNARY_POSITIVE', 10) @@ -116,7 +116,6 @@ name_op('STORE_ATTR', 95) # Index in name list name_op('DELETE_ATTR', 96) # "" name_op('STORE_GLOBAL', 97) # "" name_op('DELETE_GLOBAL', 98) # "" -def_op('DUP_TOPX', 99) # number of items to duplicate def_op('LOAD_CONST', 100) # Index in const list hasconst.append(100) name_op('LOAD_NAME', 101) # Index in name list |