[pypy-svn] r55958 - in pypy/branch/oo-jit/pypy: jit/rainbow/test objspace/flow

antocuni at codespeak.net antocuni at codespeak.net
Thu Jun 19 14:04:24 CEST 2008


Author: antocuni
Date: Thu Jun 19 14:04:23 2008
New Revision: 55958

Modified:
   pypy/branch/oo-jit/pypy/jit/rainbow/test/test_portal.py
   pypy/branch/oo-jit/pypy/objspace/flow/model.py
Log:
allow ootype values to be used in multiple-cases exitswitches. This
makes all the portal tests to pass



Modified: pypy/branch/oo-jit/pypy/jit/rainbow/test/test_portal.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/rainbow/test/test_portal.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/rainbow/test/test_portal.py	Thu Jun 19 14:04:23 2008
@@ -630,13 +630,6 @@
     def check_method_calls(self, n):
         self.check_insns(oosend=n)
 
-    def _skip(self):
-        py.test.skip('in progress')
-
-    test_method_call_promote = _skip
-    test_float_promote = _skip
-    test_virt_obj_method_call_promote = _skip
-
 class TestPortalLLType(BaseTestPortal):
     type_system = 'lltype'
 

Modified: pypy/branch/oo-jit/pypy/objspace/flow/model.py
==============================================================================
--- pypy/branch/oo-jit/pypy/objspace/flow/model.py	(original)
+++ pypy/branch/oo-jit/pypy/objspace/flow/model.py	Thu Jun 19 14:04:23 2008
@@ -5,6 +5,7 @@
 # a discussion in Berlin, 4th of october 2003
 from __future__ import generators
 import py
+from pypy.rpython.ootypesystem import ootype
 from pypy.tool.uid import uid, Hashable
 from pypy.tool.descriptor import roproperty
 from pypy.tool.sourcetools import PY_IDENTIFIER, nice_repr_for_func
@@ -561,6 +562,8 @@
                             continue
                         if isinstance(n, (str, unicode)) and len(n) == 1:
                             continue
+                        if isinstance(ootype.typeOf(n), ootype.OOType):
+                            continue
                         assert n != 'default', (
                             "'default' branch of a switch is not the last exit"
                             )



More information about the Pypy-commit mailing list