summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-04 18:43:52 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-04 18:43:52 (GMT)
commit74a69fa662fb844ad3c60eb27b09e5fa1e577305 (patch)
tree251ba06cc429ab62a204e28bece4f382e179c7bf /Doc
parentef0e6c3b0485e83444b15c07f9cb1d905203791a (diff)
downloadcpython-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 'Doc')
-rw-r--r--Doc/library/dis.rst16
1 files changed, 5 insertions, 11 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index e5c1c1a..a377fc8 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -184,15 +184,15 @@ The Python compiler currently generates the following bytecode instructions.
three.
-.. opcode:: ROT_FOUR
+.. opcode:: DUP_TOP
- Lifts second, third and forth stack item one position up, moves top down to
- position four.
+ Duplicates the reference on top of the stack.
-.. opcode:: DUP_TOP
+.. opcode:: DUP_TOP_TWO
- Duplicates the reference on top of the stack.
+ Duplicates the two references on top of the stack, leaving them in the
+ same order.
**Unary operations**
@@ -531,12 +531,6 @@ the more significant byte last.
are put onto the stack right-to-left.
-.. opcode:: DUP_TOPX (count)
-
- Duplicate *count* items, keeping them in the same order. Due to implementation
- limits, *count* should be between 1 and 5 inclusive.
-
-
.. opcode:: STORE_ATTR (namei)
Implements ``TOS.name = TOS1``, where *namei* is the index of name in