[pypy-svn] r63901 - in pypy/branch/pyjitpl5-simplify/pypy: annotation rpython/ootypesystem/test

antocuni at codespeak.net antocuni at codespeak.net
Thu Apr 9 16:39:15 CEST 2009


Author: antocuni
Date: Thu Apr  9 16:39:14 2009
New Revision: 63901

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/annotation/binaryop.py
   pypy/branch/pyjitpl5-simplify/pypy/rpython/ootypesystem/test/test_oortype.py
Log:
make this test pass again by manually merging changes from oo-jit



Modified: pypy/branch/pyjitpl5-simplify/pypy/annotation/binaryop.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/annotation/binaryop.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/annotation/binaryop.py	Thu Apr  9 16:39:14 2009
@@ -898,12 +898,14 @@
             common = r2.ootype
         elif r2.ootype is None:
             common = r1.ootype
-        elif isinstance(r1.ootype, ootype.BuiltinType) or isinstance(r2.ootype, ootype.BuiltinType):
-            common = ootype.Object
-        else:
+        elif r1.ootype == r2.ootype:
+            common = r1.ootype
+        elif isinstance(r1.ootype, ootype.Instance) and isinstance(r2.ootype, ootype.Instance):
             common = ootype.commonBaseclass(r1.ootype, r2.ootype)
             assert common is not None, ('Mixing of incompatible classes %r, %r'
                                         % (r1.ootype, r2.ootype))
+        else:
+            common = ootype.Object
         return SomeOOClass(common)
 
 class __extend__(pairtype(SomeOOInstance, SomeObject)):

Modified: pypy/branch/pyjitpl5-simplify/pypy/rpython/ootypesystem/test/test_oortype.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/rpython/ootypesystem/test/test_oortype.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/rpython/ootypesystem/test/test_oortype.py	Thu Apr  9 16:39:14 2009
@@ -366,7 +366,6 @@
     assert not res
 
 def test_mix_class_record_instance():
-    py.test.skip('fixme!')
     I = Instance("test", ROOT, {"a": Signed})
     R = Record({"x": Signed})
     L = List(Signed)



More information about the Pypy-commit mailing list