Commits

Alex Gaynor  committed e50bdf0

Move dont_look_insides around to expose more mapdict logic to the JIT

  • Participants
  • Parent commits fe10412

Comments (0)

Files changed (1)

File pypy/module/_weakref/interp__weakref.py

         # weakref callbacks are not invoked eagerly here.  They are
         # invoked by self.__del__() anyway.
 
+    @jit.dont_look_inside
     def get_or_make_weakref(self, w_subtype, w_obj):
         space = self.space
         w_weakreftype = space.gettypeobject(W_Weakref.typedef)
             self.append_wref_to(w_ref)
         return w_ref
 
+    @jit.dont_look_inside
     def get_or_make_proxy(self, w_obj):
         space = self.space
         if self.cached_proxy is not None:
         self.append_wref_to(w_ref)
         return w_ref
 
+    @jit.dont_look_inside
     def make_proxy_with_callback(self, w_obj, w_callable):
         space = self.space
         if space.is_true(space.callable(w_obj)):
         w_obj.setweakref(space, lifeline)
     return lifeline
 
-@jit.dont_look_inside
+
 def get_or_make_weakref(space, w_subtype, w_obj):
     return getlifeline(space, w_obj).get_or_make_weakref(w_subtype, w_obj)
 
         w_obj = force(space, self)
         return space.call_args(w_obj, __args__)
 
-@jit.dont_look_inside
+
 def get_or_make_proxy(space, w_obj):
     return getlifeline(space, w_obj).get_or_make_proxy(w_obj)
 
-@jit.dont_look_inside
+
 def make_proxy_with_callback(space, w_obj, w_callable):
     lifeline = getlifelinewithcallbacks(space, w_obj)
     return lifeline.make_proxy_with_callback(w_obj, w_callable)
 
+
 def proxy(space, w_obj, w_callable=None):
     """Create a proxy object that weakly references 'obj'.
 'callback', if given, is called with the proxy as an argument when 'obj'