[pypy-commit] pypy translation-cleanup: Kill FlowObjSpace.interpclass_w()

rlamy noreply at buildbot.pypy.org
Mon Sep 24 22:43:32 CEST 2012


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r57522:f8696546fca5
Date: 2012-09-24 21:42 +0100
http://bitbucket.org/pypy/pypy/changeset/f8696546fca5/

Log:	Kill FlowObjSpace.interpclass_w()

diff --git a/pypy/objspace/flow/flowcontext.py b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -609,11 +609,9 @@
         else:
             raise NotImplementedError("WITH_CLEANUP for CPython <= 2.4")
 
-        unroller = self.space.interpclass_w(w_unroller)
+        unroller = self.space.unwrap(w_unroller)
         w_None = self.space.w_None
-        is_app_exc = (unroller is not None and
-                      isinstance(unroller, SApplicationException))
-        if is_app_exc:
+        if isinstance(unroller, SApplicationException):
             operr = unroller.operr
             # The annotator won't allow to merge exception types with None.
             # Replace it with the exception value...
diff --git a/pypy/objspace/flow/objspace.py b/pypy/objspace/flow/objspace.py
--- a/pypy/objspace/flow/objspace.py
+++ b/pypy/objspace/flow/objspace.py
@@ -79,6 +79,7 @@
     enter_cache_building_mode = None
     leave_cache_building_mode = None
     createcompiler = None
+    interpclass_w = None
 
     def is_w(self, w_one, w_two):
         return self.is_true(self.is_(w_one, w_two))
@@ -167,12 +168,6 @@
                 raise UnwrapException
         return obj
 
-    def interpclass_w(self, w_obj):
-        obj = self.unwrap(w_obj)
-        if isinstance(obj, Wrappable):
-            return obj
-        return None
-
     def getexecutioncontext(self):
         return self.frame
 


More information about the pypy-commit mailing list