[pypy-svn] r71582 - pypy/trunk/pypy/module/_weakref
fijal at codespeak.net
fijal at codespeak.net
Mon Mar 1 06:59:15 CET 2010
Author: fijal
Date: Mon Mar 1 06:59:08 2010
New Revision: 71582
Modified:
pypy/trunk/pypy/module/_weakref/interp__weakref.py
Log:
Another approach to make JIT not allocate unnecessary __args__ (calling
_combine_wrapped). Revert if breaks any apptests
Modified: pypy/trunk/pypy/module/_weakref/interp__weakref.py
==============================================================================
--- pypy/trunk/pypy/module/_weakref/interp__weakref.py (original)
+++ pypy/trunk/pypy/module/_weakref/interp__weakref.py Mon Mar 1 06:59:08 2010
@@ -142,11 +142,8 @@
return self.space.w_None
return w_obj
-def descr__new__weakref(space, w_subtype, w_obj, __args__):
- if __args__.arguments_w:
- w_callable = __args__.arguments_w[0]
- else:
- w_callable = space.w_None
+def descr__new__weakref(space, w_subtype, w_obj, w_callable=None,
+ __args__=None):
lifeline = w_obj.getweakref()
if lifeline is None:
lifeline = WeakrefLifeline(space)
@@ -187,7 +184,8 @@
which is called with the weak reference as an argument when 'obj'
is about to be finalized.""",
__new__ = interp2app(descr__new__weakref,
- unwrap_spec=[ObjSpace, W_Root, W_Root, Arguments]),
+ unwrap_spec=[ObjSpace, W_Root, W_Root, W_Root,
+ Arguments]),
__eq__ = interp2app(descr__eq__,
unwrap_spec=[ObjSpace, W_Weakref, W_Root]),
__ne__ = interp2app(descr__ne__,
More information about the Pypy-commit
mailing list