* 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.
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;
/* 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)
}
#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),
"")
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 */
};
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);
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);
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
(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) '()))
#: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))
#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)))))
;;; 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
(use-modules (system vm vm)
+ (system vm program)
(system base compile)
(system base language)
(language scheme spec)
(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