init global tables symbols and modpaths in master GC
svn: r12808
This commit is contained in:
parent
d29a6b4cec
commit
17547b977f
|
@ -325,6 +325,11 @@ Scheme_Env *scheme_engine_instance_init() {
|
|||
scheme_init_ephemerons();
|
||||
#endif
|
||||
|
||||
/* These calls must be made here so that they allocate out of the master GC */
|
||||
scheme_init_symbol_table();
|
||||
scheme_init_module_path_table();
|
||||
|
||||
|
||||
#if defined(MZ_PRECISE_GC) && defined(MZ_USE_PLACES)
|
||||
GC_switch_out_master_gc();
|
||||
spawn_master_scheme_place();
|
||||
|
@ -459,7 +464,6 @@ static void make_kernel_env(void)
|
|||
|
||||
/* The ordering of the first few init calls is important, so add to
|
||||
the end of the list, not the beginning. */
|
||||
MZTIMEIT(symbol-table, scheme_init_symbol_table());
|
||||
MZTIMEIT(type, scheme_init_type(env));
|
||||
MZTIMEIT(symbol-type, scheme_init_symbol_type(env));
|
||||
MZTIMEIT(fun, scheme_init_fun(env));
|
||||
|
|
|
@ -2716,6 +2716,12 @@ static Scheme_Object *module_path_index_join(int argc, Scheme_Object *argv[])
|
|||
return scheme_make_modidx(argv[0], argv[1], scheme_false);
|
||||
}
|
||||
|
||||
void scheme_init_module_path_table()
|
||||
{
|
||||
REGISTER_SO(modpath_table);
|
||||
modpath_table = scheme_make_weak_equal_table();
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_intern_resolved_module_path_worker(Scheme_Object *o)
|
||||
{
|
||||
Scheme_Object *rmp;
|
||||
|
@ -2724,11 +2730,6 @@ Scheme_Object *scheme_intern_resolved_module_path_worker(Scheme_Object *o)
|
|||
|
||||
mzrt_mutex_lock(modpath_table_mutex);
|
||||
|
||||
if (!modpath_table) {
|
||||
REGISTER_SO(modpath_table);
|
||||
modpath_table = scheme_make_weak_equal_table();
|
||||
}
|
||||
|
||||
rmp = scheme_alloc_small_object();
|
||||
rmp->type = scheme_resolved_module_path_type;
|
||||
SCHEME_PTR_VAL(rmp) = o;
|
||||
|
|
|
@ -166,6 +166,7 @@ void scheme_init_type(Scheme_Env *env);
|
|||
void scheme_init_list(Scheme_Env *env);
|
||||
void scheme_init_stx(Scheme_Env *env);
|
||||
void scheme_init_module(Scheme_Env *env);
|
||||
void scheme_init_module_path_table(void);
|
||||
void scheme_init_port(Scheme_Env *env);
|
||||
void scheme_init_port_fun(Scheme_Env *env);
|
||||
void scheme_init_network(Scheme_Env *env);
|
||||
|
|
Loading…
Reference in New Issue
Block a user