~ chicken-core (chicken-5) 401589f475035b314dae1f312884bd34c57551d6


commit 401589f475035b314dae1f312884bd34c57551d6
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Thu Jun 29 12:03:22 2023 +0200
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Thu Jun 29 12:03:22 2023 +0200

    Update comment for mark_live_objects
    
    It was still referring to the locative table, so drop that part.
    Also, expand a bit on why pending finalizers are marked (which may be
    surprising since we first mention that finalizers are excluded).

diff --git a/runtime.c b/runtime.c
index 8eceb235..edda5377 100644
--- a/runtime.c
+++ b/runtime.c
@@ -3727,14 +3727,13 @@ static C_regparm void C_fcall mark_live_objects(C_byte *tgt_space_start, C_byte
 
 /*
  * Mark all live *heap* objects that don't need GC mode-specific
- * treatment.  Thus, no finalizers, GC roots or locative tables.
- *
- * Locative tables are excluded because these need to chase forwarding
- * chains to update the corresponding pointer, while dead objects must
- * be zeroed out with NULL pointers.
+ * treatment.  Thus, no finalizers or other GC roots.
  *
  * Finalizers are excluded because these need special handling:
  * finalizers referring to dead objects must be marked and queued.
+ * However, *pending* finalizers (for objects previously determined
+ * to be collectable) are marked so that these objects stick around
+ * until after the finalizer has been run.
  *
  * This function does not need to be called on a minor GC, since these
  * objects won't ever exist in the nursery.
Trap