diff options
author | Andy Wingo <wingo@pobox.com> | 2010-09-25 12:16:05 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-09-25 12:16:05 +0200 |
commit | 038cb3428f4c3686841e5a597164db28c2200dc7 (patch) | |
tree | 2ce252fd8d5aba7ad69b4479c12c410ffd483765 | |
parent | 85d3a8a63dbac7aa8aa5a70b0719be2277355b87 (diff) |
remove vm-version, vm options
* libguile/vm.h (struct scm_vm): Remove "options" member.
* libguile/vm.c (scm_vm_version, scm_vm_option, scm_set_vm_option_x):
Remove.
* module/system/vm/vm.scm (vm-version, vm-option, set-vm-option!):
Remove.
(vms:time, vms:clock): Remove these unused definitions.
(vm-load): Remove. "Load" should be reserved for things that exist on
disk, methinks.
-rw-r--r-- | libguile/vm.c | 32 | ||||
-rw-r--r-- | libguile/vm.h | 4 | ||||
-rw-r--r-- | module/system/vm/vm.scm | 9 | ||||
-rw-r--r-- | test-suite/tests/compiler.test | 7 | ||||
-rw-r--r-- | test-suite/vm/run-vm-tests.scm | 5 |
5 files changed, 7 insertions, 50 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index b229c2799..7512d10ff 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -513,7 +513,6 @@ make_vm (void) vp->sp = vp->stack_base - 1; vp->fp = NULL; vp->engine = SCM_VM_DEBUG_ENGINE; - vp->options = SCM_EOL; vp->trace_level = 0; for (i = 0; i < SCM_VM_NUM_HOOKS; i++) vp->hooks[i] = SCM_BOOL_F; @@ -588,15 +587,6 @@ SCM_DEFINE (scm_vm_apply, "vm-apply", 3, 0, 0, /* Scheme interface */ -SCM_DEFINE (scm_vm_version, "vm-version", 0, 0, 0, - (void), - "") -#define FUNC_NAME s_scm_vm_version -{ - return scm_from_locale_string (PACKAGE_VERSION); -} -#undef FUNC_NAME - /* Return T's VM. */ static inline SCM thread_vm (scm_i_thread *t) @@ -759,28 +749,6 @@ SCM_DEFINE (scm_vm_restore_continuation_hook, "vm-restore-continuation-hook", 1, } #undef FUNC_NAME -SCM_DEFINE (scm_vm_option, "vm-option", 2, 0, 0, - (SCM vm, SCM key), - "") -#define FUNC_NAME s_scm_vm_option -{ - SCM_VALIDATE_VM (1, vm); - return scm_assq_ref (SCM_VM_DATA (vm)->options, key); -} -#undef FUNC_NAME - -SCM_DEFINE (scm_set_vm_option_x, "set-vm-option!", 3, 0, 0, - (SCM vm, SCM key, SCM val), - "") -#define FUNC_NAME s_scm_set_vm_option_x -{ - SCM_VALIDATE_VM (1, vm); - SCM_VM_DATA (vm)->options - = scm_assq_set_x (SCM_VM_DATA (vm)->options, key, val); - return SCM_UNSPECIFIED; -} -#undef FUNC_NAME - SCM_DEFINE (scm_vm_trace_level, "vm-trace-level", 1, 0, 0, (SCM vm), "") diff --git a/libguile/vm.h b/libguile/vm.h index 86b096d74..36dc1dccb 100644 --- a/libguile/vm.h +++ b/libguile/vm.h @@ -49,7 +49,6 @@ struct scm_vm { SCM *stack_limit; /* stack limit address */ int engine; /* which vm engine we're using */ SCM hooks[SCM_VM_NUM_HOOKS]; /* hooks */ - SCM options; /* options */ int trace_level; /* traces enabled if trace_level > 0 */ scm_t_int64 cookie; /* used to detect unrewindable continuations */ }; @@ -65,7 +64,6 @@ SCM_API SCM scm_make_vm (void); SCM_API SCM scm_vm_apply (SCM vm, SCM program, SCM args); SCM_API SCM scm_c_vm_run (SCM vm, SCM program, SCM *argv, int nargs); -SCM_API SCM scm_vm_version (void); SCM_API SCM scm_thread_vm (SCM t); SCM_API SCM scm_set_thread_vm_x (SCM t, SCM vm); SCM_API SCM scm_the_vm (void); @@ -79,8 +77,6 @@ SCM_API SCM scm_vm_pop_continuation_hook (SCM vm); SCM_API SCM scm_vm_abort_continuation_hook (SCM vm); SCM_API SCM scm_vm_restore_continuation_hook (SCM vm); SCM_API SCM scm_vm_next_hook (SCM vm); -SCM_API SCM scm_vm_option (SCM vm, SCM key); -SCM_API SCM scm_set_vm_option_x (SCM vm, SCM key, SCM val); SCM_API SCM scm_vm_trace_level (SCM vm); SCM_API SCM scm_set_vm_trace_level_x (SCM vm, SCM level); diff --git a/module/system/vm/vm.scm b/module/system/vm/vm.scm index 66afdbbf8..874d5c848 100644 --- a/module/system/vm/vm.scm +++ b/module/system/vm/vm.scm @@ -25,9 +25,6 @@ the-vm thread-vm set-thread-vm! vm:ip vm:sp vm:fp vm:last-ip - vm-load vm-option set-vm-option! vm-version - vms:time vms:clock - vm-trace-level set-vm-trace-level! vm-push-continuation-hook vm-pop-continuation-hook vm-apply-hook @@ -36,9 +33,3 @@ (load-extension (string-append "libguile-" (effective-version)) "scm_init_vm") - -(define (vms:time stat) (vector-ref stat 0)) -(define (vms:clock stat) (vector-ref stat 1)) - -(define (vm-load vm objcode) - (vm-apply vm (make-program objcode) '())) diff --git a/test-suite/tests/compiler.test b/test-suite/tests/compiler.test index 90538ac4b..f600fe24a 100644 --- a/test-suite/tests/compiler.test +++ b/test-suite/tests/compiler.test @@ -19,8 +19,9 @@ #:use-module (test-suite lib) #:use-module (test-suite guile-test) #:use-module (system base compile) - #:use-module ((system vm vm) #:select (the-vm vm-load)) - #:use-module ((system vm program) #:select (program-sources source:addr))) + #:use-module ((system vm vm) #:select (the-vm vm-apply)) + #:use-module ((system vm program) #:select (make-program + program-sources source:addr))) (define read-and-compile (@@ (system base compile) read-and-compile)) @@ -97,7 +98,7 @@ #f) (install-reader!) this-should-be-ignored"))) - (and (eq? (vm-load (the-vm) (read-and-compile input)) + (and (eq? (vm-apply (the-vm) (make-program (read-and-compile input)) '()) 'ok) (eq? r (fluid-ref current-reader))))) diff --git a/test-suite/vm/run-vm-tests.scm b/test-suite/vm/run-vm-tests.scm index 39e7bf117..f699fdf4f 100644 --- a/test-suite/vm/run-vm-tests.scm +++ b/test-suite/vm/run-vm-tests.scm @@ -1,6 +1,6 @@ ;;; run-vm-tests.scm -- Run Guile-VM's test suite. ;;; -;;; Copyright 2005, 2009 Free Software Foundation, Inc. +;;; Copyright 2005, 2009, 2010 Free Software Foundation, Inc. ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public License @@ -18,6 +18,7 @@ (use-modules (system vm vm) + (system vm program) (system base compile) (system base language) (language scheme spec) @@ -41,7 +42,7 @@ (define (run-vm-program objcode) "Run VM program contained into @var{objcode}." - (vm-load (the-vm) objcode)) + (vm-apply (the-vm) (make-program objcode) '())) (define (compile/run-test-from-file file) "Run test from source file @var{file} and return a value indicating whether |