summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/script.c4
-rw-r--r--libguile/vm.c14
2 files changed, 5 insertions, 13 deletions
diff --git a/libguile/script.c b/libguile/script.c
index 03d5de194..088c06b92 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -40,6 +40,7 @@
#include "libguile/strports.h"
#include "libguile/validate.h"
#include "libguile/version.h"
+#include "libguile/vm.h"
#ifdef HAVE_STRING_H
#include <string.h>
@@ -718,7 +719,10 @@ scm_compile_shell_switches (int argc, char **argv)
was not explicitly turned off, turn on debugging. */
if (turn_on_debugging || (interactive && !dont_turn_on_debugging))
{
+ /* FIXME: backtraces and positions should always be on (?) */
tail = scm_cons (scm_cons (sym_turn_on_debugging, SCM_EOL), tail);
+ scm_c_set_default_vm_engine_x (SCM_VM_DEBUG_ENGINE);
+ scm_c_set_vm_engine_x (scm_the_vm (), SCM_VM_DEBUG_ENGINE);
}
{
diff --git a/libguile/vm.c b/libguile/vm.c
index 05e1f7191..29d686255 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -36,7 +36,7 @@
#include "programs.h"
#include "vm.h"
-static int vm_default_engine = SCM_VM_DEBUG_ENGINE;
+static int vm_default_engine = SCM_VM_REGULAR_ENGINE;
/* Unfortunately we can't snarf these: snarfed things are only loaded up from
(system vm vm), which might not be loaded before an error happens. */
@@ -745,13 +745,6 @@ vm_engine_to_symbol (int engine, const char *FUNC_NAME)
}
}
-static int
-vm_has_pending_computation (SCM vm)
-{
- struct scm_vm *vp = SCM_VM_DATA (vm);
- return vp->sp >= vp->stack_base;
-}
-
SCM_DEFINE (scm_vm_engine, "vm-engine", 1, 0, 0,
(SCM vm),
"")
@@ -768,11 +761,6 @@ scm_c_set_vm_engine_x (SCM vm, int engine)
{
SCM_VALIDATE_VM (1, vm);
- if (vm_has_pending_computation (vm))
- SCM_MISC_ERROR ("VM engine may only be changed while there are no "
- "pending computations.",
- SCM_EOL);
-
if (engine < 0 || engine >= SCM_VM_NUM_ENGINES)
SCM_MISC_ERROR ("Unknown VM engine: ~a",
scm_list_1 (scm_from_int (engine)));