Author: Carl Friedrich Bolz <[email protected]>
Branch: small-unroll-improvements
Changeset: r70808:e06ce12276e8
Date: 2014-04-21 15:16 +0200
http://bitbucket.org/pypy/pypy/changeset/e06ce12276e8/

Log:    a test showing the remaining problems of dicts and bridges

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
@@ -342,6 +342,21 @@
         self.meta_interp(f, [10])
         self.check_simple_loop(call_may_force=0, call=3)
 
+    def test_dict_virtual(self):
+        myjitdriver = JitDriver(greens = [], reds = 'auto')
+        def f(n):
+            d = {}
+            while n > 0:
+                myjitdriver.jit_merge_point()
+                if n % 10 == 0:
+                    n -= len(d)
+                d = {}
+                d["a"] = n
+                n -= 1
+            return len(d)
+        self.meta_interp(f, [100])
+        self.check_simple_loop(call_may_force=0, call=3)
+
 
 class TestLLtype(DictTests, LLJitMixin):
     pass
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to