Commits

Maciej Fijalkowski committed 7d6bb88

a bit of shuffling before giving up

Comments (0)

Files changed (3)

pypy/rpython/lltypesystem/opimpl.py

     pass
 
 def op_gc_call_custom_trace(gc, *args):
-    gc._call_custom_trace(*args)
+    gc._call_custom_trace_body(*args)
 
 def op_shrink_array(array, smallersize):
     return False

pypy/rpython/memory/gc/base.py

             i += 1
     trace._annspecialcase_ = 'specialize:arg(2)'
 
-    def _call_custom_trace(self, obj, typeid, callback, arg):
+    def _call_custom_trace_body(self, obj, typeid, callback, arg):
         #def wrapper(item, arg):
         #    if self.is_valid_gc_object(item):
         #        callback(item, arg)
             if typeid == obj_typeid:
                 func(obj, callback, arg)
 
+
+    @specialize.arg(3)
+    def _call_custom_trace(self, obj, typeid, callback, arg):
+        llop.gc_call_custom_trace(lltype.Void, self, obj, typeid, callback,
+                                  arg)
+
     def _trace_slow_path(self, obj, callback, arg):
         typeid = self.get_type_id(obj)
         if self.has_gcptr_in_varsize(typeid):
         if self.has_custom_trace(typeid):
             # an obscure hack to flow those only when we
             # actually have all typeids
-            llop.gc_call_custom_trace(lltype.Void, self, obj, typeid, callback,
-                                      arg)
+            self._call_custom_trace(obj, typeid, callback, arg)
     _trace_slow_path._annspecialcase_ = 'specialize:arg(2)'
 
     def trace_partial(self, obj, start, stop, callback, arg):

pypy/rpython/memory/gctransform/framework.py

                   resultvar=op.result)
 
     def gct_gc_call_custom_trace(self, hop):
+        import pdb
+        pdb.set_trace()
         args = hop.spaceop.args
         args[3].concretetype
         hop.genop('direct_call', [])