[pypy-svn] r53241 - in pypy/branch/jit-hotpath/pypy/jit: rainbow/test timeshifter

antocuni at codespeak.net antocuni at codespeak.net
Wed Apr 2 00:01:25 CEST 2008


Author: antocuni
Date: Wed Apr  2 00:01:24 2008
New Revision: 53241

Modified:
   pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_vlist.py
   pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py
Log:
some minor fixes, and test_oop_vlist passes



Modified: pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_vlist.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_vlist.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_vlist.py	Wed Apr  2 00:01:24 2008
@@ -195,7 +195,6 @@
     def _skip(self):
         py.test.skip('in progress')
 
-    test_oop_vlist = _skip
     test_alloc_and_set = _skip
     test_lists_deepfreeze = _skip
     test_frozen_list = _skip

Modified: pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py	Wed Apr  2 00:01:24 2008
@@ -302,7 +302,7 @@
                 vars_gv.append(box.genvar)
             else:
                 varindexes.append(j)
-                assert isinstance(box, rvalue.PtrRedBox)
+                assert isinstance(box, rvalue.AbstractPtrRedBox)
                 content = box.content
                 assert content.allowed_in_virtualizable
                 vrtis.append(content.make_rti(jitstate, memo))
@@ -349,7 +349,7 @@
             
         for box in boxes:
             if not box.genvar:
-                assert isinstance(box, rvalue.PtrRedBox)
+                assert isinstance(box, rvalue.AbstractPtrRedBox)
                 content = box.content
                 assert content.allowed_in_virtualizable
                 content.store_back_gv_reshaped(shapemask, memo)
@@ -406,7 +406,9 @@
         length = rvalue.ll_getvalue(lengthbox, lltype.Signed)
         if len(item_boxes) < length:
             diff = length - len(item_boxes)
-            item_boxes += [itembox] * diff
+            item_boxes += [content.itembox] * diff
+        else:
+            assert False, 'XXX'
     else:
         oopspecdesc.residual_call(jitstate, [selfbox],
                                   deepfrozen=deepfrozen)
@@ -431,7 +433,7 @@
 def oop_list_concat(jitstate, oopspecdesc, deepfrozen, selfbox, otherbox):
     content = selfbox.content
     if isinstance(content, VirtualList):
-        assert isinstance(otherbox, rvalue.PtrRedBox)
+        assert isinstance(otherbox, rvalue.AbstractPtrRedBox)
         othercontent = otherbox.content
         if othercontent is not None and isinstance(othercontent, VirtualList):
             newbox = oopspecdesc.typedesc.factory(0, None)
@@ -493,6 +495,8 @@
     else:
         oopspecdesc.residual_call(jitstate, [selfbox, indexbox, itembox])
 
+oop_list_method_setitem_fast = oop_list_setitem
+
 def oop_list_delitem(jitstate, oopspecdesc, deepfrozen, selfbox, indexbox):
     content = selfbox.content
     if isinstance(content, VirtualList) and indexbox.is_constant():



More information about the Pypy-commit mailing list