Author: Maciej Fijalkowski <[email protected]>
Branch: translation-cleanup
Changeset: r58317:4436184487f3
Date: 2012-10-21 15:47 +0200
http://bitbucket.org/pypy/pypy/changeset/4436184487f3/

Log:    fix, not sure how to write a test for it

diff --git a/pypy/objspace/flow/flowcontext.py 
b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -920,7 +920,13 @@
         self.pushvalue(w_1)
 
     def DUP_TOPX(self, itemcount, next_instr):
-        self.dupvalues(itemcount)
+        delta = itemcount - 1
+        while True:
+            itemcount -= 1
+            if itemcount < 0:
+                break
+            w_value = self.peekvalue(delta)
+            self.pushvalue(w_value)
 
     for OPCODE, op in _unary_ops:
         locals()[OPCODE] = unaryoperation(OPCODE, op)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to