[pypy-svn] r51752 - pypy/branch/unified-rtti/pypy/rpython/memory/gctransform

arigo at codespeak.net arigo at codespeak.net
Thu Feb 21 17:43:30 CET 2008


Author: arigo
Date: Thu Feb 21 17:43:29 2008
New Revision: 51752

Modified:
   pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/refcounting.py
   pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/transform.py
Log:
Lost the ll_assert along the way.


Modified: pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/refcounting.py
==============================================================================
--- pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/refcounting.py	(original)
+++ pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/refcounting.py	Thu Feb 21 17:43:29 2008
@@ -8,7 +8,6 @@
 from pypy.translator.backendopt.support import var_needsgc
 from pypy.rpython import rmodel
 from pypy.rlib.rarithmetic import ovfcheck
-from pypy.rlib.debug import ll_assert
 from pypy.rpython.rbuiltin import gen_cast
 import sys
 

Modified: pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/transform.py
==============================================================================
--- pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/transform.py	(original)
+++ pypy/branch/unified-rtti/pypy/rpython/memory/gctransform/transform.py	Thu Feb 21 17:43:29 2008
@@ -19,6 +19,7 @@
 from pypy.rpython.rtyper import LowLevelOpList
 from pypy.rpython.rbuiltin import gen_cast
 from pypy.rlib.rarithmetic import ovfcheck
+from pypy.rlib.debug import ll_assert
 import sets, os, sys
 from pypy.rpython.lltypesystem.lloperation import llop
 from pypy.translator.simplify import join_blocks, cleanup_graph
@@ -479,7 +480,9 @@
         # NB. this assumes that the HDR contains a typeptr field.
         # A bit of manual inlining...
         hdraddr = objaddr - gc_header_offset
-        return llmemory.cast_adr_to_ptr(hdraddr, HDRPTR).typeptr
+        rtti = llmemory.cast_adr_to_ptr(hdraddr, HDRPTR).typeptr
+        ll_assert(bool(rtti), "NULL rtti")
+        return rtti
     gh.gc_runtime_type_info = gc_runtime_type_info
 
     def typeof(objaddr):
@@ -488,6 +491,7 @@
         # A bit of manual inlining...
         hdraddr = objaddr - gc_header_offset
         rtti = llmemory.cast_adr_to_ptr(hdraddr, HDRPTR).typeptr
+        ll_assert(bool(rtti), "NULL rtti")
         return gcheaderbuilder.cast_rtti_to_typeinfo(rtti)
     gh.typeof = typeof
 



More information about the Pypy-commit mailing list