Author: Hakan Ardo <[email protected]>
Branch: jit-usable_retrace_3
Changeset: r59612:496a1103ba2f
Date: 2012-12-28 16:25 +0100
http://bitbucket.org/pypy/pypy/changeset/496a1103ba2f/
Log: rename boxes of produced loop instead, its cleaner and safer (and
might actually work)
diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -251,10 +251,15 @@
jumpop = preamble.operations[-1]
assert jumpop.getopnum() == rop.JUMP
preamble.operations = preamble.operations[1:-1]
+
+ newargs = [a.clonebox() for a in jumpop.getarglist()]
for i in range(jumpop.numargs()):
- a1, a2 = jumpop.getarg(i), loop.operations[0].getarg(i)
- if a1 is not a2:
- preamble.operations.append(ResOperation(rop.SAME_AS, [a1], a2))
+ a1, a2 = jumpop.getarg(i), newargs[i]
+ preamble.operations.append(ResOperation(rop.SAME_AS, [a1], a2))
+
+ inliner = Inliner(loop.operations[0].getarglist(), newargs)
+ loop.operations = [inliner.inline_op(op, clone=False) for op in
loop.operations]
+
except InvalidLoop:
preamble.operations = [orignial_label] + \
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit