[pypy-commit] pypy remove-list-smm: (arigo, fijal) fix the descr test
fijal
noreply at buildbot.pypy.org
Fri Mar 22 01:01:29 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: remove-list-smm
Changeset: r62624:b1beccb7c94f
Date: 2013-03-21 16:55 -0700
http://bitbucket.org/pypy/pypy/changeset/b1beccb7c94f/
Log: (arigo, fijal) fix the descr test
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -57,11 +57,15 @@
def call_args(self, args):
# delegate activation to code
- return self.getcode().funcrun(self, args)
+ w_res = self.getcode().funcrun(self, args)
+ assert isinstance(w_res, W_Root)
+ return w_res
def call_obj_args(self, w_obj, args):
# delegate activation to code
- return self.getcode().funcrun_obj(self, w_obj, args)
+ w_res = self.getcode().funcrun_obj(self, w_obj, args)
+ assert isinstance(w_res, W_Root)
+ return w_res
def getcode(self):
if jit.we_are_jitted():
diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -212,7 +212,11 @@
self.run_args.append('space')
def visit__W_Root(self, el):
- self.run_args.append(self.scopenext())
+ if el is not W_Root:
+ self.run_args.append("space.interp_w(%s, %s)" % (self.use(el),
+ self.scopenext()))
+ else:
+ self.run_args.append(self.scopenext())
def visit__Arguments(self, el):
self.miniglobals['Arguments'] = Arguments
diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py
--- a/pypy/objspace/std/objspace.py
+++ b/pypy/objspace/std/objspace.py
@@ -146,8 +146,6 @@
# annotation (see pypy/annotation/builtin.py)
if x is None:
return self.w_None
- if isinstance(x, model.W_Object):
- raise TypeError, "attempt to wrap already wrapped object: %s"%(x,)
if isinstance(x, OperationError):
raise TypeError, ("attempt to wrap already wrapped exception: %s"%
(x,))
More information about the pypy-commit
mailing list