guile-cvs
[Top][All Lists]
Advanced

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

guile/guile-core/libguile root.h gc.c


From: Marius Vollmer
Subject: guile/guile-core/libguile root.h gc.c
Date: Tue, 15 May 2001 07:12:21 -0700

CVSROOT:        /cvs
Module name:    guile
Branch:         mvo-vcell-cleanup-1-branch
Changes by:     Marius Vollmer <address@hidden> 01/05/15 07:12:21

Modified files:
        guile-core/libguile: root.h gc.c 

Log message:
        * root.h (scm_symhash, scm_symhash_vars): Removed.
        * gc.c (scm_init_storage): Do not initialize them.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/root.h.diff?cvsroot=OldCVS&only_with_tag=mvo-vcell-cleanup-1-branch&tr1=1.32&tr2=1.32.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/gc.c.diff?cvsroot=OldCVS&only_with_tag=mvo-vcell-cleanup-1-branch&tr1=1.195.2.1&tr2=1.195.2.2&r1=text&r2=text

Patches:
Index: guile/guile-core/libguile/gc.c
diff -u guile/guile-core/libguile/gc.c:1.195 
guile/guile-core/libguile/gc.c:1.196
--- guile/guile-core/libguile/gc.c:1.195        Tue May  8 03:23:17 2001
+++ guile/guile-core/libguile/gc.c      Tue May 15 02:45:10 2001
@@ -672,11 +672,15 @@
   /* The rest of this is supposed to be identical to the SCM_NEWCELL
      macro.  */
   if (SCM_NULLP (scm_freelist))
-    new = scm_gc_for_newcell (&scm_master_freelist, &scm_freelist);
+    {
+      new = scm_gc_for_newcell (&scm_master_freelist, &scm_freelist);
+      SCM_GC_SET_ALLOCATED (new);
+    }
   else
     {
       new = scm_freelist;
       scm_freelist = SCM_FREE_CELL_CDR (scm_freelist);
+      SCM_GC_SET_ALLOCATED (new);
     }
 
   return new;
@@ -697,11 +701,15 @@
   /* The rest of this is supposed to be identical to the SCM_NEWCELL
      macro.  */
   if (SCM_NULLP (scm_freelist2))
-    new = scm_gc_for_newcell (&scm_master_freelist2, &scm_freelist2);
+    {
+      new = scm_gc_for_newcell (&scm_master_freelist2, &scm_freelist2);
+      SCM_GC_SET_ALLOCATED (new);
+    }
   else
     {
       new = scm_freelist2;
       scm_freelist2 = SCM_FREE_CELL_CDR (scm_freelist2);
+      SCM_GC_SET_ALLOCATED (new);
     }
 
   return new;
@@ -2589,6 +2597,10 @@
   scm_sizet init_heap_size_2;
   scm_sizet j;
 
+#if (SCM_DEBUG_CELL_ACCESSES == 1)
+  scm_tc16_allocated = scm_make_smob_type ("allocated cell", 0);
+#endif  /* SCM_DEBUG_CELL_ACCESSES == 1 */
+
   j = SCM_NUM_PROTECTS;
   while (j)
     scm_sys_protects[--j] = SCM_BOOL_F;
@@ -2641,13 +2653,6 @@
 #endif
 #endif
 
-  scm_undefineds = scm_cons (SCM_UNDEFINED, SCM_EOL);
-  SCM_SETCDR (scm_undefineds, scm_undefineds);
-
-  scm_listofnull = scm_cons (SCM_EOL, SCM_EOL);
-  scm_nullstr = scm_allocate_string (0);
-  scm_nullvect = scm_c_make_vector (0, SCM_UNDEFINED);
-
 #define DEFAULT_SYMHASH_SIZE 277
   scm_symhash = scm_c_make_hash_table (DEFAULT_SYMHASH_SIZE);
   scm_symhash_vars = scm_c_make_hash_table (DEFAULT_SYMHASH_SIZE);
@@ -2694,10 +2699,6 @@
 scm_init_gc ()
 {
   SCM after_gc_thunk;
-
-#if (SCM_DEBUG_CELL_ACCESSES == 1)
-  scm_tc16_allocated = scm_make_smob_type ("allocated cell", 0);
-#endif  /* SCM_DEBUG_CELL_ACCESSES == 1 */
 
   /* Dirk:FIXME:: scm_create_hook is strange. */
   scm_after_gc_hook = scm_create_hook ("after-gc-hook", 0);
Index: guile/guile-core/libguile/root.h
diff -u guile/guile-core/libguile/root.h:1.31 
guile/guile-core/libguile/root.h:1.32
--- guile/guile-core/libguile/root.h:1.31       Tue Dec 12 10:36:35 2000
+++ guile/guile-core/libguile/root.h    Wed Dec 13 03:38:30 2000
@@ -61,21 +61,20 @@
 #define scm_undefineds scm_sys_protects[2]
 #define scm_nullvect scm_sys_protects[3]
 #define scm_nullstr scm_sys_protects[4]
-#define scm_symbols scm_sys_protects[5]
-#define scm_symhash scm_sys_protects[6]
-#define scm_symhash_vars scm_sys_protects[7]
-#define scm_keyword_obarray scm_sys_protects[8]
-#define scm_stand_in_procs scm_sys_protects[9]
-#define scm_object_whash scm_sys_protects[10]
-#define scm_permobjs scm_sys_protects[11]
-#define scm_asyncs scm_sys_protects[12]
-#define scm_protects scm_sys_protects[13]
-#define scm_properties_whash scm_sys_protects[14]
+#define scm_symhash scm_sys_protects[5]
+#define scm_symhash_vars scm_sys_protects[6]
+#define scm_keyword_obarray scm_sys_protects[7]
+#define scm_stand_in_procs scm_sys_protects[8]
+#define scm_object_whash scm_sys_protects[9]
+#define scm_permobjs scm_sys_protects[10]
+#define scm_asyncs scm_sys_protects[11]
+#define scm_protects scm_sys_protects[12]
+#define scm_properties_whash scm_sys_protects[13]
 #ifdef DEBUG_EXTENSIONS
-#define scm_source_whash scm_sys_protects[15]
-#define SCM_NUM_PROTECTS 16
-#else
+#define scm_source_whash scm_sys_protects[14]
 #define SCM_NUM_PROTECTS 15
+#else
+#define SCM_NUM_PROTECTS 14
 #endif
 
 extern SCM scm_sys_protects[];



reply via email to

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