diff src/data.c @ 1598:ac1be85b4a5f

[xemacs-hg @ 2003-07-31 13:32:24 by crestani] 2003-07-29 Marcus Crestani <crestani@informatik.uni-tuebingen.de> Markus Kaltenbach <makalten@informatik.uni-tuebingen.de> * README.kkcc: Aligned to the changes. * alloc.c: Implemented the kkcc_gc_stack. (kkcc_gc_stack_init): (kkcc_gc_stack_free): (kkcc_gc_stack_realloc): (kkcc_gc_stack_full): (kkcc_gc_stack_empty): (kkcc_gc_stack_push): (kkcc_gc_stack_pop): (kkcc_gc_stack_push_lisp_object): (mark_object_maybe_checking_free): Push objects on kkcc stack instead of marking. (mark_struct_contents): Push objects on kkcc stack instead of marking. (kkcc_marking): KKCC mark algorithm using the kkcc_gc_stack. (mark_object): Removed KKCC ifdefs. (garbage_collect_1): Push objects on kkcc stack instead of marking. * data.c: Added XD_FLAG_NO_KKCC to ephemeron_description and to weak_list_description. * data.c (finish_marking_weak_lists): Push objects on kkcc stack instead of marking. (continue_marking_ephemerons): Push objects on kkcc stack instead of marking. (finish_marking_ephemerons): Push objects on kkcc stack instead of marking. * elhash.c (finish_marking_weak_hash_tables): Push objects on kkcc stack instead of marking. * eval.c: Added XD_FLAG_NO_KKCC to subr_description. * lisp.h: Added prototype for kkcc_gc_stack_push_lisp_object. * profile.c (mark_profiling_info_maphash): Push keys on kkcc stack instead of marking.
author crestani
date Thu, 31 Jul 2003 13:32:26 +0000
parents 03009473262a
children 9c872f33ecbe
line wrap: on
line diff
--- a/src/data.c	Wed Jul 30 21:52:22 2003 +0000
+++ b/src/data.c	Thu Jul 31 13:32:26 2003 +0000
@@ -1613,8 +1613,10 @@
 }
 
 static const struct memory_description weak_list_description[] = {
-  { XD_LISP_OBJECT, offsetof (struct weak_list, list) },
-  { XD_LO_LINK,     offsetof (struct weak_list, next_weak) },
+  { XD_LISP_OBJECT, offsetof (struct weak_list, list), 
+  0, 0, XD_FLAG_NO_KKCC },
+  { XD_LO_LINK,     offsetof (struct weak_list, next_weak), 
+  0, 0, XD_FLAG_NO_KKCC },
   { XD_END }
 };
 
@@ -1761,7 +1763,11 @@
 
 	  if (need_to_mark_elem && ! marked_p (elem))
 	    {
+#ifdef USE_KKCC
+	      kkcc_gc_stack_push_lisp_object (elem);
+#else /* NOT USE_KKCC */
 	      mark_object (elem);
+#endif /* NOT USE_KKCC */
 	      did_mark = 1;
 	    }
 
@@ -1785,7 +1791,11 @@
          because we're not removing it */
       if (!NILP (rest2) && ! marked_p (rest2))
 	{
+#ifdef USE_KKCC
+	  kkcc_gc_stack_push_lisp_object (rest2);
+#else /* NOT USE_KKCC */
 	  mark_object (rest2);
+#endif /* NOT USE_KKCC */
 	  did_mark = 1;
 	}
     }
@@ -2160,7 +2170,12 @@
 	  MARK_CONS (XCONS (XEPHEMERON (rest)->cons_chain));
 	  if (marked_p (XEPHEMERON (rest)->key))
 	    {
+#ifdef USE_KKCC
+	      kkcc_gc_stack_push_lisp_object 
+	      (XCAR (XEPHEMERON (rest)->cons_chain));
+#else /* NOT USE_KKCC */
 	      mark_object (XCAR (XEPHEMERON (rest)->cons_chain));
+#endif /* NOT USE_KKCC */
 	      did_mark = 1;
 	      XSET_EPHEMERON_NEXT (rest, Vnew_all_ephemerons);
 	      Vnew_all_ephemerons = rest;
@@ -2205,7 +2220,12 @@
 	  if (! NILP (XEPHEMERON_FINALIZER (rest)))
 	    {
 	      MARK_CONS (XCONS (XEPHEMERON (rest)->cons_chain));
+#ifdef USE_KKCC
+	      kkcc_gc_stack_push_lisp_object 
+	      (XCAR (XEPHEMERON (rest)->cons_chain));
+#else /* NOT USE_KKCC */
 	      mark_object (XCAR (XEPHEMERON (rest)->cons_chain));
+#endif /* NOT USE_KKCC */
 
 	      /* Register the finalizer */
 	      XSET_EPHEMERON_NEXT (rest, Vfinalize_list);
@@ -2298,6 +2318,8 @@
   return result;
 }
 
+/* Ephemerons are special cases in the KKCC mark algorithm, so nothing
+   is marked here. */
 static const struct memory_description ephemeron_description[] = {
   { XD_LISP_OBJECT, offsetof(struct ephemeron, key),
     0, 0, XD_FLAG_NO_KKCC },