Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r178:58c077a3a7f6
Date: 2013-06-17 18:15 +0200
http://bitbucket.org/pypy/stmgc/changeset/58c077a3a7f6/

Log:    Next test, and the simplest fix so far: move a "#if 0" one line.

diff --git a/c4/gcpage.c b/c4/gcpage.c
--- a/c4/gcpage.c
+++ b/c4/gcpage.c
@@ -404,8 +404,8 @@
     mark_prebuilt_roots();
 #endif
     mark_all_stack_roots();
+    visit_all_objects();
 #if 0
-    visit_all_objects();
     gcptrlist_delete(&objects_to_trace);
     clean_up_lists_of_read_objects_and_fix_outdated_flags();
 #endif
diff --git a/c4/test/test_gcpage.py b/c4/test/test_gcpage.py
--- a/c4/test/test_gcpage.py
+++ b/c4/test/test_gcpage.py
@@ -133,3 +133,13 @@
     p3 = oalloc(HDR)
     p4 = oalloc(HDR)
     assert p2 != p3 != p4 != p2
+
+def test_trace_simple():
+    p1 = oalloc_refs(1)
+    p2 = oalloc(HDR)
+    rawsetptr(p1, 0, p2)
+    lib.stm_push_root(p1)
+    major_collect()
+    p1b = lib.stm_pop_root()
+    assert p1b == p1    # oalloc() does not use the nursery
+    assert count_pages() == 2   # one for p1, one for p2, which have != sizes
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to