[pypy-svn] r27725 - in pypy/dist/pypy/rpython: ootypesystem test

antocuni at codespeak.net antocuni at codespeak.net
Fri May 26 14:20:36 CEST 2006


Author: antocuni
Date: Fri May 26 14:20:29 2006
New Revision: 27725

Modified:
   pypy/dist/pypy/rpython/ootypesystem/rlist.py
   pypy/dist/pypy/rpython/test/test_rdict.py
   pypy/dist/pypy/rpython/test/test_rlist.py
Log:
Don't use separate internal and external item repr for ootypesystem
list, because high level backends don't need it.



Modified: pypy/dist/pypy/rpython/ootypesystem/rlist.py
==============================================================================
--- pypy/dist/pypy/rpython/ootypesystem/rlist.py	(original)
+++ pypy/dist/pypy/rpython/ootypesystem/rlist.py	Fri May 26 14:20:29 2006
@@ -26,10 +26,16 @@
         self.list_cache = {}
         # setup() needs to be called to finish this initialization
 
+    def _externalvsinternal(self, rtyper, item_repr):
+        # EXPERIMENTAL: distinct internal and external repr are not
+        # needed in high level backends
+        #return externalvsinternal(rtyper, item_repr)
+        return item_repr, item_repr
+    
     def _setup_repr(self):
         if 'item_repr' not in self.__dict__:
             self.external_item_repr, self.item_repr = \
-                    externalvsinternal(self.rtyper, self._item_repr_computer())
+                    self._externalvsinternal(self.rtyper, self._item_repr_computer())
         if not ootype.hasItemType(self.lowleveltype):
             ootype.setItemType(self.lowleveltype, self.item_repr.lowleveltype)
 

Modified: pypy/dist/pypy/rpython/test/test_rdict.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rdict.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rdict.py	Fri May 26 14:20:29 2006
@@ -460,7 +460,6 @@
         assert res == f(2)
 
     def test_dict_of_dict(self):
-        self._skip_oo('dict of dict')
         def f(n):
             d = {}
             d[5] = d

Modified: pypy/dist/pypy/rpython/test/test_rlist.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rlist.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rlist.py	Fri May 26 14:20:29 2006
@@ -1040,6 +1040,7 @@
         assert res == 2
 
     def test_type_erase_fixed_size(self):
+        self._skip_oo('type erasing')
         class A(object):
             pass
         class B(object):
@@ -1064,6 +1065,7 @@
         assert r_A_list.lowleveltype == r_B_list.lowleveltype
 
     def test_type_erase_var_size(self):
+        self._skip_oo('type erasing')        
         class A(object):
             pass
         class B(object):



More information about the Pypy-commit mailing list