-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "libguile/hash.h"
#include "libguile/hashtab.h"
#include "libguile/hooks.h"
-#ifdef GUILE_ISELECT
#include "libguile/iselect.h"
-#endif
#include "libguile/ioext.h"
#include "libguile/keywords.h"
#include "libguile/lang.h"
SCM_DFRAME (scm_rootcont) = scm_last_debug_frame = 0;
#endif
SCM_BASE (scm_rootcont) = base;
- scm_continuation_stack_ptr = SCM_MAKINUM (0);
}
static void
/* Create an object to hold the root continuation.
*/
{
- scm_t_contregs *contregs = scm_must_malloc (sizeof (scm_t_contregs),
+ scm_t_contregs *contregs = scm_gc_malloc (sizeof (scm_t_contregs),
"continuation");
contregs->num_stack_items = 0;
contregs->seq = 0;
SCM_NEWSMOB (scm_rootcont, scm_tc16_continuation, contregs);
}
- /* The root continuation is further initialized by restart_stack. */
-
- /* Create the look-aside stack for variables that are shared between
- * captured continuations.
- */
- scm_continuation_stack = scm_c_make_vector (512, SCM_UNDEFINED);
- /* The continuation stack is further initialized by restart_stack. */
/* The remainder of stack initialization is factored out to another
* function so that if this stack is ever exitted, it can be
static void
-fixconfig (char *s1,char *s2,int s)
+fixconfig (char *s1, char *s2, int s)
{
fputs (s1, stderr);
fputs (s2, stderr);
buffered input on stdin can reset \ex{(current-input-port)} to
block buffering for higher performance. */
- scm_def_inp
+ scm_cur_inp
= scm_standard_stream_to_port (0,
isatty (0) ? "r0" : "r",
"standard input");
- scm_def_outp = scm_standard_stream_to_port (1,
+ scm_cur_outp = scm_standard_stream_to_port (1,
isatty (1) ? "w0" : "w",
"standard output");
- scm_def_errp = scm_standard_stream_to_port (2,
+ scm_cur_errp = scm_standard_stream_to_port (2,
isatty (2) ? "w0" : "w",
"standard error");
- scm_cur_inp = scm_def_inp;
- scm_cur_outp = scm_def_outp;
- scm_cur_errp = scm_def_errp;
scm_cur_loadp = SCM_BOOL_F;
}
scm_ints_disabled = 1;
scm_block_gc = 1;
-
+
+ scm_threads_prehistory ();
scm_ports_prehistory ();
scm_smob_prehistory ();
scm_tables_prehistory ();
#ifdef GUILE_DEBUG_MALLOC
scm_debug_malloc_prehistory ();
#endif
- scm_init_storage (); /* requires smob_prehistory */
+ if (scm_init_storage ()) /* requires threads and smob_prehistory */
+ abort ();
+
scm_struct_prehistory (); /* requires storage */
scm_symbols_prehistory (); /* requires storage */
scm_weaks_prehistory (); /* requires storage */
scm_init_variable (); /* all bindings need variables */
scm_init_continuations ();
scm_init_root (); /* requires continuations */
-#ifdef USE_THREADS
scm_init_threads (base);
-#endif
start_stack (base);
scm_init_gsubr ();
+ scm_init_thread_procs (); /* requires gsubrs */
scm_init_procprop ();
scm_init_environments ();
scm_init_feature ();
scm_init_properties ();
scm_init_hooks (); /* Requires smob_prehistory */
scm_init_gc (); /* Requires hooks, async */
-#ifdef GUILE_ISELECT
- scm_init_iselect ();
-#endif
scm_init_ioext ();
scm_init_keywords ();
scm_init_list ();
scm_init_simpos ();
scm_init_load_path ();
scm_init_standard_ports (); /* Requires fports */
+#ifdef DYNAMIC_LINKING
scm_init_dynamic_linking ();
+#endif
+#ifdef SCM_ENABLE_ELISP
scm_init_lang ();
+#endif /* SCM_ENABLE_ELISP */
scm_init_script ();
scm_init_goops ();