[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] master: Always scavenge something in scav_instance if no layout set.
From:       "Douglas Katzman" <snuglas () users ! sourceforge ! net>
Date:       2017-03-30 19:47:08
Message-ID: 1490903229.123991.1741 () sfp-scm-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  d3268488f0060e855af6572398a1affeed945ac1 (commit)
      from  00eb04905db84791d29f56e47744eb7cd3edf302 (commit)

- Log -----------------------------------------------------------------
commit d3268488f0060e855af6572398a1affeed945ac1
Author: Douglas Katzman <dougk@google.com>
Date:   Thu Mar 30 15:44:03 2017 -0400

    Always scavenge something in scav_instance if no layout set.
    
    We might as well use the optimized loop therein. It doesn't occur
    often enough for this to matter, but it's the right thing to do.
---
 src/runtime/gc-common.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c
index 00c4de4..81eb4a7 100644
--- a/src/runtime/gc-common.c
+++ b/src/runtime/gc-common.c
@@ -672,19 +672,20 @@ static sword_t
 scav_instance(lispobj *where, lispobj header)
 {
     lispobj* layout = (lispobj*)instance_layout(where);
-    if (!layout)
-        return 1;
-    layout = native_pointer((lispobj)layout);
+    lispobj lbitmap = make_fixnum(-1);
+
+    if (layout) {
+        layout = native_pointer((lispobj)layout);
 #ifdef LISP_FEATURE_COMPACT_INSTANCE_HEADER
-    if (__immobile_obj_gen_bits(layout) == from_space)
-        promote_immobile_obj(layout, 1);
+        if (__immobile_obj_gen_bits(layout) == from_space)
+            promote_immobile_obj(layout, 1);
 #else
-    if (forwarding_pointer_p(layout))
-        layout = native_pointer(forwarding_pointer_value(layout));
+        if (forwarding_pointer_p(layout))
+            layout = native_pointer(forwarding_pointer_value(layout));
 #endif
-
+        lbitmap = ((struct layout*)layout)->bitmap;
+    }
     sword_t nslots = instance_length(header) | 1;
-    lispobj lbitmap = ((struct layout*)layout)->bitmap;
     if (lbitmap == make_fixnum(-1))
         scavenge(where+1, nslots);
     else if (!fixnump(lbitmap))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic