[pypy-svn] r56232 - pypy/dist/pypy/rpython/memory
arigo at codespeak.net
arigo at codespeak.net
Wed Jul 2 11:40:13 CEST 2008
Author: arigo
Date: Wed Jul 2 11:40:09 2008
New Revision: 56232
Modified:
pypy/dist/pypy/rpython/memory/gctypelayout.py
Log:
We can share all zero-length arrays in the gc tables.
Modified: pypy/dist/pypy/rpython/memory/gctypelayout.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctypelayout.py (original)
+++ pypy/dist/pypy/rpython/memory/gctypelayout.py Wed Jul 2 11:40:09 2008
@@ -232,6 +232,8 @@
return type_id
def offsets2table(self, offsets, TYPE):
+ if len(offsets) == 0:
+ TYPE = lltype.Void # we can share all zero-length arrays
try:
return self.offsettable_cache[TYPE]
except KeyError:
More information about the Pypy-commit
mailing list