[pypy-commit] pypy gc_no_cleanup_nursery: a simple hack to avoid writing "uninitialized" to places

fijal noreply at buildbot.pypy.org
Mon Sep 1 20:22:15 CEST 2014


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: gc_no_cleanup_nursery
Changeset: r73274:ab09d9e107f6
Date: 2014-09-01 12:21 -0600
http://bitbucket.org/pypy/pypy/changeset/ab09d9e107f6/

Log:	a simple hack to avoid writing "uninitialized" to places

diff --git a/rpython/memory/gctransform/framework.py b/rpython/memory/gctransform/framework.py
--- a/rpython/memory/gctransform/framework.py
+++ b/rpython/memory/gctransform/framework.py
@@ -1264,6 +1264,7 @@
 
 
 def gen_zero_gc_pointers(TYPE, v, llops, previous_steps=None):
+    xxxx
     if previous_steps is None:
         previous_steps = []
     assert (isinstance(TYPE, lltype.Struct) or isinstance(TYPE, lltype.Array))
diff --git a/rpython/rtyper/lltypesystem/llmemory.py b/rpython/rtyper/lltypesystem/llmemory.py
--- a/rpython/rtyper/lltypesystem/llmemory.py
+++ b/rpython/rtyper/lltypesystem/llmemory.py
@@ -1037,7 +1037,8 @@
             else:
                 # this is a hack XXX de-hack this
                 llvalue = source._obj.getitem(i, uninitialized_ok=True)
-                dest._obj.setitem(i, llvalue)
+                if not isinstance(llvalue, lltype._uninitialized):
+                    dest._obj.setitem(i, llvalue)
     elif isinstance(T, lltype.Struct):
         for name in T._names:
             FIELDTYPE = getattr(T, name)


More information about the pypy-commit mailing list