[pypy-svn] r29898 - in pypy/dist/pypy: module/_stackless/test rpython/memory
arigo at codespeak.net
arigo at codespeak.net
Sun Jul 9 15:34:32 CEST 2006
Author: arigo
Date: Sun Jul 9 15:34:31 2006
New Revision: 29898
Added:
pypy/dist/pypy/module/_stackless/test/test_choicepoint.py
- copied, changed from r29897, pypy/extradoc/talk/ep2006/test1.py
Modified:
pypy/dist/pypy/rpython/memory/gc.py
Log:
(a bit of pedronis, arigo)
The cloning demo now works. The bug was really obscure and this part should be
cleaned up at some point -- though that's unlikely to be done soon... well, it
works now.
Modified: pypy/dist/pypy/rpython/memory/gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gc.py (original)
+++ pypy/dist/pypy/rpython/memory/gc.py Sun Jul 9 15:34:31 2006
@@ -574,7 +574,13 @@
newhdr_addr = newobj_addr - size_gc_header
newhdr = llmemory.cast_adr_to_ptr(newhdr_addr, self.HDRPTR)
+
+ saved_id = newhdr.typeid # XXX hack needed for genc
+ saved_next = newhdr.next # where size_gc_header == 0
raw_memcopy(oldobj_addr, newobj_addr, size)
+ newhdr.typeid = saved_id
+ newhdr.next = saved_next
+
offsets = self.offsets_to_gc_pointers(typeid)
i = 0
while i < len(offsets):
More information about the Pypy-commit
mailing list