[pypy-svn] r65083 - in pypy/branch/tagged-pointers-framework/pypy/rpython/memory: . test
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed May 6 12:26:52 CEST 2009
Author: cfbolz
Date: Wed May 6 12:26:50 2009
New Revision: 65083
Modified:
pypy/branch/tagged-pointers-framework/pypy/rpython/memory/gcwrapper.py
pypy/branch/tagged-pointers-framework/pypy/rpython/memory/test/test_gc.py
Log:
Fix gcwrapper to support prebuilt tagged pointers. Doesn't find the bug I am
hunting though.
Modified: pypy/branch/tagged-pointers-framework/pypy/rpython/memory/gcwrapper.py
==============================================================================
--- pypy/branch/tagged-pointers-framework/pypy/rpython/memory/gcwrapper.py (original)
+++ pypy/branch/tagged-pointers-framework/pypy/rpython/memory/gcwrapper.py Wed May 6 12:26:50 2009
@@ -205,7 +205,8 @@
def reccollect(constants, llvalue):
if (isinstance(llvalue, lltype._abstract_ptr)
- and llvalue._obj is not None and llvalue._obj not in constants):
+ and llvalue._obj is not None and llvalue._obj not in constants
+ and not isinstance(llvalue._obj, int)):
TYPE = llvalue._T
constants[llvalue._obj] = True
if isinstance(TYPE, lltype.Struct):
Modified: pypy/branch/tagged-pointers-framework/pypy/rpython/memory/test/test_gc.py
==============================================================================
--- pypy/branch/tagged-pointers-framework/pypy/rpython/memory/test/test_gc.py (original)
+++ pypy/branch/tagged-pointers-framework/pypy/rpython/memory/test/test_gc.py Wed May 6 12:26:50 2009
@@ -495,7 +495,9 @@
pass
u = Unrelated()
+ u.x = C(47)
def fn(n):
+ rgc.collect() # check that a prebuilt tagged pointer doesn't explode
if n > 0:
x = B(n)
else:
More information about the Pypy-commit
mailing list