[pypy-svn] r70992 - in pypy/trunk/pypy/rlib: . test
arigo at codespeak.net
arigo at codespeak.net
Sat Jan 30 18:55:19 CET 2010
Author: arigo
Date: Sat Jan 30 18:55:19 2010
New Revision: 70992
Modified:
pypy/trunk/pypy/rlib/rgc.py
pypy/trunk/pypy/rlib/test/test_rgc.py
Log:
Revert r70966+r70967. They break a lot of tests.
Modified: pypy/trunk/pypy/rlib/rgc.py
==============================================================================
--- pypy/trunk/pypy/rlib/rgc.py (original)
+++ pypy/trunk/pypy/rlib/rgc.py Sat Jan 30 18:55:19 2010
@@ -258,7 +258,7 @@
if isinstance(TP.OF, lltype.Ptr) and TP.OF.TO._gckind == 'gc':
# perform a write barrier that copies necessary flags from
# source to dest
- if not llop.gc_writebarrier_before_copy(lltype.Bool, source, dest):
+ if not llop.gc_writebarrier_before_copy(lltype.Void, source, dest):
# if the write barrier is not supported, copy by hand
for i in range(length):
dest[i + dest_start] = source[i + source_start]
Modified: pypy/trunk/pypy/rlib/test/test_rgc.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_rgc.py (original)
+++ pypy/trunk/pypy/rlib/test/test_rgc.py Sat Jan 30 18:55:19 2010
@@ -1,5 +1,5 @@
from pypy.rpython.test.test_llinterp import gengraph, interpret
-from pypy.rpython.lltypesystem import lltype, llmemory
+from pypy.rpython.lltypesystem import lltype
from pypy.rlib import rgc # Force registration of gc.collect
import gc
import py, sys
@@ -114,28 +114,6 @@
else:
assert a2[i] == org2[i]
-def test_ll_arraycopy_5(monkeypatch):
- S = lltype.GcStruct('S')
- TYPE = lltype.GcArray(lltype.Ptr(S))
- def f():
- a1 = lltype.malloc(TYPE, 10)
- a2 = lltype.malloc(TYPE, 6)
- rgc.ll_arraycopy(a2, a1, 0, 1, 5)
-
- CHK = lltype.Struct('CHK', ('called', lltype.Bool))
- check = lltype.malloc(CHK, immortal=True)
-
- def raw_memcopy(*args):
- check.called = True
-
- monkeypatch.setattr(llmemory, "raw_memcopy", raw_memcopy)
-
- interpret(f, [])
-
- assert check.called
-
-
-
def test_ll_shrink_array_1():
py.test.skip("implement ll_shrink_array for GcStructs or GcArrays that "
"don't have the shape of STR or UNICODE")
More information about the Pypy-commit
mailing list