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

fijal at codespeak.net fijal at codespeak.net
Sun Feb 15 15:12:29 CET 2009


Author: fijal
Date: Sun Feb 15 15:12:28 2009
New Revision: 61938

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tlc.py
Log:
oops, typo (and a check)


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py	Sun Feb 15 15:12:28 2009
@@ -188,16 +188,16 @@
                                history.ConstAddr(append_func.value, self.cpu),
                                history.ConstAddr(pop_func.value, self.cpu),
                                history.ConstAddr(insert_func.value, self.cpu),
-                               history.ConstAddr(nonzero_func.value, self.cpu),
                                history.ConstAddr(len_func.value, self.cpu),
+                               history.ConstAddr(nonzero_func.value, self.cpu),
                                tp)
             else:
                 ld = ListDescr(history.ConstAddr(getfunc.value, self.cpu),
                                history.ConstAddr(setfunc.value, self.cpu),
                                history.ConstAddr(malloc_func.value, self.cpu),
                                None, None, None,
-                               history.ConstAddr(nonzero_func.value, self.cpu),
                                history.ConstAddr(len_func.value, self.cpu),
+                               history.ConstAddr(nonzero_func.value, self.cpu),
                                tp)
             self.list_cache[TP.TO] = ld
             return ld

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	Sun Feb 15 15:12:28 2009
@@ -71,6 +71,7 @@
                 if isinstance(instnode.cls.source, ListDescr):
                     ld = instnode.cls.source
                     x = (alloc_offset + 1) << 16
+                    assert ofs < instnode.known_length
                     self.setitems.append((ld.setfunc, x, ofs, num))
                 else:
                     self.setfields.append((alloc_offset, ofs, num))

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tlc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tlc.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_tlc.py	Sun Feb 15 15:12:28 2009
@@ -44,6 +44,7 @@
         assert res == 42
 
     def test_accumulator(self):
+        py.test.skip("unsupported yet")
         path = py.path.local(tlc.__file__).dirpath('accumulator.tlc.src')
         code = path.read()
         res = self.exec_code(code, 20)



More information about the Pypy-commit mailing list