1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

* New environment variable scm_system_environment to replace scm_symhash.

This commit is contained in:
Dirk Herrmann 2000-12-15 23:21:06 +00:00
parent 9e07b6667f
commit de42a0ee0f
4 changed files with 24 additions and 5 deletions

View file

@ -1,3 +1,14 @@
2000-12-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
* environments.[ch] (scm_system_environment): New variable, will
replace scm_symhash soon. We may decide for a better name and
also to split this up into a set of environments later.
(scm_environments_prehistory): Initialize scm_system_environment.
* init.c (scm_init_guile_1): scm_environments_prehistory requires
storage to be initialized.
2000-12-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (change_environment, inner_eval, restore_environment):

View file

@ -60,6 +60,8 @@ scm_bits_t scm_tc16_environment;
scm_bits_t scm_tc16_observer;
#define DEFAULT_OBARRAY_SIZE 137
SCM scm_system_environment;
/* error conditions */
@ -2304,6 +2306,10 @@ scm_environments_prehistory ()
scm_tc16_observer = scm_make_smob_type ("observer", 0);
scm_set_smob_mark (scm_tc16_observer, observer_mark);
scm_set_smob_print (scm_tc16_observer, observer_print);
/* create system environment */
scm_system_environment = scm_make_leaf_environment ();
scm_permanent_object (scm_system_environment);
}

View file

@ -121,6 +121,8 @@ extern scm_bits_t scm_tc16_observer;
#define SCM_OBSERVER_PROC(x) \
((scm_environment_observer) SCM_CELL_WORD_3 (x))
extern SCM scm_system_environment;
extern void scm_error_environment_unbound (const char *, SCM, SCM) SCM_NORETURN;
extern void scm_error_environment_immutable_binding (const char *, SCM, SCM) SCM_NORETURN;
extern void scm_error_environment_immutable_location (const char *, SCM, SCM) SCM_NORETURN;

View file

@ -469,13 +469,13 @@ scm_init_guile_1 (SCM_STACKITEM *base)
scm_debug_malloc_prehistory ();
#endif
scm_init_storage ();
scm_struct_prehistory (); /* requires storage */
scm_symbols_prehistory (); /* requires storage */
scm_weaks_prehistory (); /* requires 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_environments_prehistory (); /* requires storage */
scm_init_continuations ();
scm_init_root (); /* requires continuations */
scm_init_root (); /* requires continuations */
#ifdef USE_THREADS
scm_init_threads (base);
#endif