emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/igc 496f647b7da 15/18: Cleanup


From: Gerd Moellmann
Subject: scratch/igc 496f647b7da 15/18: Cleanup
Date: Tue, 14 May 2024 04:02:09 -0400 (EDT)

branch: scratch/igc
commit 496f647b7daa8516f0f8ce2e06807f67672f4e53
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    Cleanup
---
 src/igc.c     |  2 ++
 src/igc.h     | 13 +++----------
 src/pdumper.c | 11 +----------
 3 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/src/igc.c b/src/igc.c
index c2cea0f6f86..cef08e14ef6 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -250,6 +250,8 @@ igc_static_assert (PVEC_TAG_MAX < (1 << IGC_PVEC_BITS));
 struct igc_header
 {
   enum igc_obj_type obj_type : IGC_TYPE_BITS;
+  /* FIXME: This was originally a debug aid only, but it now
+     used for something. Remove. */
   enum pvec_type pvec_type : IGC_PVEC_BITS;
   mps_word_t hash : IGC_HASH_BITS;
   mps_word_t nwords : IGC_SIZE_BITS;
diff --git a/src/igc.h b/src/igc.h
index 3253a1fba9a..fb47f1b1185 100644
--- a/src/igc.h
+++ b/src/igc.h
@@ -45,8 +45,9 @@ enum igc_obj_type
   IGC_OBJ_WEAK,
   IGC_OBJ_PTR_VEC,
 
-  /* The following are only used in the dump for objects that are not
-     allocated from MPS memory. */
+  /* FIXME: The following are currently only used in the dump for
+     objects that are not allocated from MPS memory. Make them real MPS
+     objects. */
   IGC_OBJ_DUMPED_INTFWD,
   IGC_OBJ_DUMPED_BOOLFWD,
   IGC_OBJ_DUMPED_OBJFWD,
@@ -62,14 +63,6 @@ enum igc_obj_type
 /* Assertions.  */
 # define IGC_DEBUG 1
 
-/* If defined, allocate conses from MPS.  */
-# define IGC_MANAGE_CONS 1
-# define IGC_MANAGE_SYMBOLS 1
-
-/* If defined, use a debug AMS pool, and check fenceposts etc.
-   See MPS docs.  Can be slow.  */
-# define IGC_DEBUG_POOL 1
-
 void igc_break (void);
 void init_igc (void);
 void syms_of_igc (void);
diff --git a/src/pdumper.c b/src/pdumper.c
index ce7281e35e7..f635cd7b7c8 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -572,9 +572,7 @@ struct dump_context
   dump_off number_discardable_relocations;
 
 # ifdef HAVE_MPS
-#  ifdef ENABLE_CHECKING
   Lisp_Object igc_object_starts;
-#  endif
   dump_off igc_base_offset;
   void *igc_obj_dumped;
   enum igc_obj_type igc_type;
@@ -878,7 +876,6 @@ dump_align_output (struct dump_context *ctx, int alignment)
 }
 
 # ifdef HAVE_MPS
-
 static void
 dump_igc_start_obj (struct dump_context *ctx, enum igc_obj_type type,
                    const void *in)
@@ -890,7 +887,7 @@ dump_igc_start_obj (struct dump_context *ctx, enum 
igc_obj_type type,
   ctx->igc_base_offset = ctx->offset;
   if (ctx->flags.dump_object_contents)
     {
-      /* FIXME: Nonsense because of an assertion in dump_write. */
+      /* FIXME: Because of an assertion in dump_write. */
       dump_off obj_offset = ctx->obj_offset;
       ctx->obj_offset = 0;
       dump_write_zero (ctx, igc_header_size ());
@@ -909,19 +906,16 @@ dump_igc_finish_obj (struct dump_context *ctx)
       char *should_end = igc_finish_obj (ctx->igc_obj_dumped, ctx->igc_type, 
base, end);
       eassert (should_end >= end);
       dump_write_zero (ctx, should_end - end);
-#  ifdef ENABLE_CHECKING
       if (ctx->flags.record_object_starts)
        dump_push (&ctx->igc_object_starts,
                   list2 (dump_off_to_lisp (ctx->igc_base_offset),
                          dump_off_to_lisp (ctx->offset)));
-#  endif
     }
 
   ctx->igc_obj_dumped = NULL;
   ctx->igc_type = IGC_OBJ_INVALID;
   ctx->igc_base_offset = -1;
 }
-
 # endif // HAVE_MPS
 
 static dump_off
@@ -3297,9 +3291,6 @@ dump_object (struct dump_context *ctx, Lisp_Object object)
 # error "Lisp_Type changed. See CHECK_STRUCTS comment in config.h."
 #endif
   eassert (!EQ (object, dead_object ()));
-# ifdef HAVE_MPS
-  eassert (ctx->igc_type == IGC_OBJ_INVALID);
-# endif
 
   dump_off offset = dump_recall_object (ctx, object);
   if (offset > 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]