Author: Armin Rigo <ar...@tunes.org> Branch: stm-gc Changeset: r54442:d5653c635122 Date: 2012-04-16 21:18 +0200 http://bitbucket.org/pypy/pypy/changeset/d5653c635122/
Log: More asserts diff --git a/pypy/rpython/memory/gc/stmtls.py b/pypy/rpython/memory/gc/stmtls.py --- a/pypy/rpython/memory/gc/stmtls.py +++ b/pypy/rpython/memory/gc/stmtls.py @@ -399,6 +399,18 @@ "in a root: missing GCFLAG_WAS_COPIED") ll_assert(localhdr.tid & GCFLAG_VISITED != 0, "in a root: missing GCFLAG_VISITED") + globalhdr = self.gc.header(globalobj) + ll_assert(globalhdr.tid & GCFLAG_GLOBAL != 0, + "in a root: GLOBAL: missing GCFLAG_GLOBAL") + ll_assert(globalhdr.tid & GCFLAG_WAS_COPIED != 0, + "in a root: GLOBAL: missing GCFLAG_WAS_COPIED") + ll_assert(globalhdr.tid & GCFLAG_VISITED == 0, + "in a root: GLOBAL: unexpected GCFLAG_VISITED") + TL = lltype.cast_primitive(lltype.Signed, + self.gc.get_type_id(localobj)) + TG = lltype.cast_primitive(lltype.Signed, + self.gc.get_type_id(globalobj)) + ll_assert(TL == TG, "in a root: type(LOCAL) != type(GLOBAL)") # self.trace_and_drag_out_of_nursery(localobj) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit