[pypy-commit] pypy translation-cleanup: fix, not sure how to write a test for it
fijal
noreply at buildbot.pypy.org
Sun Oct 21 15:47:50 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
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)
More information about the pypy-commit
mailing list