[pypy-commit] pypy kill-multimethod: Kill W_ANY.

Manuel Jacob noreply at buildbot.pypy.org
Tue Feb 25 18:22:51 CET 2014


Author: Manuel Jacob
Branch: kill-multimethod
Changeset: r69436:e0681470078b
Date: 2014-02-25 18:10 +0100
http://bitbucket.org/pypy/pypy/changeset/e0681470078b/

Log:	Kill W_ANY.

diff --git a/pypy/objspace/std/model.py b/pypy/objspace/std/model.py
--- a/pypy/objspace/std/model.py
+++ b/pypy/objspace/std/model.py
@@ -17,8 +17,6 @@
 
 # ____________________________________________________________
 
-W_ANY = W_Root
-
 class W_Object(W_Root):
     "Parent base class for wrapped objects provided by the StdObjSpace."
     # Note that not all wrapped objects in the interpreter inherit from
diff --git a/pypy/objspace/std/proxy_helpers.py b/pypy/objspace/std/proxy_helpers.py
--- a/pypy/objspace/std/proxy_helpers.py
+++ b/pypy/objspace/std/proxy_helpers.py
@@ -3,9 +3,8 @@
 of cyclic imports
 """
 
-from pypy.objspace.std.model import W_ANY, W_Object
-from pypy.interpreter import baseobjspace
 from pypy.interpreter.argument import Arguments
+from pypy.interpreter.baseobjspace import W_Root
 from rpython.tool.sourcetools import func_with_new_name
 
 def create_mm_names(classname, mm, is_local):
@@ -34,7 +33,7 @@
         return space.call_args(w_transparent_list.w_controller, args)
     
     function = func_with_new_name(function, mm.name)
-    mm.register(function, type_, *([W_ANY] * (mm.arity - 1)))
+    mm.register(function, type_, *([W_Root] * (mm.arity - 1)))
 
 def install_mm_trampoline(type_, mm, is_local):
     classname = type_.__name__[2:]
@@ -50,7 +49,7 @@
         return space.call_function(w_transparent_list.w_controller, space.wrap\
             (op_name), *args_w)
     function = func_with_new_name(function, mm_name)
-    mm.register(function, type_, *([W_ANY] * (mm.arity - 1)))
+    mm.register(function, type_, *([W_Root] * (mm.arity - 1)))
 
 def is_special_doublearg(mm, type_):
     """ We specialcase when we've got two argument method for which


More information about the pypy-commit mailing list