[pypy-svn] r79753 - in pypy/branch/out-of-line-guards/pypy/rpython: . ootypesystem

fijal at codespeak.net fijal at codespeak.net
Thu Dec 2 16:19:36 CET 2010


Author: fijal
Date: Thu Dec  2 16:19:33 2010
New Revision: 79753

Modified:
   pypy/branch/out-of-line-guards/pypy/rpython/ootypesystem/rclass.py
   pypy/branch/out-of-line-guards/pypy/rpython/rvirtualizable2.py
Log:
fix virtualizables


Modified: pypy/branch/out-of-line-guards/pypy/rpython/ootypesystem/rclass.py
==============================================================================
--- pypy/branch/out-of-line-guards/pypy/rpython/ootypesystem/rclass.py	(original)
+++ pypy/branch/out-of-line-guards/pypy/rpython/ootypesystem/rclass.py	Thu Dec  2 16:19:33 2010
@@ -468,17 +468,17 @@
         v_attr = inputconst(ootype.Void, mangled)
         r_value = self.allfields[mangled]
         self.lowleveltype._check_field(mangled)
-        self.hook_access_field(v_inst, v_attr, llops, flags)
+        self.hook_access_field('getfield', v_inst, v_attr, llops, flags)
         return llops.genop('oogetfield', [v_inst, v_attr],
                            resulttype = r_value)
 
     def setfield(self, vinst, attr, vvalue, llops, flags={}):
         mangled_name = mangle(attr, self.rtyper.getconfig())
         cname = inputconst(ootype.Void, mangled_name)
-        self.hook_access_field(vinst, cname, llops, flags)
+        self.hook_access_field('setfield', vinst, cname, llops, flags)
         llops.genop('oosetfield', [vinst, cname, vvalue])
 
-    def hook_access_field(self, vinst, cname, llops, flags):
+    def hook_access_field(self, opname, vinst, cname, llops, flags):
         pass        # for virtualizables; see rvirtualizable2.py
 
     def rtype_is_true(self, hop):

Modified: pypy/branch/out-of-line-guards/pypy/rpython/rvirtualizable2.py
==============================================================================
--- pypy/branch/out-of-line-guards/pypy/rpython/rvirtualizable2.py	(original)
+++ pypy/branch/out-of-line-guards/pypy/rpython/rvirtualizable2.py	Thu Dec  2 16:19:33 2010
@@ -36,7 +36,8 @@
                 self._super()._setup_repr(hints = hints)
             c_vfields = self.classdef.classdesc.classdict['_virtualizable2_']
             self.my_redirected_fields = self._parse_field_list(c_vfields.value,
-                                                               self.accessor)
+                                                               self.accessor,
+                                                             '_virtualizable2_')
         else:
             self._super()._setup_repr()
             # ootype needs my_redirected_fields even for subclass. lltype does



More information about the Pypy-commit mailing list