[pypy-svn] r76823 - pypy/trunk/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Wed Sep 1 19:55:49 CEST 2010


Author: arigo
Date: Wed Sep  1 19:55:47 2010
New Revision: 76823

Modified:
   pypy/trunk/pypy/rpython/lltypesystem/llmemory.py
Log:
Add a __slots__ declaration here, hoping to save
45MB in a "translate.py -Ojit".


Modified: pypy/trunk/pypy/rpython/lltypesystem/llmemory.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/llmemory.py	(original)
+++ pypy/trunk/pypy/rpython/lltypesystem/llmemory.py	Wed Sep  1 19:55:47 2010
@@ -389,6 +389,7 @@
 # -------------------------------------------------------------
 
 class fakeaddress(object):
+    __slots__ = ['ptr']
     # NOTE: the 'ptr' in the addresses must be normalized.
     # Use cast_ptr_to_adr() instead of directly fakeaddress() if unsure.
     def __init__(self, ptr):
@@ -530,7 +531,6 @@
     pass
 
 NULL = fakeaddress(None)
-NULL.intaddress = 0      # this is to make memory.lladdress more happy
 Address = lltype.Primitive("Address", NULL)
 
 # GCREF is similar to Address but it is GC-aware



More information about the Pypy-commit mailing list