guile-cvs
[Top][All Lists]
Advanced

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

guile/guile-core NEWS libguile/ChangeLog libgui...


From: Dirk Herrmann
Subject: guile/guile-core NEWS libguile/ChangeLog libgui...
Date: Wed, 13 Dec 2000 03:38:30 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Dirk Herrmann <address@hidden>  00/12/13 03:38:30

Modified files:
        guile-core     : NEWS 
        guile-core/libguile: ChangeLog gc.c init.c root.h symbols.c 

Log message:
        * Renamed scm_symbols to symbols and made it static in symbols.c.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/NEWS.diff?r1=1.228&r2=1.229
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ChangeLog.diff?r1=1.1206&r2=1.1207
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/gc.c.diff?r1=1.172&r2=1.173
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/init.c.diff?r1=1.107&r2=1.108
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/root.h.diff?r1=1.31&r2=1.32
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.c.diff?r1=1.73&r2=1.74

Patches:
Index: guile/guile-core/NEWS
diff -u guile/guile-core/NEWS:1.228 guile/guile-core/NEWS:1.229
--- guile/guile-core/NEWS:1.228 Tue Dec 12 10:36:35 2000
+++ guile/guile-core/NEWS       Wed Dec 13 03:38:29 2000
@@ -211,6 +211,8 @@
 
 There is no such concept as a weak binding any more.
 
+** Removed constants:  most-positive-fixnum, most-negative-fixnum, bignum-radix
+
 * Changes to the gh_ interface
 
 * Changes to the scm_ interface
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1206 
guile/guile-core/libguile/ChangeLog:1.1207
--- guile/guile-core/libguile/ChangeLog:1.1206  Tue Dec 12 10:36:35 2000
+++ guile/guile-core/libguile/ChangeLog Wed Dec 13 03:38:29 2000
@@ -1,5 +1,25 @@
 2000-12-12  Dirk Herrmann  <address@hidden>
 
+       The variable scm_symbols is made static within symbols.c and
+       renamed to symbols.  The initialization of the symbols hash table
+       is done in function scm_symbols_prehistory.
+
+       * gc.c (scm_init_storage):  Don't initialize scm_symbols.  Don't
+       define most-positive-fixnum, most-negative-fixnum and
+       bignum-radix.
+
+       * init.c (scm_init_guile_1):  Call scm_symbols_prehistory.
+
+       * root.h (scm_symbols):  Not in scm_sys_protects any more.
+
+       * symbols.c (symbols):  Renamed from scm_symbols and made static.
+
+       (scm_mem2symbol):  scm_symbols is renamed to symbols.
+
+       * symbols.[ch] (scm_symbols_prehistory):  Added.
+
+2000-12-12  Dirk Herrmann  <address@hidden>
+
        * gc.c (scm_init_storage), root.h (scm_weak_symhash, scm_symbols):
        Removed the former scm_weak_symhash hash table.  Added scm_symbols
        hash table.
Index: guile/guile-core/libguile/gc.c
diff -u guile/guile-core/libguile/gc.c:1.172 
guile/guile-core/libguile/gc.c:1.173
--- guile/guile-core/libguile/gc.c:1.172        Tue Dec 12 10:36:35 2000
+++ guile/guile-core/libguile/gc.c      Wed Dec 13 03:38:30 2000
@@ -2521,17 +2521,11 @@
 
 #define DEFAULT_SYMHASH_SIZE 277
   scm_symhash = scm_make_vector (SCM_MAKINUM (DEFAULT_SYMHASH_SIZE), SCM_EOL);
-  scm_symbols = scm_make_weak_key_hash_table (SCM_MAKINUM 
(DEFAULT_SYMHASH_SIZE));
   scm_symhash_vars = scm_make_vector (SCM_MAKINUM (DEFAULT_SYMHASH_SIZE), 
SCM_EOL);
 
   scm_stand_in_procs = SCM_EOL;
   scm_permobjs = SCM_EOL;
   scm_protects = scm_make_vector (SCM_MAKINUM (31), SCM_EOL);
-  scm_sysintern ("most-positive-fixnum", SCM_MAKINUM 
(SCM_MOST_POSITIVE_FIXNUM));
-  scm_sysintern ("most-negative-fixnum", SCM_MAKINUM 
(SCM_MOST_NEGATIVE_FIXNUM));
-#ifdef SCM_BIGDIG
-  scm_sysintern ("bignum-radix", SCM_MAKINUM (SCM_BIGRAD));
-#endif
 
   return 0;
 }
Index: guile/guile-core/libguile/init.c
diff -u guile/guile-core/libguile/init.c:1.107 
guile/guile-core/libguile/init.c:1.108
--- guile/guile-core/libguile/init.c:1.107      Mon Dec 11 06:48:23 2000
+++ guile/guile-core/libguile/init.c    Wed Dec 13 03:38:30 2000
@@ -469,8 +469,9 @@
   scm_debug_malloc_prehistory ();
 #endif
   scm_init_storage ();
-  scm_struct_prehistory ();    /* Must come after scm_init_storage */
-  scm_weaks_prehistory ();     /* Must come after scm_init_storage */
+  scm_struct_prehistory ();    /* requires storage */
+  scm_symbols_prehistory ();    /* requires storage */
+  scm_weaks_prehistory ();     /* requires storage */
   scm_init_subr_table ();
   scm_environments_prehistory (); /* create the root environment */
   scm_init_continuations ();
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[];
Index: guile/guile-core/libguile/symbols.c
diff -u guile/guile-core/libguile/symbols.c:1.73 
guile/guile-core/libguile/symbols.c:1.74
--- guile/guile-core/libguile/symbols.c:1.73    Tue Dec 12 10:36:35 2000
+++ guile/guile-core/libguile/symbols.c Wed Dec 13 03:38:30 2000
@@ -67,6 +67,10 @@
 
 
 
+static SCM symbols;
+
+
+
 static char *
 duplicate_string (const char * src, unsigned long length)
 {
@@ -86,14 +90,14 @@
 scm_mem2symbol (const char *name, scm_sizet len)
 {
   scm_sizet raw_hash = scm_string_hash ((const unsigned char *) name, len);
-  scm_sizet hash = raw_hash % SCM_VECTOR_LENGTH (scm_symbols);
+  scm_sizet hash = raw_hash % SCM_VECTOR_LENGTH (symbols);
 
   {
-    /* Try to find the symbol in the scm_symbols table */
+    /* Try to find the symbol in the symbols table */
 
     SCM l;
 
-    for (l = SCM_VELTS (scm_symbols) [hash]; !SCM_NULLP (l); l = SCM_CDR (l))
+    for (l = SCM_VELTS (symbols) [hash]; !SCM_NULLP (l); l = SCM_CDR (l))
       {
        SCM sym = SCM_CAAR (l);
        if (SCM_SYMBOL_HASH (sym) == raw_hash && SCM_SYMBOL_LENGTH (sym) == len)
@@ -128,8 +132,8 @@
     SCM_SET_SYMBOL_LENGTH (symbol, (long) len);
 
     cell = scm_cons (symbol, SCM_UNDEFINED);
-    slot = SCM_VELTS (scm_symbols) [hash];
-    SCM_VELTS (scm_symbols) [hash] = scm_cons (cell, slot);
+    slot = SCM_VELTS (symbols) [hash];
+    SCM_VELTS (symbols) [hash] = scm_cons (cell, slot);
 
     return symbol;
   }
@@ -393,6 +397,7 @@
   return SCM_CDR (vcell);
 }
 
+
 SCM_DEFINE (scm_symbol_p, "symbol?", 1, 0, 0, 
            (SCM obj),
            "Returns @t{#t} if @var{obj} is a symbol, otherwise returns @t{#f}. 
(r5rs)")
@@ -852,6 +857,15 @@
   }
 }
 #undef FUNC_NAME
+
+
+void
+scm_symbols_prehistory ()
+{
+  symbols = scm_make_weak_key_hash_table (SCM_MAKINUM (277));
+  scm_permanent_object (symbols);
+}
+
 
 void
 scm_init_symbols ()



reply via email to

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