[pypy-commit] pypy gc_no_cleanup_nursery: Expand the code to catch more missing cases and crash with clean errors

arigo noreply at buildbot.pypy.org
Tue Sep 23 14:31:33 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: gc_no_cleanup_nursery
Changeset: r73665:b76c81163a3d
Date: 2014-09-23 14:31 +0200
http://bitbucket.org/pypy/pypy/changeset/b76c81163a3d/

Log:	Expand the code to catch more missing cases and crash with clean
	errors

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
@@ -1222,6 +1222,16 @@
                                               previous_steps + [c_name],
                                               everything=everything)
                     continue
+                if isinstance(FIELD, lltype.Array):
+                    if everything:
+                        raise NotImplementedError(
+                            "%s: Struct-containing-Array with everything=True"
+                            % (TYPE,))
+                    if gctypelayout.offsets_to_gc_pointers(FIELD.OF):
+                        raise NotImplementedError(
+                            "%s: Struct-containing-Array-with-gc-pointers"
+                            % (TYPE,))
+                    continue
                 if ((isinstance(FIELD, lltype.Ptr) and FIELD._needsgc())
                     or everything):
                     c_null = rmodel.inputconst(FIELD, FIELD._defl())
@@ -1230,9 +1240,6 @@
                                 [v] + previous_steps + [c_name, c_null])
                     else:
                         llops.genop('bare_setfield', [v, c_name, c_null])
-                elif (isinstance(FIELD, lltype.Array) and
-                      isinstance(FIELD.OF, lltype.Ptr) and FIELD.OF._needsgc()):
-                    xxx
          
             return
         elif isinstance(TYPE, lltype.Array):


More information about the pypy-commit mailing list