[pypy-commit] pypy default: Move dont_look_insides around to expose more mapdict logic to the JIT

alex_gaynor noreply at buildbot.pypy.org
Sun Jan 12 18:45:24 CET 2014


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r68623:e50bdf0e8179
Date: 2014-01-12 09:44 -0800
http://bitbucket.org/pypy/pypy/changeset/e50bdf0e8179/

Log:	Move dont_look_insides around to expose more mapdict logic to the
	JIT

diff --git a/pypy/module/_weakref/interp__weakref.py b/pypy/module/_weakref/interp__weakref.py
--- a/pypy/module/_weakref/interp__weakref.py
+++ b/pypy/module/_weakref/interp__weakref.py
@@ -52,6 +52,7 @@
         # 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)
@@ -70,6 +71,7 @@
             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:
@@ -130,6 +132,7 @@
         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)):
@@ -240,7 +243,7 @@
         w_obj.setweakref(space, lifeline)
     return lifeline
 
- at 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)
 
@@ -314,15 +317,16 @@
         w_obj = force(space, self)
         return space.call_args(w_obj, __args__)
 
- at jit.dont_look_inside
+
 def get_or_make_proxy(space, w_obj):
     return getlifeline(space, w_obj).get_or_make_proxy(w_obj)
 
- at 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'


More information about the pypy-commit mailing list