[pypy-svn] r54301 - in pypy/branch/oo-jit/pypy/jit: rainbow rainbow/test timeshifter
antocuni at codespeak.net
antocuni at codespeak.net
Thu May 1 11:38:50 CEST 2008
Author: antocuni
Date: Thu May 1 11:38:48 2008
New Revision: 54301
Modified:
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:
more translation fixes
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 Thu May 1 11:38:48 2008
@@ -12,6 +12,14 @@
# for the individual tests see
# ====> test_portal.py
+ def skip(self):
+ py.test.skip('in progress')
+
+ test_dfa_compile = skip
+ test_dfa_compile2 = skip
+ test_dfa_compile3 = skip
+
+
class TestLLInterpretedLLType(test_portal.TestPortalLLType):
translate_support_code = True
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 Thu May 1 11:38:48 2008
@@ -1,4 +1,6 @@
-from pypy.rpython.annlowlevel import base_ptr_lltype
+from pypy.rpython.annlowlevel import base_ptr_lltype, base_obj_ootype
+from pypy.rpython.annlowlevel import cast_instance_to_base_ptr
+from pypy.rpython.annlowlevel import cast_instance_to_base_obj
from pypy.rpython.lltypesystem import lltype, llmemory
from pypy.rpython.ootypesystem import ootype
@@ -27,6 +29,7 @@
name = 'lltype'
ROOT_TYPE = llmemory.Address
NULL_OBJECT = base_ptr_lltype()._defl()
+ cast_instance_to_base_ptr = staticmethod(cast_instance_to_base_ptr)
def get_typeptr(self, obj):
return obj.typeptr
@@ -55,7 +58,8 @@
name = 'ootype'
ROOT_TYPE = ootype.Object
- NULL_OBJECT = ootype.NULL
+ NULL_OBJECT = base_obj_ootype()._defl()
+ cast_instance_to_base_ptr = staticmethod(cast_instance_to_base_obj)
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 Thu May 1 11:38:48 2008
@@ -777,10 +777,10 @@
else:
return ptr
-def _cast_promotion_point_to_base_ptr(instance):
+def _cast_promotion_point_to_base_ptr(jitstate, instance):
assert isinstance(instance, PromotionPoint)
if we_are_translated():
- return cast_instance_to_base_ptr(instance)
+ return jitstate.ts.cast_instance_to_base_ptr(instance)
else:
return instance
@@ -846,7 +846,7 @@
pm = PromotionPoint(flexswitch, incoming_gv,
jitstate.promotion_path)
#debug_print(lltype.Void, "PROMOTE")
- ll_pm = _cast_promotion_point_to_base_ptr(pm)
+ ll_pm = _cast_promotion_point_to_base_ptr(jitstate, pm)
gv_pm = default_builder.rgenop.genconst(ll_pm)
gv_switchvar = promotebox.genvar
exceptiondesc = promotiondesc.exceptiondesc
@@ -1282,7 +1282,7 @@
setexcvaluebox(self, evaluebox)
def residual_exception(self, e):
- self.residual_ll_exception(cast_instance_to_base_ptr(e))
+ self.residual_ll_exception(self.ts.cast_instance_to_base_ptr(e))
def get_resuming(self):
if self.frame.dispatchqueue is None:
More information about the pypy-svn
mailing list