[pypy-svn] r61878 - in pypy/branch/pyjitpl5/pypy/jit/metainterp: . test

fijal at codespeak.net fijal at codespeak.net
Sat Feb 14 13:37:23 CET 2009


Author: fijal
Date: Sat Feb 14 13:37:23 2009
New Revision: 61878

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tl.py
Log:
Actually assert something about test_tl. Add a comment about missing case
(simpler test please)


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	Sat Feb 14 13:37:23 2009
@@ -707,6 +707,9 @@
         history.execute_and_record('setitem',
                                    [setfunc, box, ConstInt(ofs), itembox],
                                    'void', False)
+    if storage.setitems:
+        # XXX this needs to check for exceptions somehow
+        # create guard_no_excpetion somehow
     newboxes = []
     for index in storage.indices:
         if index < 0:

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tl.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tl.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tl.py	Sat Feb 14 13:37:23 2009
@@ -77,6 +77,12 @@
             return interp_without_call(code, inputarg=inputarg)
 
         res = self.meta_interp(main, [1, 6])
+        # we could eventually get away without setitems at all I think
+        # we're missing once guard_no_exception at the end I think
+        self.check_loops({'merge_point':1, 'guard_value':1, 'getitem':2,
+                          'setitem':4, 'guard_no_exception':2, 'int_mul':1,
+                          'int_sub':1, 'int_is_true':1, 'int_le':1,
+                          'guard_false':1})
         assert res == 5040
 
 



More information about the Pypy-commit mailing list