Author: Hakan Ardo <[email protected]>
Branch: jit-short_from_state
Changeset: r45637:8710093c4d2e
Date: 2011-07-13 18:04 +0200
http://bitbucket.org/pypy/pypy/changeset/8710093c4d2e/

Log:    caching the setfield prioritized over moving the pure int_sub out of
        the loop

diff --git a/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py 
b/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -5485,16 +5485,16 @@
         escape(i5)
         i4 = int_sub(i2, i1)
         setfield_gc(p2, i4, descr=valuedescr)
-        jump(p1, i1, i2, p2)
+        jump(p1, i1, i2, p2, i4)
         """
         expected = """
         [p1, i1, i2, p2, i5]
         escape(i5)
-        setfield_gc(p2, i5, descr=valuedescr)
-        jump(p1, i1, i2, p2, i5)
-        """
-        #self.optimize_strunicode_loop(ops, expected, preamble)
-        self.optimize_loop(ops, preamble)
+        i6 = int_sub(i2, i1)
+        setfield_gc(p2, i6, descr=valuedescr)
+        jump(p1, i1, i2, p2, i6)
+        """
+        self.optimize_strunicode_loop(ops, expected, preamble)
 
     def test_str_slice_1(self):
         ops = """
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to