[pypy-svn] r71423 - pypy/trunk/pypy/module/pypyjit/test

fijal at codespeak.net fijal at codespeak.net
Mon Feb 22 21:25:30 CET 2010


Author: fijal
Date: Mon Feb 22 21:25:25 2010
New Revision: 71423

Modified:
   pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
A test I would like to pass


Modified: pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
==============================================================================
--- pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	(original)
+++ pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	Mon Feb 22 21:25:25 2010
@@ -551,6 +551,29 @@
         ''', 3000, ([0], 2000*3))
         assert len(self.loops) == 1
 
+    def test_blockstack_virtualizable(self):
+        py.test.skip("Fails for now")
+        self.run_source('''
+        def g(k):
+            s = 0
+            for i in range(k, k+2):
+                s += 1
+            return s
+
+        def main():
+            i = 0
+            while i < 100:
+                try:
+                    g(i)
+                except:
+                    pass
+                i += 1
+            return i
+        ''', 1000, ([], 100))
+        bytecode, = self.get_by_bytecode("CALL_FUNCTION")
+        # we allocate virtual ref and frame, we don't want block
+        assert len(bytecode.get_opnames('new_with_vtable')) == 2
+
 class AppTestJIT(PyPyCJITTests):
     def setup_class(cls):
         if not option.runappdirect:



More information about the Pypy-commit mailing list