Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r70148:f6f44dc30721
Date: 2014-03-21 14:28 +0100
http://bitbucket.org/pypy/pypy/changeset/f6f44dc30721/

Log:    Improve the test, showing that the calls to eq() are not optimized

diff --git a/rpython/jit/metainterp/test/test_dict.py 
b/rpython/jit/metainterp/test/test_dict.py
--- a/rpython/jit/metainterp/test/test_dict.py
+++ b/rpython/jit/metainterp/test/test_dict.py
@@ -311,16 +311,20 @@
             dct = objectmodel.r_dict(eq, key)
             total = n
             x = 44444
+            y = 55555
+            z = 66666
             while total:
                 myjitdriver.jit_merge_point(total=total, dct=dct)
                 dct[total] = total
                 x = dct[total]
+                y = dct[total]
+                z = dct[total]
                 total -= 1
-            return len(dct) + x
+            return len(dct) + x + y + z
 
         res = self.meta_interp(f, [10], listops=True)
-        assert res == 2 + 1
-        self.check_simple_loop(call_may_force=2,    # ll_dict_lookup_trampoline
+        assert res == 2 + 1 + 1 + 1
+        self.check_simple_loop(call_may_force=4,    # ll_dict_lookup_trampoline
                                call=1) # ll_dict_setitem_lookup_done_trampoline
 
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to