mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
* New environment variable scm_system_environment to replace scm_symhash.
This commit is contained in:
parent
9e07b6667f
commit
de42a0ee0f
4 changed files with 24 additions and 5 deletions
|
@ -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>
|
2000-12-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* eval.c (change_environment, inner_eval, restore_environment):
|
* eval.c (change_environment, inner_eval, restore_environment):
|
||||||
|
|
|
@ -60,6 +60,8 @@ scm_bits_t scm_tc16_environment;
|
||||||
scm_bits_t scm_tc16_observer;
|
scm_bits_t scm_tc16_observer;
|
||||||
#define DEFAULT_OBARRAY_SIZE 137
|
#define DEFAULT_OBARRAY_SIZE 137
|
||||||
|
|
||||||
|
SCM scm_system_environment;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* error conditions */
|
/* error conditions */
|
||||||
|
@ -2304,6 +2306,10 @@ scm_environments_prehistory ()
|
||||||
scm_tc16_observer = scm_make_smob_type ("observer", 0);
|
scm_tc16_observer = scm_make_smob_type ("observer", 0);
|
||||||
scm_set_smob_mark (scm_tc16_observer, observer_mark);
|
scm_set_smob_mark (scm_tc16_observer, observer_mark);
|
||||||
scm_set_smob_print (scm_tc16_observer, observer_print);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,8 @@ extern scm_bits_t scm_tc16_observer;
|
||||||
#define SCM_OBSERVER_PROC(x) \
|
#define SCM_OBSERVER_PROC(x) \
|
||||||
((scm_environment_observer) SCM_CELL_WORD_3 (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_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_binding (const char *, SCM, SCM) SCM_NORETURN;
|
||||||
extern void scm_error_environment_immutable_location (const char *, SCM, SCM) SCM_NORETURN;
|
extern void scm_error_environment_immutable_location (const char *, SCM, SCM) SCM_NORETURN;
|
||||||
|
|
|
@ -473,7 +473,7 @@ scm_init_guile_1 (SCM_STACKITEM *base)
|
||||||
scm_symbols_prehistory (); /* requires storage */
|
scm_symbols_prehistory (); /* requires storage */
|
||||||
scm_weaks_prehistory (); /* requires storage */
|
scm_weaks_prehistory (); /* requires storage */
|
||||||
scm_init_subr_table ();
|
scm_init_subr_table ();
|
||||||
scm_environments_prehistory (); /* create the root environment */
|
scm_environments_prehistory (); /* requires storage */
|
||||||
scm_init_continuations ();
|
scm_init_continuations ();
|
||||||
scm_init_root (); /* requires continuations */
|
scm_init_root (); /* requires continuations */
|
||||||
#ifdef USE_THREADS
|
#ifdef USE_THREADS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue