[pypy-svn] r64527 - in pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp: . test

antocuni at codespeak.net antocuni at codespeak.net
Tue Apr 21 17:07:57 CEST 2009


Author: antocuni
Date: Tue Apr 21 17:07:57 2009
New Revision: 64527

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py
Log:
(arigo, antocuni) more special casing of BoxObj


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py	Tue Apr 21 17:07:57 2009
@@ -464,7 +464,6 @@
     def skip(self):
         py.test.skip('in-progress')
 
-    test_three_cases = skip
     test_recursive_call_to_portal_from_blackhole = skip
 
 

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py	Tue Apr 21 17:07:57 2009
@@ -1,5 +1,6 @@
 import sys
 from pypy.rpython.lltypesystem import lltype, llmemory, rclass
+from pypy.rpython.ootypesystem import ootype
 from pypy.rpython.annlowlevel import llhelper, MixLevelHelperAnnotator,\
      cast_base_ptr_to_instance
 from pypy.annotation import model as annmodel
@@ -379,6 +380,8 @@
         return None
     if isinstance(TYPE, lltype.Ptr):
         return box.getptr(TYPE)
+    if isinstance(TYPE, ootype.OOType):
+        return ootype.cast_from_object(TYPE, box.getobj())
     else:
         return lltype.cast_primitive(TYPE, box.getint())
 unwrap._annspecialcase_ = 'specialize:arg(0)'
@@ -435,6 +438,9 @@
                 if isinstance(TYPE, lltype.Ptr):
                     assert isinstance(box, history.BoxPtr)
                     box.changevalue_ptr(lltype.cast_opaque_ptr(llmemory.GCREF, value))
+                elif isinstance(TYPE, ootype.OOType):
+                    assert isinstance(box, history.BoxObj)
+                    box.changevalue_obj(ootype.cast_to_object(value))
                 elif TYPE == lltype.Signed:
                     assert isinstance(box, history.BoxInt)
                     box.changevalue_int(value)



More information about the Pypy-commit mailing list