Author: Armin Rigo <ar...@tunes.org>
Branch: boehm-rawrefcount
Changeset: r86925:9a75c25f25c3
Date: 2016-09-07 14:22 +0200
http://bitbucket.org/pypy/pypy/changeset/9a75c25f25c3/

Log:    tweak

diff --git a/rpython/rlib/src/boehm-rawrefcount.c 
b/rpython/rlib/src/boehm-rawrefcount.c
--- a/rpython/rlib/src/boehm-rawrefcount.c
+++ b/rpython/rlib/src/boehm-rawrefcount.c
@@ -237,6 +237,7 @@
 static void boehm_is_about_to_collect(void)
 {
     struct link_s *plist = hash_list;
+    uintptr_t gcenc_union = 0;
     while (plist != NULL) {
         uintptr_t i, count = plist[0].gcenc;
         for (i = 1; i < count; i++) {
@@ -260,12 +261,13 @@
                 */
                 plist[i].gcenc = ~plist[i].gcenc;
             }
+            gcenc_union |= plist[i].gcenc;
 #ifdef TEST_BOEHM_RAWREFCOUNT
             printf("-> %p\n", plist[i].gcenc);
 #endif
     }
         plist = plist[0].next_in_bucket;
     }
-    if (hash_mask_bucket > 0)
+    if (gcenc_union & 1)   /* if there is at least one item potentially dead */
         hash_list_walk_next = hash_mask_bucket;
 }
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to