Author: Alex Gaynor <[email protected]>
Branch: jit-resizable-list
Changeset: r44599:54c7b1d299ba
Date: 2011-05-30 11:36 -0700
http://bitbucket.org/pypy/pypy/changeset/54c7b1d299ba/

Log:    Merged default.

diff --git a/pypy/jit/metainterp/test/test_list.py 
b/pypy/jit/metainterp/test/test_list.py
--- a/pypy/jit/metainterp/test/test_list.py
+++ b/pypy/jit/metainterp/test/test_list.py
@@ -254,8 +254,6 @@
             return a * b
         res = self.meta_interp(f, [37])
         assert res == f(37)
-        # There is the one actual field on a, plus 2 getfield's from the list
-        # itself, 1 to get the length (which is then incremented and passed to
-        # the resize func), and then a read of the items field to actually
-        # perform the setarrayitem on
-        self.check_loops(getfield_gc=5, everywhere=True)
+        # There is the one actual field on a, plus several fields on the list
+        # itself
+        self.check_loops(getfield_gc=8, everywhere=True)
diff --git a/pypy/jit/metainterp/test/test_optimizeopt.py 
b/pypy/jit/metainterp/test/test_optimizeopt.py
--- a/pypy/jit/metainterp/test/test_optimizeopt.py
+++ b/pypy/jit/metainterp/test/test_optimizeopt.py
@@ -3899,7 +3899,7 @@
         jump(i4, i10)
         """
         self.optimize_loop(ops, expected)
-        
+
     def test_add_sub_ovf(self):
         ops = """
         [i1]
@@ -3939,7 +3939,7 @@
         [i0, i1]
         escape(i1)
         i2 = int_add_ovf(i0, 1)
-        guard_no_overflow() []        
+        guard_no_overflow() []
         jump(i2, i0)
         """
         self.optimize_loop(ops, expected)
@@ -4420,7 +4420,6 @@
         i8 = int_floordiv(4, i2)
         i9 = int_rshift(i1, 2)
         i10 = int_floordiv(i1, 0)
-        i11 = int_rshift(i1, 0)
         i12 = int_floordiv(i2, 2)
         i13 = int_floordiv(i2, 3)
         i14 = int_floordiv(i2, 4)
@@ -4497,6 +4496,18 @@
         """
         self.optimize_loop(ops, expected)
 
+    def test_int_div_1(self):
+        ops = """
+        [i0]
+        i1 = int_floordiv(i0, 1)
+        jump(i1)
+        """
+        expected = """
+        [i0]
+        jump(i0)
+        """
+        self.optimize_loop(ops, expected)
+
     def test_subsub_ovf(self):
         ops = """
         [i0]
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to