summaryrefslogtreecommitdiff
path: root/libguile/vm.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-01-05 18:50:17 +0100
committerAndy Wingo <wingo@pobox.com>2010-01-07 23:42:41 +0100
commita6029b97ea84d9e9a13d71b21213b6fd0be41e87 (patch)
tree5a60c3aebe8cdb826e24633a2712ea008171a609 /libguile/vm.c
parentf3056b42cf2ddb52cdd7de013ada33e4aa953ada (diff)
downloadguile-a6029b97ea84d9e9a13d71b21213b6fd0be41e87.tar.gz
properly integrate vm bootstrapping into init.c
* libguile/Makefile.am (modinclude_HEADERS): * libguile/vm-bootstrap.h: Remove vm-bootstrap.h. * libguile/frames.c: No more vm-bootstrap.h. * libguile/instructions.c (scm_init_instructions): * libguile/objcodes.c (scm_init_objcodes): * libguile/programs.c (scm_init_programs): No need to call scm_bootstrap_vm, init.c does that for us. * libguile/vm.c (scm_bootstrap_vm): No need call e.g. scm_bootstrap_frames, init.c does that. Remove a twice-calling guard, should be unnecessary. Don't define the load-compiled subr here. * libguile/load.c (scm_init_load): Define the load-compiled subr here. * libguile/vm.h: Declare scm_bootstrap_vm here. * libguile/init.c (scm_i_init_guile): Properly integrate VM bootstrapping into this file.
Diffstat (limited to 'libguile/vm.c')
-rw-r--r--libguile/vm.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/libguile/vm.c b/libguile/vm.c
index a5b5a558e..5d0c4c9bc 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -28,7 +28,6 @@
#include <gc/gc_mark.h>
#include "_scm.h"
-#include "vm-bootstrap.h"
#include "frames.h"
#include "instructions.h"
#include "objcodes.h"
@@ -654,30 +653,14 @@ SCM scm_load_compiled_with_vm (SCM file)
void
scm_bootstrap_vm (void)
{
- static int strappage = 0;
-
- if (strappage)
- return;
-
- scm_bootstrap_frames ();
- scm_bootstrap_instructions ();
- scm_bootstrap_objcodes ();
- scm_bootstrap_programs ();
-
scm_tc16_vm_cont = scm_make_smob_type ("vm-cont", 0);
scm_tc16_vm = scm_make_smob_type ("vm", 0);
scm_set_smob_apply (scm_tc16_vm, scm_vm_apply, 1, 0, 1);
- scm_c_define ("load-compiled",
- scm_c_make_gsubr ("load-compiled/vm", 1, 0, 0,
- scm_load_compiled_with_vm));
-
scm_c_register_extension ("libguile", "scm_init_vm",
(scm_t_extension_init_func)scm_init_vm, NULL);
- strappage = 1;
-
#ifdef VM_ENABLE_PRECISE_STACK_GC_SCAN
vm_stack_gc_kind =
GC_new_kind (GC_new_free_list (),
@@ -690,8 +673,6 @@ scm_bootstrap_vm (void)
void
scm_init_vm (void)
{
- scm_bootstrap_vm ();
-
#ifndef SCM_MAGIC_SNARFER
#include "libguile/vm.x"
#endif