1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 16:20:17 +02:00

remove a bunch of needless scm_permanent_object calls

* libguile/array-handle.c:
* libguile/bytevectors.c:
* libguile/deprecated.c:
* libguile/eval.c:
* libguile/feature.c:
* libguile/filesys.c:
* libguile/gc.c:
* libguile/gdbint.c:
* libguile/goops.c:
* libguile/instructions.c:
* libguile/load.c:
* libguile/modules.c:
* libguile/numbers.c:
* libguile/options.c:
* libguile/ports.c:
* libguile/scmsigs.c:
* libguile/srcprop.c:
* libguile/srfi-4.c:
* libguile/stacks.c:
* libguile/threads.c:
* libguile/vm.c: Remove calls to scm_permanent_object, as they are no
  longer needed with the BDW GC.
This commit is contained in:
Andy Wingo 2009-12-05 11:30:09 +01:00
parent 1be8532fdb
commit f39448c5a3
21 changed files with 68 additions and 123 deletions

View file

@ -132,8 +132,7 @@ void
scm_init_array_handle (void) scm_init_array_handle (void)
{ {
#define DEFINE_ARRAY_TYPE(tag, TAG) \ #define DEFINE_ARRAY_TYPE(tag, TAG) \
scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_##TAG] \ scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_##TAG] = scm_from_locale_symbol (#tag)
= (scm_permanent_object (scm_from_locale_symbol (#tag)))
scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_SCM] = SCM_BOOL_T; scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_SCM] = SCM_BOOL_T;
DEFINE_ARRAY_TYPE (a, CHAR); DEFINE_ARRAY_TYPE (a, CHAR);

View file

@ -2206,9 +2206,9 @@ scm_bootstrap_bytevectors (void)
scm_gc_protect_object (make_bytevector (0, SCM_ARRAY_ELEMENT_TYPE_VU8)); scm_gc_protect_object (make_bytevector (0, SCM_ARRAY_ELEMENT_TYPE_VU8));
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
scm_i_native_endianness = scm_permanent_object (scm_from_locale_symbol ("big")); scm_i_native_endianness = scm_from_locale_symbol ("big");
#else #else
scm_i_native_endianness = scm_permanent_object (scm_from_locale_symbol ("little")); scm_i_native_endianness = scm_from_locale_symbol ("little");
#endif #endif
scm_c_register_extension ("libguile", "scm_init_bytevectors", scm_c_register_extension ("libguile", "scm_init_bytevectors",

View file

@ -249,15 +249,13 @@ static SCM try_module_autoload_var;
static void static void
init_module_stuff () init_module_stuff ()
{ {
#define PERM(x) scm_permanent_object(x)
if (module_prefix == SCM_BOOL_F) if (module_prefix == SCM_BOOL_F)
{ {
module_prefix = PERM (scm_list_2 (scm_sym_app, scm_sym_modules)); module_prefix = scm_list_2 (scm_sym_app, scm_sym_modules);
make_modules_in_var = PERM (scm_c_lookup ("make-modules-in")); make_modules_in_var = scm_c_lookup ("make-modules-in");
beautify_user_module_x_var = beautify_user_module_x_var =
PERM (scm_c_lookup ("beautify-user-module!")); scm_c_lookup ("beautify-user-module!");
try_module_autoload_var = PERM (scm_c_lookup ("try-module-autoload")); try_module_autoload_var = scm_c_lookup ("try-module-autoload");
} }
} }

View file

@ -926,7 +926,6 @@ scm_init_eval ()
scm_listofnull = scm_list_1 (SCM_EOL); scm_listofnull = scm_list_1 (SCM_EOL);
f_apply = scm_c_define_gsubr ("apply", 2, 0, 1, scm_apply); f_apply = scm_c_define_gsubr ("apply", 2, 0, 1, scm_apply);
scm_permanent_object (f_apply);
scm_tc16_boot_closure = scm_make_smob_type ("boot-closure", 0); scm_tc16_boot_closure = scm_make_smob_type ("boot-closure", 0);
scm_set_smob_apply (scm_tc16_boot_closure, boot_closure_apply, 0, 0, 1); scm_set_smob_apply (scm_tc16_boot_closure, boot_closure_apply, 0, 0, 1);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -99,7 +99,7 @@ SCM_DEFINE (scm_set_program_arguments_scm, "set-program-arguments", 1, 0, 0,
void void
scm_init_feature() scm_init_feature()
{ {
progargs_fluid = scm_permanent_object (scm_make_fluid ()); progargs_fluid = scm_make_fluid ();
features_var = scm_c_define ("*features*", SCM_EOL); features_var = scm_c_define ("*features*", SCM_EOL);
#ifndef _Windows #ifndef _Windows

View file

@ -1712,7 +1712,7 @@ scm_init_filesys ()
scm_set_smob_free (scm_tc16_dir, scm_dir_free); scm_set_smob_free (scm_tc16_dir, scm_dir_free);
scm_set_smob_print (scm_tc16_dir, scm_dir_print); scm_set_smob_print (scm_tc16_dir, scm_dir_print);
scm_dot_string = scm_permanent_object (scm_from_locale_string (".")); scm_dot_string = scm_from_locale_string (".");
#ifdef O_RDONLY #ifdef O_RDONLY
scm_c_define ("O_RDONLY", scm_from_int (O_RDONLY)); scm_c_define ("O_RDONLY", scm_from_int (O_RDONLY));

View file

@ -817,7 +817,7 @@ scm_init_gc ()
{ {
/* `GC_INIT ()' was invoked in `scm_storage_prehistory ()'. */ /* `GC_INIT ()' was invoked in `scm_storage_prehistory ()'. */
scm_after_gc_hook = scm_permanent_object (scm_make_hook (SCM_INUM0)); scm_after_gc_hook = scm_make_hook (SCM_INUM0);
scm_c_define ("after-gc-hook", scm_after_gc_hook); scm_c_define ("after-gc-hook", scm_after_gc_hook);
gc_async = scm_c_make_gsubr ("%gc-thunk", 0, 0, 0, gc_async_thunk); gc_async = scm_c_make_gsubr ("%gc-thunk", 0, 0, 0, gc_async_thunk);

View file

@ -166,7 +166,7 @@ gdb_read (char *str)
} }
} }
gdb_result = ans; gdb_result = ans;
/* Protect answer from future GC */ /* Protect answer from future GC (FIXME: still needed with BDW-GC?) */
if (SCM_NIMP (ans)) if (SCM_NIMP (ans))
scm_permanent_object (ans); scm_permanent_object (ans);
exit: exit:

View file

@ -879,9 +879,7 @@ create_basic_classes (void)
/**** <class> ****/ /**** <class> ****/
SCM cs = scm_from_locale_string (SCM_CLASS_CLASS_LAYOUT); SCM cs = scm_from_locale_string (SCM_CLASS_CLASS_LAYOUT);
SCM name = scm_from_locale_symbol ("<class>"); SCM name = scm_from_locale_symbol ("<class>");
scm_class_class = scm_permanent_object (scm_make_vtable_vtable (cs, scm_class_class = scm_make_vtable_vtable (cs, SCM_INUM0, SCM_EOL);
SCM_INUM0,
SCM_EOL));
SCM_SET_CLASS_FLAGS (scm_class_class, (SCM_CLASSF_GOOPS_OR_VALID SCM_SET_CLASS_FLAGS (scm_class_class, (SCM_CLASSF_GOOPS_OR_VALID
| SCM_CLASSF_METACLASS)); | SCM_CLASSF_METACLASS));
@ -903,19 +901,15 @@ create_basic_classes (void)
/**** <top> ****/ /**** <top> ****/
name = scm_from_locale_symbol ("<top>"); name = scm_from_locale_symbol ("<top>");
scm_class_top = scm_permanent_object (scm_basic_make_class (scm_class_class, scm_class_top = scm_basic_make_class (scm_class_class, name,
name, SCM_EOL, SCM_EOL);
SCM_EOL,
SCM_EOL));
DEFVAR(name, scm_class_top); DEFVAR(name, scm_class_top);
/**** <object> ****/ /**** <object> ****/
name = scm_from_locale_symbol ("<object>"); name = scm_from_locale_symbol ("<object>");
scm_class_object = scm_permanent_object (scm_basic_make_class (scm_class_class, scm_class_object = scm_basic_make_class (scm_class_class, name,
name, scm_list_1 (scm_class_top), SCM_EOL);
scm_list_1 (scm_class_top),
SCM_EOL));
DEFVAR (name, scm_class_object); DEFVAR (name, scm_class_object);
@ -1630,10 +1624,6 @@ scm_change_object_class (SCM obj, SCM old_class SCM_UNUSED, SCM new_class)
SCM_KEYWORD (k_name, "name"); SCM_KEYWORD (k_name, "name");
SCM_SYMBOL (sym_no_method, "no-method");
static SCM list_of_no_method;
SCM_GLOBAL_SYMBOL (scm_sym_args, "args"); SCM_GLOBAL_SYMBOL (scm_sym_args, "args");
@ -2268,12 +2258,9 @@ make_stdcls (SCM *var, char *name, SCM meta, SCM super, SCM slots)
{ {
SCM tmp = scm_from_locale_symbol (name); SCM tmp = scm_from_locale_symbol (name);
*var = scm_permanent_object (scm_basic_make_class (meta, *var = scm_basic_make_class (meta, tmp,
tmp, scm_is_pair (super) ? super : scm_list_1 (super),
scm_is_pair (super) slots);
? super
: scm_list_1 (super),
slots));
DEFVAR(tmp, *var); DEFVAR(tmp, *var);
} }
@ -2467,12 +2454,8 @@ make_class_from_template (char const *template, char const *type_name, SCM super
else else
name = SCM_GOOPS_UNBOUND; name = SCM_GOOPS_UNBOUND;
class = scm_permanent_object (scm_basic_make_class (applicablep class = scm_basic_make_class (applicablep ? scm_class_procedure_class : scm_class_class,
? scm_class_procedure_class name, supers, SCM_EOL);
: scm_class_class,
name,
supers,
SCM_EOL));
/* Only define name if doesn't already exist. */ /* Only define name if doesn't already exist. */
if (!SCM_GOOPS_UNBOUNDP (name) if (!SCM_GOOPS_UNBOUNDP (name)
@ -2495,12 +2478,8 @@ make_class_from_symbol (SCM type_name_sym, SCM supers, int applicablep)
else else
name = SCM_GOOPS_UNBOUND; name = SCM_GOOPS_UNBOUND;
class = scm_permanent_object (scm_basic_make_class (applicablep class = scm_basic_make_class (applicablep ? scm_class_procedure_class : scm_class_class,
? scm_class_procedure_class name, supers, SCM_EOL);
: scm_class_class,
name,
supers,
SCM_EOL));
/* Only define name if doesn't already exist. */ /* Only define name if doesn't already exist. */
if (!SCM_GOOPS_UNBOUNDP (name) if (!SCM_GOOPS_UNBOUNDP (name)
@ -2710,23 +2689,17 @@ SCM_DEFINE (scm_sys_goops_loaded, "%goops-loaded", 0, 0, 0,
{ {
goops_loaded_p = 1; goops_loaded_p = 1;
var_compute_applicable_methods = var_compute_applicable_methods =
scm_permanent_object scm_module_variable (scm_module_goops, sym_compute_applicable_methods);
(scm_module_variable (scm_module_goops, sym_compute_applicable_methods));
var_slot_unbound = var_slot_unbound =
scm_permanent_object scm_module_variable (scm_module_goops, sym_slot_unbound);
(scm_module_variable (scm_module_goops, sym_slot_unbound));
var_slot_missing = var_slot_missing =
scm_permanent_object scm_module_variable (scm_module_goops, sym_slot_missing);
(scm_module_variable (scm_module_goops, sym_slot_missing));
var_compute_cpl = var_compute_cpl =
scm_permanent_object scm_module_variable (scm_module_goops, sym_compute_cpl);
(scm_module_variable (scm_module_goops, sym_compute_cpl));
var_no_applicable_method = var_no_applicable_method =
scm_permanent_object scm_module_variable (scm_module_goops, sym_no_applicable_method);
(scm_module_variable (scm_module_goops, sym_no_applicable_method));
var_change_class = var_change_class =
scm_permanent_object scm_module_variable (scm_module_goops, sym_change_class);
(scm_module_variable (scm_module_goops, sym_change_class));
setup_extended_primitive_generics (); setup_extended_primitive_generics ();
return SCM_UNSPECIFIED; return SCM_UNSPECIFIED;
} }
@ -2739,18 +2712,12 @@ scm_init_goops_builtins (void)
{ {
scm_module_goops = scm_current_module (); scm_module_goops = scm_current_module ();
/* Not really necessary right now, but who knows...
*/
scm_permanent_object (scm_module_goops);
goops_rstate = scm_c_make_rstate ("GOOPS", 5); goops_rstate = scm_c_make_rstate ("GOOPS", 5);
#include "libguile/goops.x" #include "libguile/goops.x"
list_of_no_method = scm_permanent_object (scm_list_1 (sym_no_method));
hell = scm_calloc (hell_size * sizeof (*hell)); hell = scm_calloc (hell_size * sizeof (*hell));
hell_mutex = scm_permanent_object (scm_make_mutex ()); hell_mutex = scm_make_mutex ();
create_basic_classes (); create_basic_classes ();
create_standard_classes (); create_standard_classes ();
@ -2760,10 +2727,8 @@ scm_init_goops_builtins (void)
{ {
SCM name = scm_from_locale_symbol ("no-applicable-method"); SCM name = scm_from_locale_symbol ("no-applicable-method");
scm_no_applicable_method scm_no_applicable_method =
= scm_permanent_object (scm_make (scm_list_3 (scm_class_generic, scm_make (scm_list_3 (scm_class_generic, k_name, name));
k_name,
name)));
DEFVAR (name, scm_no_applicable_method); DEFVAR (name, scm_no_applicable_method);
} }

View file

@ -67,8 +67,7 @@ fetch_instruction_table ()
{ {
table[i].opcode = i; table[i].opcode = i;
if (table[i].name) if (table[i].name)
table[i].symname = table[i].symname = scm_from_locale_symbol (table[i].name);
scm_permanent_object (scm_from_locale_symbol (table[i].name));
else else
table[i].symname = SCM_BOOL_F; table[i].symname = SCM_BOOL_F;
} }

View file

@ -881,7 +881,7 @@ init_build_info ()
void void
scm_init_load () scm_init_load ()
{ {
scm_listofnullstr = scm_permanent_object (scm_list_1 (scm_nullstr)); scm_listofnullstr = scm_list_1 (scm_nullstr);
scm_loc_load_path = SCM_VARIABLE_LOC (scm_c_define ("%load-path", SCM_EOL)); scm_loc_load_path = SCM_VARIABLE_LOC (scm_c_define ("%load-path", SCM_EOL));
scm_loc_load_extensions scm_loc_load_extensions
= SCM_VARIABLE_LOC (scm_c_define ("%load-extensions", = SCM_VARIABLE_LOC (scm_c_define ("%load-extensions",

View file

@ -862,8 +862,7 @@ SCM_SYMBOL (scm_sym_system_module, "system-module");
void void
scm_modules_prehistory () scm_modules_prehistory ()
{ {
scm_pre_modules_obarray scm_pre_modules_obarray = scm_c_make_hash_table (1533);
= scm_permanent_object (scm_c_make_hash_table (1533));
} }
void void
@ -875,24 +874,22 @@ scm_init_modules ()
scm_tc16_eval_closure = scm_make_smob_type ("eval-closure", 0); scm_tc16_eval_closure = scm_make_smob_type ("eval-closure", 0);
scm_set_smob_apply (scm_tc16_eval_closure, scm_eval_closure_lookup, 2, 0, 0); scm_set_smob_apply (scm_tc16_eval_closure, scm_eval_closure_lookup, 2, 0, 0);
the_module = scm_permanent_object (scm_make_fluid ()); the_module = scm_make_fluid ();
} }
static void static void
scm_post_boot_init_modules () scm_post_boot_init_modules ()
{ {
#define PERM(x) scm_permanent_object(x)
SCM module_type = SCM_VARIABLE_REF (scm_c_lookup ("module-type")); SCM module_type = SCM_VARIABLE_REF (scm_c_lookup ("module-type"));
scm_module_tag = (SCM_CELL_WORD_1 (module_type) + scm_tc3_struct); scm_module_tag = (SCM_CELL_WORD_1 (module_type) + scm_tc3_struct);
resolve_module_var = PERM (scm_c_lookup ("resolve-module")); resolve_module_var = scm_c_lookup ("resolve-module");
process_define_module_var = PERM (scm_c_lookup ("process-define-module")); process_define_module_var = scm_c_lookup ("process-define-module");
process_use_modules_var = PERM (scm_c_lookup ("process-use-modules")); process_use_modules_var = scm_c_lookup ("process-use-modules");
module_export_x_var = PERM (scm_c_lookup ("module-export!")); module_export_x_var = scm_c_lookup ("module-export!");
the_root_module_var = PERM (scm_c_lookup ("the-root-module")); the_root_module_var = scm_c_lookup ("the-root-module");
default_duplicate_binding_procedures_var = default_duplicate_binding_procedures_var =
PERM (scm_c_lookup ("default-duplicate-binding-procedures")); scm_c_lookup ("default-duplicate-binding-procedures");
scm_module_system_booted_p = 1; scm_module_system_booted_p = 1;
} }

View file

@ -6604,11 +6604,10 @@ scm_init_numbers ()
} }
#ifdef DBL_DIG #ifdef DBL_DIG
/* hard code precision for base 10 if the preprocessor tells us to... */ /* hard code precision for base 10 if the preprocessor tells us to... */
scm_dblprec[10-2] = (DBL_DIG > 20) ? 20 : DBL_DIG; scm_dblprec[10-2] = (DBL_DIG > 20) ? 20 : DBL_DIG;
#endif #endif
exactly_one_half = scm_permanent_object (scm_divide (SCM_I_MAKINUM (1), exactly_one_half = scm_divide (SCM_I_MAKINUM (1), SCM_I_MAKINUM (2));
SCM_I_MAKINUM (2)));
#include "libguile/numbers.x" #include "libguile/numbers.x"
} }

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008 Free Software Foundation /* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009 Free Software Foundation
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -281,7 +281,6 @@ scm_init_opts (SCM (*func) (SCM), scm_t_option options[])
{ {
SCM name = scm_from_locale_symbol (options[i].name); SCM name = scm_from_locale_symbol (options[i].name);
options[i].name = (char *) SCM_UNPACK (name); options[i].name = (char *) SCM_UNPACK (name);
scm_permanent_object (name);
} }
func (SCM_UNDEFINED); func (SCM_UNDEFINED);
} }

View file

@ -2333,12 +2333,12 @@ scm_init_ports ()
scm_tc16_void_port = scm_make_port_type ("void", fill_input_void_port, scm_tc16_void_port = scm_make_port_type ("void", fill_input_void_port,
write_void_port); write_void_port);
cur_inport_fluid = scm_permanent_object (scm_make_fluid ()); cur_inport_fluid = scm_make_fluid ();
cur_outport_fluid = scm_permanent_object (scm_make_fluid ()); cur_outport_fluid = scm_make_fluid ();
cur_errport_fluid = scm_permanent_object (scm_make_fluid ()); cur_errport_fluid = scm_make_fluid ();
cur_loadport_fluid = scm_permanent_object (scm_make_fluid ()); cur_loadport_fluid = scm_make_fluid ();
scm_i_port_weak_hash = scm_permanent_object (scm_make_weak_key_hash_table (SCM_I_MAKINUM(31))); scm_i_port_weak_hash = scm_make_weak_key_hash_table (SCM_I_MAKINUM(31));
#include "libguile/ports.x" #include "libguile/ports.x"

View file

@ -668,10 +668,8 @@ scm_init_scmsigs ()
signal_handlers = signal_handlers =
SCM_VARIABLE_LOC (scm_c_define ("signal-handlers", SCM_VARIABLE_LOC (scm_c_define ("signal-handlers",
scm_c_make_vector (NSIG, SCM_BOOL_F))); scm_c_make_vector (NSIG, SCM_BOOL_F)));
signal_handler_asyncs = signal_handler_asyncs = scm_c_make_vector (NSIG, SCM_BOOL_F);
scm_permanent_object (scm_c_make_vector (NSIG, SCM_BOOL_F)); signal_handler_threads = scm_c_make_vector (NSIG, SCM_BOOL_F);
signal_handler_threads =
scm_permanent_object (scm_c_make_vector (NSIG, SCM_BOOL_F));
for (i = 0; i < NSIG; i++) for (i = 0; i < NSIG; i++)
{ {

View file

@ -331,9 +331,8 @@ scm_init_srcprop ()
scm_source_whash = scm_make_weak_key_hash_table (scm_from_int (2047)); scm_source_whash = scm_make_weak_key_hash_table (scm_from_int (2047));
scm_c_define ("source-whash", scm_source_whash); scm_c_define ("source-whash", scm_source_whash);
scm_last_alist_filename scm_last_alist_filename = scm_cons (SCM_EOL,
= scm_permanent_object (scm_cons (SCM_EOL, scm_acons (SCM_EOL, SCM_EOL, SCM_EOL));
scm_acons (SCM_EOL, SCM_EOL, SCM_EOL)));
#include "libguile/srcprop.x" #include "libguile/srcprop.x"
} }

View file

@ -895,14 +895,10 @@ scm_init_srfi_4 (void)
scm_set_smob_print (scm_tc16_uvec, uvec_print); scm_set_smob_print (scm_tc16_uvec, uvec_print);
#if SCM_HAVE_T_INT64 == 0 #if SCM_HAVE_T_INT64 == 0
scm_uint64_min = scm_uint64_min = scm_from_int (0);
scm_permanent_object (scm_from_int (0)); scm_uint64_max = scm_c_read_string ("18446744073709551615");
scm_uint64_max = scm_int64_min = scm_c_read_string ("-9223372036854775808");
scm_permanent_object (scm_c_read_string ("18446744073709551615")); scm_int64_max = scm_c_read_string ("9223372036854775807");
scm_int64_min =
scm_permanent_object (scm_c_read_string ("-9223372036854775808"));
scm_int64_max =
scm_permanent_object (scm_c_read_string ("9223372036854775807"));
#endif #endif
#define REGISTER(tag, TAG) \ #define REGISTER(tag, TAG) \

View file

@ -375,10 +375,8 @@ SCM_DEFINE (scm_stack_length, "stack-length", 1, 0, 0,
void void
scm_init_stacks () scm_init_stacks ()
{ {
scm_stack_type = scm_stack_type = scm_make_vtable (scm_from_locale_string (SCM_STACK_LAYOUT),
scm_permanent_object SCM_UNDEFINED);
(scm_make_vtable (scm_from_locale_string (SCM_STACK_LAYOUT),
SCM_UNDEFINED));
scm_set_struct_vtable_name_x (scm_stack_type, scm_set_struct_vtable_name_x (scm_stack_type,
scm_from_locale_symbol ("stack")); scm_from_locale_symbol ("stack"));
#include "libguile/stacks.x" #include "libguile/stacks.x"

View file

@ -1947,15 +1947,14 @@ scm_init_threads ()
guilify_self_2 (SCM_BOOL_F); guilify_self_2 (SCM_BOOL_F);
threads_initialized_p = 1; threads_initialized_p = 1;
dynwind_critical_section_mutex = dynwind_critical_section_mutex = scm_make_recursive_mutex ();
scm_permanent_object (scm_make_recursive_mutex ());
} }
void void
scm_init_threads_default_dynamic_state () scm_init_threads_default_dynamic_state ()
{ {
SCM state = scm_make_dynamic_state (scm_current_dynamic_state ()); SCM state = scm_make_dynamic_state (scm_current_dynamic_state ());
scm_i_default_dynamic_state = scm_permanent_object (state); scm_i_default_dynamic_state = state;
} }
void void

View file

@ -212,7 +212,7 @@ vm_make_boot_program (long nargs)
{ {
int i; int i;
for (i = 0; i < NUM_BOOT_PROGS; i++) for (i = 0; i < NUM_BOOT_PROGS; i++)
programs[i] = scm_permanent_object (really_make_boot_program (i)); programs[i] = really_make_boot_program (i);
} }
if (SCM_LIKELY (nargs < NUM_BOOT_PROGS)) if (SCM_LIKELY (nargs < NUM_BOOT_PROGS))
@ -685,9 +685,9 @@ scm_bootstrap_vm (void)
scm_c_make_gsubr ("load-compiled/vm", 1, 0, 0, scm_c_make_gsubr ("load-compiled/vm", 1, 0, 0,
scm_load_compiled_with_vm)); scm_load_compiled_with_vm));
sym_vm_run = scm_permanent_object (scm_from_locale_symbol ("vm-run")); sym_vm_run = scm_from_locale_symbol ("vm-run");
sym_vm_error = scm_permanent_object (scm_from_locale_symbol ("vm-error")); sym_vm_error = scm_from_locale_symbol ("vm-error");
sym_debug = scm_permanent_object (scm_from_locale_symbol ("debug")); sym_debug = scm_from_locale_symbol ("debug");
scm_c_register_extension ("libguile", "scm_init_vm", scm_c_register_extension ("libguile", "scm_init_vm",
(scm_t_extension_init_func)scm_init_vm, NULL); (scm_t_extension_init_func)scm_init_vm, NULL);