[pypy-svn] r54276 - in pypy/branch/oo-jit/pypy/jit: codegen/llgraph rainbow rainbow/test timeshifter

antocuni at codespeak.net antocuni at codespeak.net
Wed Apr 30 16:00:37 CEST 2008


Author: antocuni
Date: Wed Apr 30 16:00:36 2008
New Revision: 54276

Modified:
   pypy/branch/oo-jit/pypy/jit/codegen/llgraph/llimpl.py
   pypy/branch/oo-jit/pypy/jit/rainbow/test/test_llinterp.py
   pypy/branch/oo-jit/pypy/jit/rainbow/typesystem.py
   pypy/branch/oo-jit/pypy/jit/timeshifter/rtimeshift.py
Log:
start making test_llinterp passing also for ootype



Modified: pypy/branch/oo-jit/pypy/jit/codegen/llgraph/llimpl.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/llgraph/llimpl.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/llgraph/llimpl.py	Wed Apr 30 16:00:36 2008
@@ -786,6 +786,8 @@
 setannotation(gengetarraysubstruct, s_ConstOrVar)
 setannotation(gensetfield, None)
 setannotation(gengetfield, s_ConstOrVar)
+setannotation(genoosetfield, None)
+setannotation(genoogetfield, s_ConstOrVar)
 setannotation(gensetarrayitem, None)
 setannotation(gengetarrayitem, s_ConstOrVar)
 setannotation(gengetarraysize, s_ConstOrVar)

Modified: pypy/branch/oo-jit/pypy/jit/rainbow/test/test_llinterp.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/rainbow/test/test_llinterp.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/rainbow/test/test_llinterp.py	Wed Apr 30 16:00:36 2008
@@ -6,8 +6,14 @@
     py.test.skip("slow")
 
 
+class TestLLInterpretedOOType(test_portal.TestPortalOOType):
+    translate_support_code = True
+
+    # for the individual tests see
+    # ====> test_portal.py
+
 
-class TestLLInterpreted(test_portal.TestPortalLLType):
+class TestLLInterpretedLLType(test_portal.TestPortalLLType):
     translate_support_code = True
 
     # for the individual tests see

Modified: pypy/branch/oo-jit/pypy/jit/rainbow/typesystem.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/rainbow/typesystem.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/rainbow/typesystem.py	Wed Apr 30 16:00:36 2008
@@ -1,3 +1,4 @@
+from pypy.rpython.annlowlevel import base_ptr_lltype
 from pypy.rpython.lltypesystem import lltype, llmemory
 from pypy.rpython.ootypesystem import ootype
 
@@ -25,6 +26,7 @@
 
     name = 'lltype'
     ROOT_TYPE = llmemory.Address
+    NULL_OBJECT = base_ptr_lltype()._defl()
 
     def get_typeptr(self, obj):
         return obj.typeptr
@@ -53,6 +55,7 @@
 
     name = 'ootype'
     ROOT_TYPE = ootype.Object
+    NULL_OBJECT = ootype.NULL
 
     def get_typeptr(self, obj):
         return obj.meta

Modified: pypy/branch/oo-jit/pypy/jit/timeshifter/rtimeshift.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/timeshifter/rtimeshift.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/timeshifter/rtimeshift.py	Wed Apr 30 16:00:36 2008
@@ -15,8 +15,6 @@
 FOLDABLE_GREEN_OPS['getarrayitem'] = None
 FOLDABLE_GREEN_OPS['getinteriorfield'] = None
 
-NULL_OBJECT = base_ptr_lltype()._defl()
-
 debug_view = lloperation.llop.debug_view
 debug_print = lloperation.llop.debug_print
 debug_pdb = lloperation.llop.debug_pdb
@@ -419,10 +417,11 @@
         return exitgvar.revealconst(lltype.Bool)
     else:
         return split_nonconstantcase(jitstate, exitgvar, resumepoint,
-                                     switchredbox, False, list(greens_gv))
+                                     switchredbox, False, list(greens_gv),
+                                     jitstate.ts.NULL_OBJECT)
 
 def split_nonconstantcase(jitstate, exitgvar, resumepoint,
-                          condbox, reverse, greens_gv, ll_evalue=NULL_OBJECT):
+                          condbox, reverse, greens_gv, ll_evalue):
     resuming = jitstate.get_resuming()
     if resuming is not None and resuming.mergesleft == 0:
         node = resuming.path.pop()



More information about the Pypy-commit mailing list