[pypy-svn] r77624 - in pypy/branch/32ptr-on-64bit/pypy/rpython/memory: . gc
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 5 19:32:19 CEST 2010
Author: arigo
Date: Tue Oct 5 19:32:18 2010
New Revision: 77624
Modified:
pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gc/base.py
pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gctypelayout.py
Log:
Hack goes on.
Modified: pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gc/base.py
==============================================================================
--- pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gc/base.py (original)
+++ pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gc/base.py Tue Oct 5 19:32:18 2010
@@ -178,6 +178,7 @@
Typically, 'callback' is a bound method and 'arg' can be None.
"""
typeid = self.get_type_id(obj)
+ # XXX missing performance shortcut for GcArray(HiddenGcRef32)
if self.is_gcarrayofgcptr(typeid):
# a performance shortcut for GcArray(gcptr)
length = (obj + llmemory.gcarrayofptr_lengthoffset).signed[0]
Modified: pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gctypelayout.py
==============================================================================
--- pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gctypelayout.py (original)
+++ pypy/branch/32ptr-on-64bit/pypy/rpython/memory/gctypelayout.py Tue Oct 5 19:32:18 2010
@@ -131,6 +131,7 @@
T_IS_GCARRAY_OF_GCPTR = 0x40000
T_IS_WEAKREF = 0x80000
T_IS_RPYTHON_INSTANCE = 0x100000 # the type is a subclass of OBJECT
+T_IS_GCARRAY_OF_HIDDENGCREF32 = 0x200000
T_KEY_MASK = intmask(0xFF000000)
T_KEY_VALUE = intmask(0x7A000000) # bug detection only
@@ -175,7 +176,10 @@
ARRAY = TYPE
if (isinstance(ARRAY.OF, lltype.Ptr)
and ARRAY.OF.TO._gckind == 'gc'):
- infobits |= T_IS_GCARRAY_OF_GCPTR
+ if ARRAY.OF == llmemory.HiddenGcRef32:
+ pass # infobits |= T_IS_GCARRAY_OF_HIDDENGCREF32
+ else:
+ infobits |= T_IS_GCARRAY_OF_GCPTR
varinfo.ofstolength = llmemory.ArrayLengthOffset(ARRAY)
varinfo.ofstovar = llmemory.itemoffsetof(TYPE, 0)
assert isinstance(ARRAY, lltype.Array)
More information about the Pypy-commit
mailing list