diff options
author | Andy Wingo <wingo@pobox.com> | 2008-08-21 18:39:30 -0700 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-08-21 18:39:30 -0700 |
commit | 83495480e8e401d99158222f61d5c96fd2480e24 (patch) | |
tree | cdc006fdec9fda0909563b9daacf207e31265afa | |
parent | be52b55a3213c8f683d1007a542771daa3f9a06b (diff) |
merge guile-vm into libguile itself
* ice-9/boot-9.scm: Only define load-compiled as #f if it's not already
defined, which won't normally be the case.
* libguile/guile-vm.c: Removed, there's no more guile-vm binary.
* libguile/frames.c: (with change frame? -> heap-frame?)
* libguile/frames.h:
* libguile/instructions.c:
* libguile/instructions.h:
* libguile/objcodes.c:
* libguile/objcodes.h:
* libguile/programs.c:
* libguile/programs.h:
* libguile/vm-bootstrap.h: (was bootstrap.h)
* libguile/vm-engine.c: (was vm_engine.c)
* libguile/vm-engine.h: (was vm_engine.h)
* libguile/vm-expand.h: (was vm_expand.h)
* libguile/vm-i-loader.c: (was vm_loader.c)
* libguile/vm-i-scheme.c: (was vm_scheme.c)
* libguile/vm-i-system.c: (was vm_system.c)
* libguile/vm.c:
* libguile/vm.h: These files moved here from src/, as guile-vm is now a
part of libguile.
* libguile/init.c: Bootstrap the VM. Yay!
* libguile/Makefile.am: The necessary chicanery here.
* module/system/vm/Makefile.am:
* module/system/vm/bootstrap.scm:
* module/system/vm/frame.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm:
* pre-inst-guile-env.in: Add builddirs to the load path; add module/ to
the path in the empty-$GUILE_LOAD_PATH case as well.
* src/Makefile.am: Moved out everything except guilec and guile-disasm,
which probably should be moved to the scripts directory?
* testsuite/Makefile.am: Update to find guile-vm in the right place.
* module/system/vm/Makefile.am:
* module/system/vm/bootstrap.scm: Removed bootstrap.scm, scm_init_guile
handles the bootstrapping for us.
* module/system/vm/frame.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm: Call the init functions in libguile; should
fix at some point to avoid the dlopen?
-rw-r--r-- | ice-9/boot-9.scm | 3 | ||||
-rw-r--r-- | libguile/Makefile.am | 19 | ||||
-rw-r--r-- | libguile/frames.c (renamed from src/frames.c) | 6 | ||||
-rw-r--r-- | libguile/frames.h (renamed from src/frames.h) | 1 | ||||
-rw-r--r-- | libguile/init.c | 3 | ||||
-rw-r--r-- | libguile/instructions.c (renamed from src/instructions.c) | 10 | ||||
-rw-r--r-- | libguile/instructions.h (renamed from src/instructions.h) | 8 | ||||
-rw-r--r-- | libguile/objcodes.c (renamed from src/objcodes.c) | 2 | ||||
-rw-r--r-- | libguile/objcodes.h (renamed from src/objcodes.h) | 0 | ||||
-rw-r--r-- | libguile/programs.c (renamed from src/programs.c) | 2 | ||||
-rw-r--r-- | libguile/programs.h (renamed from src/programs.h) | 0 | ||||
-rw-r--r-- | libguile/vm-bootstrap.h (renamed from src/bootstrap.h) | 0 | ||||
-rw-r--r-- | libguile/vm-engine.c (renamed from src/vm_engine.c) | 18 | ||||
-rw-r--r-- | libguile/vm-engine.h (renamed from src/vm_engine.h) | 0 | ||||
-rw-r--r-- | libguile/vm-expand.h (renamed from src/vm_expand.h) | 0 | ||||
-rw-r--r-- | libguile/vm-i-loader.c (renamed from src/vm_loader.c) | 0 | ||||
-rw-r--r-- | libguile/vm-i-scheme.c (renamed from src/vm_scheme.c) | 0 | ||||
-rw-r--r-- | libguile/vm-i-system.c (renamed from src/vm_system.c) | 0 | ||||
-rw-r--r-- | libguile/vm.c (renamed from src/vm.c) | 13 | ||||
-rw-r--r-- | libguile/vm.h (renamed from src/vm.h) | 0 | ||||
-rw-r--r-- | module/system/vm/Makefile.am | 2 | ||||
-rw-r--r-- | module/system/vm/bootstrap.scm | 31 | ||||
-rw-r--r-- | module/system/vm/frame.scm | 7 | ||||
-rw-r--r-- | module/system/vm/instruction.scm | 2 | ||||
-rw-r--r-- | module/system/vm/objcode.scm | 2 | ||||
-rw-r--r-- | module/system/vm/program.scm | 2 | ||||
-rw-r--r-- | module/system/vm/vm.scm | 2 | ||||
-rw-r--r-- | pre-inst-guile-env.in | 9 | ||||
-rw-r--r-- | src/Makefile.am | 45 | ||||
-rw-r--r-- | src/guile-vm.c | 56 | ||||
-rw-r--r-- | testsuite/Makefile.am | 2 |
31 files changed, 70 insertions, 175 deletions
diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index 5c884ceca..1bb477746 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -2136,7 +2136,8 @@ module '(ice-9 q) '(make-q q-length))}." ;;; {Compiled module} -(define load-compiled #f) +(if (not (defined? 'load-compiled)) + (define load-compiled #f)) diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 74ed806dd..0f91cbc97 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -115,6 +115,9 @@ libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \ throw.c values.c variable.c vectors.c version.c vports.c weaks.c \ ramap.c unif.c +# vm-related sources +libguile_la_SOURCES += frames.c instructions.c objcodes.c programs.c vm.c + libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_SOURCES = i18n.c libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_CFLAGS = \ $(libguile_la_CFLAGS) @@ -139,6 +142,9 @@ DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x chars.x \ strports.x struct.x symbols.x threads.x throw.x values.x \ variable.x vectors.x version.x vports.x weaks.x ramap.x unif.x +# vm-related snarfs +DOT_X_FILES += frames.x instructions.x objcodes.x programs.x vm.x + EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@ DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \ @@ -162,9 +168,14 @@ DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc \ EXTRA_DOT_DOC_FILES = @EXTRA_DOT_DOC_FILES@ +DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i + +.c.i: + grep '^VM_DEFINE' $< > $@ + BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \ version.h scmconfig.h \ - $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) + $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) EXTRA_libguile_la_SOURCES = _scm.h \ inet_aton.c memmove.c putenv.c strerror.c \ @@ -192,6 +203,9 @@ noinst_HEADERS = convert.i.c \ win32-uname.h win32-dirent.h win32-socket.h \ private-gc.h private-options.h +# vm instructions +noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c + libguile_la_DEPENDENCIES = @LIBLOBJS@ libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library) libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined @@ -219,6 +233,9 @@ modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h \ pthread-threads.h null-threads.h throw.h unif.h values.h \ variable.h vectors.h vports.h weaks.h +modinclude_HEADERS += vm-bootstrap.h frames.h instructions.h objcodes.h \ + programs.h vm.h vm-engine.h vm-expand.h + nodist_modinclude_HEADERS = version.h scmconfig.h bin_SCRIPTS = guile-snarf diff --git a/src/frames.c b/libguile/frames.c index a3c9b9705..c4f2f275d 100644 --- a/src/frames.c +++ b/libguile/frames.c @@ -44,7 +44,7 @@ #endif #include <string.h> -#include "bootstrap.h" +#include "vm-bootstrap.h" #include "frames.h" @@ -95,10 +95,10 @@ heap_frame_free (SCM obj) /* Scheme interface */ -SCM_DEFINE (scm_frame_p, "frame?", 1, 0, 0, +SCM_DEFINE (scm_heap_frame_p, "heap-frame?", 1, 0, 0, (SCM obj), "") -#define FUNC_NAME s_scm_frame_p +#define FUNC_NAME s_scm_heap_frame_p { return SCM_BOOL (SCM_HEAP_FRAME_P (obj)); } diff --git a/src/frames.h b/libguile/frames.h index a7292ff74..53fc4e858 100644 --- a/src/frames.h +++ b/libguile/frames.h @@ -104,6 +104,7 @@ extern scm_t_bits scm_tc16_heap_frame; #define SCM_HEAP_FRAME_POINTER(f) (SCM_HEAP_FRAME_DATA (f) + 2) #define SCM_VALIDATE_HEAP_FRAME(p,x) SCM_MAKE_VALIDATE (p, x, HEAP_FRAME_P) +extern SCM scm_heap_frame_p (SCM obj); extern SCM scm_frame_program (SCM frame); extern SCM scm_frame_local_ref (SCM frame, SCM index); extern SCM scm_frame_local_set_x (SCM frame, SCM index, SCM val); diff --git a/libguile/init.c b/libguile/init.c index 25cff62a5..cdd756894 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -118,6 +118,7 @@ #include "libguile/variable.h" #include "libguile/vectors.h" #include "libguile/version.h" +#include "libguile/vm-bootstrap.h" #include "libguile/vports.h" #include "libguile/weaks.h" #include "libguile/guardians.h" @@ -572,6 +573,8 @@ scm_i_init_guile (SCM_STACKITEM *base) scm_init_rw (); scm_init_extensions (); + scm_bootstrap_vm (); + atexit (cleanup_for_exit); scm_load_startup_files (); } diff --git a/src/instructions.c b/libguile/instructions.c index f7ec70182..89b6c774b 100644 --- a/src/instructions.c +++ b/libguile/instructions.c @@ -44,15 +44,15 @@ #endif #include <string.h> -#include "bootstrap.h" +#include "vm-bootstrap.h" #include "instructions.h" struct scm_instruction scm_instruction_table[] = { #define VM_INSTRUCTION_TO_TABLE 1 -#include "vm_expand.h" -#include "vm_system.i" -#include "vm_scheme.i" -#include "vm_loader.i" +#include "vm-expand.h" +#include "vm-i-system.i" +#include "vm-i-scheme.i" +#include "vm-i-loader.i" #undef VM_INSTRUCTION_TO_TABLE {scm_op_last} }; diff --git a/src/instructions.h b/libguile/instructions.h index 2f872adc7..1a965daf9 100644 --- a/src/instructions.h +++ b/libguile/instructions.h @@ -46,10 +46,10 @@ enum scm_opcode { #define VM_INSTRUCTION_TO_OPCODE 1 -#include "vm_expand.h" -#include "vm_system.i" -#include "vm_scheme.i" -#include "vm_loader.i" +#include "vm-expand.h" +#include "vm-i-system.i" +#include "vm-i-scheme.i" +#include "vm-i-loader.i" #undef VM_INSTRUCTION_TO_OPCODE scm_op_last }; diff --git a/src/objcodes.c b/libguile/objcodes.c index 603a0873c..6891e8a6a 100644 --- a/src/objcodes.c +++ b/libguile/objcodes.c @@ -51,7 +51,7 @@ #include <sys/types.h> #include <assert.h> -#include "bootstrap.h" +#include "vm-bootstrap.h" #include "programs.h" #include "objcodes.h" diff --git a/src/objcodes.h b/libguile/objcodes.h index 2cedefa98..2cedefa98 100644 --- a/src/objcodes.h +++ b/libguile/objcodes.h diff --git a/src/programs.c b/libguile/programs.c index dfe6c3faa..436e2b863 100644 --- a/src/programs.c +++ b/libguile/programs.c @@ -44,7 +44,7 @@ #endif #include <string.h> -#include "bootstrap.h" +#include "vm-bootstrap.h" #include "instructions.h" #include "programs.h" #include "vm.h" diff --git a/src/programs.h b/libguile/programs.h index 04f2d459d..04f2d459d 100644 --- a/src/programs.h +++ b/libguile/programs.h diff --git a/src/bootstrap.h b/libguile/vm-bootstrap.h index beecf0fc2..beecf0fc2 100644 --- a/src/bootstrap.h +++ b/libguile/vm-bootstrap.h diff --git a/src/vm_engine.c b/libguile/vm-engine.c index 1b568eb0a..def7e807b 100644 --- a/src/vm_engine.c +++ b/libguile/vm-engine.c @@ -41,7 +41,7 @@ /* This file is included in vm.c twice */ -#include "vm_engine.h" +#include "vm-engine.h" static SCM @@ -87,10 +87,10 @@ vm_run (SCM vm, SCM program, SCM args) /* Jump table */ static void *jump_table[] = { #define VM_INSTRUCTION_TO_LABEL 1 -#include "vm_expand.h" -#include "vm_system.i" -#include "vm_scheme.i" -#include "vm_loader.i" +#include "vm-expand.h" +#include "vm-i-system.i" +#include "vm-i-scheme.i" +#include "vm-i-loader.i" #undef VM_INSTRUCTION_TO_LABEL }; #endif @@ -124,10 +124,10 @@ vm_run (SCM vm, SCM program, SCM args) switch (*ip++) { #endif -#include "vm_expand.h" -#include "vm_system.c" -#include "vm_scheme.c" -#include "vm_loader.c" +#include "vm-expand.h" +#include "vm-i-system.c" +#include "vm-i-scheme.c" +#include "vm-i-loader.c" #ifndef HAVE_LABELS_AS_VALUES } diff --git a/src/vm_engine.h b/libguile/vm-engine.h index 2026e3cdf..2026e3cdf 100644 --- a/src/vm_engine.h +++ b/libguile/vm-engine.h diff --git a/src/vm_expand.h b/libguile/vm-expand.h index cccb56b9f..cccb56b9f 100644 --- a/src/vm_expand.h +++ b/libguile/vm-expand.h diff --git a/src/vm_loader.c b/libguile/vm-i-loader.c index db0ee9b57..db0ee9b57 100644 --- a/src/vm_loader.c +++ b/libguile/vm-i-loader.c diff --git a/src/vm_scheme.c b/libguile/vm-i-scheme.c index e1c0dbdb3..e1c0dbdb3 100644 --- a/src/vm_scheme.c +++ b/libguile/vm-i-scheme.c diff --git a/src/vm_system.c b/libguile/vm-i-system.c index 353b3b8a2..353b3b8a2 100644 --- a/src/vm_system.c +++ b/libguile/vm-i-system.c diff --git a/src/vm.c b/libguile/vm.c index d8e604a34..5ec7d9291 100644 --- a/src/vm.c +++ b/libguile/vm.c @@ -44,7 +44,7 @@ #endif #include <string.h> -#include "bootstrap.h" +#include "vm-bootstrap.h" #include "frames.h" #include "instructions.h" #include "objcodes.h" @@ -245,14 +245,14 @@ vm_heapify_frames (SCM vm) #if 0 #define VM_NAME vm_regular_engine #define VM_ENGINE VM_REGULAR_ENGINE -#include "vm_engine.c" +#include "vm-engine.c" #undef VM_NAME #undef VM_ENGINE #endif #define VM_NAME vm_debug_engine #define VM_ENGINE VM_DEBUG_ENGINE -#include "vm_engine.c" +#include "vm-engine.c" #undef VM_NAME #undef VM_ENGINE @@ -656,10 +656,9 @@ scm_bootstrap_vm (void) the_vm = scm_permanent_object (make_vm ()); - /* a bit heavy-handed, this */ - scm_variable_set_x (scm_c_lookup ("load-compiled"), - scm_c_make_gsubr ("load-compiled/vm", 1, 0, 0, - scm_load_compiled_with_vm)); + scm_c_define ("load-compiled", + scm_c_make_gsubr ("load-compiled/vm", 1, 0, 0, + scm_load_compiled_with_vm)); strappage = 1; } diff --git a/src/vm.h b/libguile/vm.h index af4c81588..af4c81588 100644 --- a/src/vm.h +++ b/libguile/vm.h diff --git a/module/system/vm/Makefile.am b/module/system/vm/Makefile.am index 29b50b747..8996a5a66 100644 --- a/module/system/vm/Makefile.am +++ b/module/system/vm/Makefile.am @@ -1,4 +1,4 @@ -SOURCES = assemble.scm bootstrap.scm conv.scm debug.scm \ +SOURCES = assemble.scm conv.scm debug.scm \ disasm.scm frame.scm instruction.scm objcode.scm \ profile.scm program.scm trace.scm vm.scm moddir = $(guiledir)/system/vm diff --git a/module/system/vm/bootstrap.scm b/module/system/vm/bootstrap.scm deleted file mode 100644 index 6ecd83554..000000000 --- a/module/system/vm/bootstrap.scm +++ /dev/null @@ -1,31 +0,0 @@ -;;; Bootstrapping the VM into the interpreter - -;; Copyright (C) 2001 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 -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Code: - -(define-module (system vm bootstrap)) - -;;; -;;; Core procedures -;;; - -;; Calling this updates boot-9.scm's `load-compiled' to point to to -;; scm_load_compiled_with_vm, so future module loads will read .go files -;; if they are present. -(dynamic-call "scm_bootstrap_vm" (dynamic-link "libguile-vm")) diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm index d732309f0..8014fa77c 100644 --- a/module/system/vm/frame.scm +++ b/module/system/vm/frame.scm @@ -32,9 +32,10 @@ frame-object-name frame-local-ref frame-external-link frame-local-set! frame-return-address frame-program - frame-dynamic-link frame?)) + frame-dynamic-link heap-frame?)) -(dynamic-call "scm_init_frames" (dynamic-link "libguile-vm")) +;; fixme: avoid the dynamic-call? +(dynamic-call "scm_init_frames" (dynamic-link "libguile")) ;;; ;;; Frame chain @@ -123,7 +124,7 @@ (let ((prog (frame-program frame)) (link (frame-dynamic-link frame))) (or (object-property prog 'name) - (and (frame? link) + (and (heap-frame? link) (frame-object-name link (1- (frame-address link)) prog)) (hash-fold (lambda (s v d) (if (eq? prog (variable-ref v)) s d)) prog (module-obarray (current-module)))))) diff --git a/module/system/vm/instruction.scm b/module/system/vm/instruction.scm index e8b325a7f..31d5309f3 100644 --- a/module/system/vm/instruction.scm +++ b/module/system/vm/instruction.scm @@ -25,4 +25,4 @@ instruction-pops instruction-pushes instruction->opcode opcode->instruction)) -(dynamic-call "scm_init_instructions" (dynamic-link "libguile-vm")) +(dynamic-call "scm_init_instructions" (dynamic-link "libguile")) diff --git a/module/system/vm/objcode.scm b/module/system/vm/objcode.scm index a814d5b85..b7218f846 100644 --- a/module/system/vm/objcode.scm +++ b/module/system/vm/objcode.scm @@ -23,4 +23,4 @@ :export (objcode->u8vector objcode? objcode->program bytecode->objcode load-objcode)) -(dynamic-call "scm_init_objcodes" (dynamic-link "libguile-vm")) +(dynamic-call "scm_init_objcodes" (dynamic-link "libguile")) diff --git a/module/system/vm/program.scm b/module/system/vm/program.scm index a0ccee5f0..cdb975060 100644 --- a/module/system/vm/program.scm +++ b/module/system/vm/program.scm @@ -30,7 +30,7 @@ program-bytecode program? program-objects program-base program-external)) -(dynamic-call "scm_init_programs" (dynamic-link "libguile-vm")) +(dynamic-call "scm_init_programs" (dynamic-link "libguile")) (define arity:nargs car) (define arity:nrest cadr) diff --git a/module/system/vm/vm.scm b/module/system/vm/vm.scm index b6a47953e..e0395eae1 100644 --- a/module/system/vm/vm.scm +++ b/module/system/vm/vm.scm @@ -38,7 +38,7 @@ vm-next-hook vm-apply-hook vm-boot-hook vm-return-hook vm-break-hook vm-exit-hook vm-halt-hook vm-enter-hook)) -(dynamic-call "scm_init_vm" (dynamic-link "libguile-vm")) +(dynamic-call "scm_init_vm" (dynamic-link "libguile")) (define (vm-current-frame-chain vm) (make-frame-chain (vm-this-frame vm) (vm:ip vm))) diff --git a/pre-inst-guile-env.in b/pre-inst-guile-env.in index 80442b5a5..e83ca4317 100644 --- a/pre-inst-guile-env.in +++ b/pre-inst-guile-env.in @@ -47,9 +47,14 @@ top_builddir="@top_builddir_absolute@" if [ x"$GUILE_LOAD_PATH" = x ] then - GUILE_LOAD_PATH="${top_srcdir}/guile-readline:${top_srcdir}" + if test "${top_srcdir}" != "${top_builddir}"; then + GUILE_LOAD_PATH="${top_builddir}/guile-readline:${top_srcdir}/guile-readline:${top_builddir}:${top_srcdir}:${top_builddir}/module:${top_srcdir}/module" + else + GUILE_LOAD_PATH="${top_srcdir}/guile-readline:${top_srcdir}:${top_builddir}/module:${top_srcdir}/module" + fi else - for d in "${top_srcdir}" "${top_srcdir}/guile-readline" + for d in "${top_srcdir}" "${top_srcdir}/guile-readline" \ + "${top_srcdir}/module" "${top_builddir}/module" do # This hair prevents double inclusion. # The ":" prevents prefix aliasing. diff --git a/src/Makefile.am b/src/Makefile.am index 8b0a8e710..c4751923b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,49 +1,4 @@ -bin_PROGRAMS = guile-vm bin_SCRIPTS = guilec guile-disasm -guile_vm_SOURCES = guile-vm.c -guile_vm_LDADD = libguile-vm.la ../libguile/libguile.la - -lib_LTLIBRARIES = libguile-vm.la -libguile_vm_la_SOURCES = \ - bootstrap.h \ - frames.c instructions.c objcodes.c programs.c vm.c \ - frames.h instructions.h objcodes.h programs.h vm.h \ - vm_engine.h vm_expand.h -libguile_vm_la_LDFLAGS = -version-info 0:0:0 -export-dynamic -EXTRA_DIST = vm_engine.c vm_system.c vm_scheme.c vm_loader.c \ - guilec.in guile-disasm.in -BUILT_SOURCES = vm_system.i vm_scheme.i vm_loader.i \ - frames.x instructions.x objcodes.x programs.x vm.x - -INCLUDES = -CLEANFILES = guilec guile-disasm -DISTCLEANFILES = $(BUILT_SOURCES) - -ETAGS_ARGS = --regex='/SCM_\(SYMBOL\|VCELL\).*\"\([^\"]\)*\"/\3/' \ - --regex='/SCM_DEFINE[ \t]*(\([^,]*\),[^,]*/\1/' - -SNARF = $(top_builddir)/pre-inst-guile-env guile-snarf -SUFFIXES = .i .x - -.c.i: - grep '^VM_DEFINE' $< > $@ - -.c.x: - $(SNARF) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \ - || { rm $@; false; } - - -# Extra rules for debugging purposes. - -%.I: %.c - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $< > $@ - -%.s: %.c - $(CC) -S -dA $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -o $@ $< - - %: %.in sed "s!@guile@!$(bindir)/guile!" $^ > $@ @chmod 755 $@ - -$(BUILT_SOURCES): vm_expand.h diff --git a/src/guile-vm.c b/src/guile-vm.c deleted file mode 100644 index 2cc5efc49..000000000 --- a/src/guile-vm.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 2001 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 - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA - * - * As a special exception, the Free Software Foundation gives permission - * for additional uses of the text contained in its release of GUILE. - * - * The exception is that, if you link the GUILE library with other files - * to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the GUILE library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the - * Free Software Foundation under the name GUILE. If you copy - * code from other Free Software Foundation releases into a copy of - * GUILE, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for GUILE, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include <libguile.h> -#include "bootstrap.h" - -int -main (int argc, char **argv) -{ - scm_init_guile (); - scm_bootstrap_vm (); - scm_shell (argc, argv); - return 0; /* never reached */ -} diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index a2f209622..04a3e97e7 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -1,7 +1,7 @@ # The test programs. # The Libtool executable. -GUILE_VM = $(top_builddir)/src/guile-vm +GUILE_VM = $(top_builddir)/pre-inst-guile vm_test_files = \ t-basic-contructs.scm \ |