[pypy-svn] r36146 - pypy/dist/pypy/translator/llvm

arigo at codespeak.net arigo at codespeak.net
Thu Jan 4 13:19:20 CET 2007


Author: arigo
Date: Thu Jan  4 13:19:18 2007
New Revision: 36146

Modified:
   pypy/dist/pypy/translator/llvm/database.py
Log:
Fix the repr_address().


Modified: pypy/dist/pypy/translator/llvm/database.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/database.py	(original)
+++ pypy/dist/pypy/translator/llvm/database.py	Thu Jan  4 13:19:18 2007
@@ -467,10 +467,9 @@
     def repr_address(self, type_, value):
         if not value:
             return 'null'
-        obj = value.ptr._obj
-        typename = self.database.repr_type(lltype.typeOf(obj))
-        ref = self.database.repr_name(obj)
-        res = "cast(%s* %s to sbyte*)" % (typename, ref)
+        ptr = value.ptr
+        node, ref = self.database.repr_constant(ptr)
+        res = "cast(%s to sbyte*)" % (ref,)
         return res
 
     def repr_weakgcaddress(self, type_, value):



More information about the Pypy-commit mailing list