[pypy-svn] r15919 - pypy/dist/pypy/rpython/memory

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Aug 10 16:31:16 CEST 2005


Author: cfbolz
Date: Wed Aug 10 16:31:15 2005
New Revision: 15919

Modified:
   pypy/dist/pypy/rpython/memory/convertlltype.py
   pypy/dist/pypy/rpython/memory/lltypesimulation.py
Log:
ouch. always test before you checkin. more places that needed changing.


Modified: pypy/dist/pypy/rpython/memory/convertlltype.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/convertlltype.py	(original)
+++ pypy/dist/pypy/rpython/memory/convertlltype.py	Wed Aug 10 16:31:15 2005
@@ -104,13 +104,9 @@
 
     def convert_object(self, _obj, inline_to_addr, from_parent):
         if inline_to_addr is not None:
-            inline_to_addr.address[0] = lladdress.get_address_of_object(_obj)
-            return inline_to_addr
+            assert 0, "can't inline function or pyobject"
         else:
-            addr = self.curraddress
-            addr.address[0] = lladdress.get_address_of_object(_obj)
-            self.curraddress += struct.calcsize("P")
-            return addr
+            return lladdress.get_address_of_object(_obj)
 
 class FlowGraphConstantConverter(object):
     def __init__(self, flowgraphs):

Modified: pypy/dist/pypy/rpython/memory/lltypesimulation.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/lltypesimulation.py	(original)
+++ pypy/dist/pypy/rpython/memory/lltypesimulation.py	Wed Aug 10 16:31:15 2005
@@ -200,7 +200,7 @@
 
     def _getobj(self):
         assert isinstance(self._T, (lltype.FuncType, lltype.PyObjectType))
-        return lladdress.get_py_object(self._address.address[0])
+        return lladdress.get_py_object(self._address)
     _obj = property(_getobj)
 
     def __call__(self, *args):
@@ -210,7 +210,7 @@
             for a, ARG in zip(args, self._T.ARGS):
                 if lltype.typeOf(a) != ARG:
                     raise TypeError,"calling %r with wrong argument types: %r" % (self._T, args)
-            callb = lladdress.get_py_object(self._address.address[0])._callable
+            callb = lladdress.get_py_object(self._address)._callable
             if callb is None:
                 raise RuntimeError,"calling undefined function"
             return callb(*args)



More information about the Pypy-commit mailing list