Author: Hakan Ardo <[email protected]>
Branch: jit-short_from_state
Changeset: r45301:c6e661dff09a
Date: 2011-07-02 22:25 +0200
http://bitbucket.org/pypy/pypy/changeset/c6e661dff09a/
Log: produce proper jump args in the preamble
diff --git a/pypy/jit/metainterp/optimizeopt/heap.py
b/pypy/jit/metainterp/optimizeopt/heap.py
--- a/pypy/jit/metainterp/optimizeopt/heap.py
+++ b/pypy/jit/metainterp/optimizeopt/heap.py
@@ -127,7 +127,9 @@
if op.getopnum() == rop.SETFIELD_GC:
result = op.getarg(1)
if result in potential_ops:
- result = result.clonebox()
+ newresult = result.clonebox()
+ optimizer.make_equal_to(newresult,
optimizer.getvalue(result))
+ newresult = result
# XXX this will not allow for chains of operations
getop = ResOperation(rop.GETFIELD_GC, [op.getarg(0)],
result, op.getdescr())
diff --git a/pypy/jit/metainterp/test/test_ajit.py
b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -1445,8 +1445,8 @@
y.v = g(y.v) - y.v/y.v + lc/l[0] - 1
return y.v
res = self.meta_interp(f, [20], listops=True)
- self.check_loops(getfield_gc=1, getarrayitem_gc=0)
- self.check_loops(getfield_gc=2, getarrayitem_gc=0, everywhere=True)
+ self.check_loops(getfield_gc=0, getarrayitem_gc=0)
+ self.check_loops(getfield_gc=1, getarrayitem_gc=0, everywhere=True)
def test_guard_isnull_nonnull(self):
myjitdriver = JitDriver(greens = [], reds = ['x', 'res'])
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit