Author: Armin Rigo <[email protected]>
Branch:
Changeset: r332:874251ce1920
Date: 2013-07-01 13:04 +0200
http://bitbucket.org/pypy/stmgc/changeset/874251ce1920/
Log: More fixes
diff --git a/c4/gcpage.c b/c4/gcpage.c
--- a/c4/gcpage.c
+++ b/c4/gcpage.c
@@ -219,21 +219,14 @@
return;
restart:
- if (obj->h_tid & GCFLAG_VISITED) {
- dprintf(("[already visited: %p]\n", obj));
- assert(obj == *pobj);
- assert((obj->h_revision & 3) || /* either odd, or stub */
- (obj->h_tid & GCFLAG_PRIVATE_FROM_PROTECTED));
- return; /* already seen */
- }
-
if (obj->h_revision & 1) {
assert(!(obj->h_tid & GCFLAG_PRIVATE_FROM_PROTECTED));
- obj->h_tid &= ~GCFLAG_PUBLIC_TO_PRIVATE; /* see also fix_outdated() */
-
- obj->h_tid |= GCFLAG_VISITED;
assert(!(obj->h_tid & GCFLAG_STUB));
- gcptrlist_insert(&objects_to_trace, obj);
+ if (!(obj->h_tid & GCFLAG_VISITED)) {
+ obj->h_tid &= ~GCFLAG_PUBLIC_TO_PRIVATE; /* see fix_outdated() */
+ obj->h_tid |= GCFLAG_VISITED;
+ gcptrlist_insert(&objects_to_trace, obj);
+ }
}
else if (obj->h_tid & GCFLAG_PUBLIC) {
/* h_revision is a ptr: we have a more recent version */
@@ -270,6 +263,13 @@
*pobj = obj;
goto restart;
}
+ else if (obj->h_tid & GCFLAG_VISITED) {
+ dprintf(("[already visited: %p]\n", obj));
+ assert(obj == *pobj);
+ assert((obj->h_revision & 3) || /* either odd, or stub */
+ (obj->h_tid & GCFLAG_PRIVATE_FROM_PROTECTED));
+ return; /* already seen */
+ }
else {
assert(obj->h_tid & GCFLAG_PRIVATE_FROM_PROTECTED);
gcptr B = (gcptr)obj->h_revision;
diff --git a/c4/nursery.c b/c4/nursery.c
--- a/c4/nursery.c
+++ b/c4/nursery.c
@@ -91,7 +91,7 @@
assert(tid == (tid & STM_USER_TID_MASK));
gcptr P = allocate_nursery(size, tid);
P->h_revision = stm_private_rev_num;
- /*P->h_original = 0; --- the object is null-initialized already */
+ assert(P->h_original == 0); /* null-initialized already */
return P;
}
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit