[pypy-svn] pypy improve-unwrap_spec: Remove support for w_args in multimethods; args_w is probably better
amauryfa
commits-noreply at bitbucket.org
Thu Feb 17 10:19:24 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: improve-unwrap_spec
Changeset: r42100:e17a25858e4d
Date: 2011-02-16 19:43 +0100
http://bitbucket.org/pypy/pypy/changeset/e17a25858e4d/
Log: Remove support for w_args in multimethods; args_w is probably better
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
@@ -404,8 +404,6 @@
if extras.get('general__args__', False):
self.argnames_after = ['__args__']
- if extras.get('w_varargs', False):
- self.argnames_after = ['w_args']
if extras.get('varargs_w', False):
self.argnames_after = ['args_w']
self.argnames_after += extras.get('extra_args', [])
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
@@ -28,7 +28,7 @@
function = func_with_new_name(function, mm.name)
mm.register(function, type_)
-def install_w_args_trampoline(type_, mm, is_local, op_name):
+def install_args_w_trampoline(type_, mm, is_local, op_name):
def function(space, w_transparent_list, *args_w):
args = Arguments(space, [space.wrap(op_name)] + list(args_w[:-1]), w_stararg=args_w[-1])
return space.call_args(w_transparent_list.w_controller, args)
@@ -42,10 +42,8 @@
if ['__args__'] == mm.argnames_after:
return install_general_args_trampoline(type_, mm, is_local, op_name)
- if ['w_args'] == mm.argnames_after:
- return install_w_args_trampoline(type_, mm, is_local, op_name)
if ['args_w'] == mm.argnames_after:
- return install_w_args_trampoline(type_, mm, is_local, op_name)
+ return install_args_w_trampoline(type_, mm, is_local, op_name)
assert not mm.argnames_after
# we search here for special-cased stuff
def function(space, w_transparent_list, *args_w):
diff --git a/pypy/objspace/std/stdtypedef.py b/pypy/objspace/std/stdtypedef.py
--- a/pypy/objspace/std/stdtypedef.py
+++ b/pypy/objspace/std/stdtypedef.py
@@ -171,8 +171,6 @@
wrapper_arglist = solid_arglist[:]
if multimethod.extras.get('varargs_w', False):
wrapper_arglist.append('args_w')
- if multimethod.extras.get('w_varargs', False):
- wrapper_arglist.append('w_args')
if multimethod.extras.get('keywords', False):
raise Exception, "no longer supported, use __args__"
if multimethod.extras.get('general__args__', False):
@@ -245,8 +243,6 @@
unwrap_spec = [baseobjspace.ObjSpace] + [baseobjspace.W_Root]*multimethod.arity
if multimethod.extras.get('varargs_w', False):
unwrap_spec.append('args_w')
- if multimethod.extras.get('w_varargs', False):
- unwrap_spec.append('w_args')
if multimethod.extras.get('general__args__', False):
unwrap_spec.append(argument.Arguments)
if 'doc' in multimethod.extras:
More information about the Pypy-commit
mailing list