[pypy-commit] pypy py3k: Fix usage of a removed opcode

amauryfa noreply at buildbot.pypy.org
Wed Oct 12 22:23:30 CEST 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r47990:a522088e48aa
Date: 2011-10-12 22:19 +0200
http://bitbucket.org/pypy/pypy/changeset/a522088e48aa/

Log:	Fix usage of a removed opcode

diff --git a/pypy/interpreter/astcompiler/assemble.py b/pypy/interpreter/astcompiler/assemble.py
--- a/pypy/interpreter/astcompiler/assemble.py
+++ b/pypy/interpreter/astcompiler/assemble.py
@@ -490,6 +490,7 @@
     ops.ROT_TWO : 0,
     ops.ROT_THREE : 0,
     ops.DUP_TOP : 1,
+    ops.DUP_TOP_TWO : 2,
 
     ops.UNARY_POSITIVE : 0,
     ops.UNARY_NEGATIVE : 0,
diff --git a/pypy/interpreter/astcompiler/codegen.py b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -1108,7 +1108,7 @@
         else:
             raise AssertionError("unknown slice type")
         if ctx == ast.AugLoad:
-            self.emit_op_arg(ops.DUP_TOPX, 2)
+            self.emit_op(ops.DUP_TOP_TWO)
         elif ctx == ast.AugStore:
             self.emit_op(ops.ROT_THREE)
         self.emit_op(subscr_operations(ctx))


More information about the pypy-commit mailing list