guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, boehm-demers-weiser-gc, updated. relea


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, boehm-demers-weiser-gc, updated. release_1-9-2-149-gf86f3b5
Date: Tue, 25 Aug 2009 22:05:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=f86f3b5b113b4cb383c531150b13bef9b2789221

The branch, boehm-demers-weiser-gc has been updated
       via  f86f3b5b113b4cb383c531150b13bef9b2789221 (commit)
      from  78747ac6fbdcbca423ecaed65a5d6da9c3262b58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f86f3b5b113b4cb383c531150b13bef9b2789221
Author: Ludovic Courtès <address@hidden>
Date:   Tue Aug 25 23:57:49 2009 +0200

    Remove the `scm_tc_free_cell' SMOB type.
    
    * libguile/deprecated.h (SCM_FREEP, SCM_NFREEP): Changed to constants.
    
    * libguile/gc.c (scm_i_tag_name): Remove reference to
      `scm_tc_free_cell'.
    
    * libguile/gc.h (SCM_FREE_CELL_CDR, SCM_SET_FREE_CELL_CDR): Remove.
    
    * libguile/smob.c (free_print): Remove.
      (scm_smob_prehistory): Don't create the "free" SMOB type.
    
    * libguile/struct.c (struct_finalizer_trampoline): Use a bare
      `scm_tc3_struct' tag for finalized structs instead of
      `scm_tc_free_cell'.
    
    * libguile/tags.h (scm_tc_free_cell): Remove.

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

Summary of changes:
 libguile/deprecated.h |    6 +++---
 libguile/gc.c         |   11 +++--------
 libguile/gc.h         |    9 ---------
 libguile/smob.c       |   25 -------------------------
 libguile/struct.c     |    4 ++--
 libguile/tags.h       |   12 +-----------
 6 files changed, 9 insertions(+), 58 deletions(-)

diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 5b443c7..68eddb3 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -5,7 +5,7 @@
 #ifndef SCM_DEPRECATED_H
 #define SCM_DEPRECATED_H
 
-/* Copyright (C) 2003,2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003,2004, 2005, 2006, 2007, 2009 Free Software Foundation, 
Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -117,8 +117,8 @@ SCM_API SCM scm_unprotect_object (SCM obj);
   (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) & (y))))
 #define SCM_SETOR_CDR(x, y)\
   (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y))))
-#define SCM_FREEP(x) (SCM_FREE_CELL_P (x))
-#define SCM_NFREEP(x) (!SCM_FREE_CELL_P (x))
+#define SCM_FREEP(x) (0)
+#define SCM_NFREEP(x) (1)
 #define SCM_GC8MARKP(x) SCM_GC_MARK_P (x)
 #define SCM_SETGC8MARK(x) SCM_SET_GC_MARK (x)
 #define SCM_CLRGC8MARK(x) SCM_CLEAR_GC_MARK (x)
diff --git a/libguile/gc.c b/libguile/gc.c
index cef9b3f..84d5ba8 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -763,15 +763,10 @@ scm_i_tag_name (scm_t_bits tag)
 {
   if (tag >= 255)
     {
-      if (tag == scm_tc_free_cell)
-       return "free cell";
-
-      {
-       int k = 0xff & (tag >> 8);
-       return (scm_smobs[k].name);
-      }
+      int k = 0xff & (tag >> 8);
+      return (scm_smobs[k].name);
     }
-  
+
   switch (tag) /* 7 bits */
     {
     case scm_tcs_struct:
diff --git a/libguile/gc.h b/libguile/gc.h
index e886bec..63b7c4e 100644
--- a/libguile/gc.h
+++ b/libguile/gc.h
@@ -116,15 +116,6 @@ typedef struct scm_t_cell
 #define SCM_CELL_TYPE(x) SCM_CELL_WORD_0 (x)
 #define SCM_SET_CELL_TYPE(x, t) SCM_SET_CELL_WORD_0 ((x), (t))
 
-/* Freelists consist of linked cells where the type entry holds the value
- * scm_tc_free_cell and the second entry holds a pointer to the next cell of
- * the freelist.  Due to this structure, freelist cells are not cons cells
- * and thus may not be accessed using SCM_CAR and SCM_CDR.  */
-
-#define SCM_FREE_CELL_CDR(x) \
-  (SCM_GC_CELL_OBJECT ((x), 1))
-#define SCM_SET_FREE_CELL_CDR(x, v) \
-  (SCM_GC_SET_CELL_OBJECT ((x), 1, (v)))
 
 #if (SCM_DEBUG_CELL_ACCESSES == 1)
 /* Set this to != 0 if every cell that is accessed shall be checked:
diff --git a/libguile/smob.c b/libguile/smob.c
index b2c083c..86bb22f 100644
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -471,26 +471,6 @@ scm_make_smob (scm_t_bits tc)
   SCM_RETURN_NEWSMOB (tc, data);
 }
 
-
-/* {Initialization for the type of free cells}
- */
-
-static int
-free_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
-{
-  char buf[100];
-  sprintf (buf, "#<freed cell %p; GC missed a reference>",
-          (void *) SCM_UNPACK (exp));
-  scm_puts (buf, port);
-  
-#if (SCM_DEBUG_CELL_ACCESSES == 1)
-  if (scm_debug_cell_accesses_p)
-    abort();
-#endif
-  
-
-  return 1;
-}
 
 
 /* Marking SMOBs using user-supplied mark procedures.  */
@@ -632,7 +612,6 @@ void
 scm_smob_prehistory ()
 {
   long i;
-  scm_t_bits tc;
 
   smob_gc_kind = GC_new_kind (GC_new_free_list (),
                              GC_MAKE_PROC (GC_new_proc (smob_mark), 0),
@@ -657,10 +636,6 @@ scm_smob_prehistory ()
       scm_smobs[i].apply_3    = 0;
       scm_smobs[i].gsubr_type = 0;
     }
-
-  /* WARNING: This scm_make_smob_type call must be done first.  */
-  tc = scm_make_smob_type ("free", 0);
-  scm_set_smob_print (tc, free_print);
 }
 
 /*
diff --git a/libguile/struct.c b/libguile/struct.c
index 062b524..f701f8f 100644
--- a/libguile/struct.c
+++ b/libguile/struct.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008 
Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 
2009 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -338,7 +338,7 @@ struct_finalizer_trampoline (GC_PTR ptr, GC_PTR unused_data)
   scm_t_struct_free free_struct_data
     = ((scm_t_struct_free) vtable_data[scm_struct_i_free]);
 
-  SCM_SET_CELL_TYPE (obj, scm_tc_free_cell);
+  SCM_SET_CELL_TYPE (obj, scm_tc3_struct);
 
 #if 0
   /* A sanity check.  However, this check can fail if the free function
diff --git a/libguile/tags.h b/libguile/tags.h
index 3294533..43853dc 100644
--- a/libguile/tags.h
+++ b/libguile/tags.h
@@ -3,7 +3,7 @@
 #ifndef SCM_TAGS_H
 #define SCM_TAGS_H
 
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2008
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2008,2009
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -374,10 +374,6 @@ typedef unsigned long scm_t_bits;
  * tc16 (for tc7==scm_tc7_smob):
  *   The largest part of the space of smob types is not subdivided in a
  *   predefined way, since smobs can be added arbitrarily by user C code.
- *   However, while Guile also defines a number of smob types throughout,
- *   there is one smob type, namely scm_tc_free_cell, for which Guile assumes
- *   that it is declared first and thus gets a known-in-advance tc16-code.
- *   The reason of requiring a fixed tc16-code for this type is performance.
  */
 
 
@@ -484,12 +480,6 @@ typedef unsigned long scm_t_bits;
 #define SCM_TYP16_PREDICATE(tag, x) (!SCM_IMP (x) && SCM_TYP16 (x) == (tag))
 
 
-/* Here is the first smob subtype.  */
-
-/* scm_tc_free_cell is the 0th smob type.  We place this in free cells to tell
- * the conservative marker not to trace it.  */
-#define scm_tc_free_cell       (scm_tc7_smob + 0 * 256L)
-
 
 
 /* {Immediate Values}


hooks/post-receive
-- 
GNU Guile




reply via email to

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