From 698c55b04bf2ef3bf64bbf1f2ad5a000a6be23ad Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 20 Feb 2014 19:57:47 +0100 Subject: [PATCH] assertion refactor in the vm * libguile/vm.c: * libguile/vm-engine.c: Change the one use of VM_ENABLE_PARANOID_ASSERTIONS to ASSERT. That becomes the one use of VM_ENABLE_ASSERTIONS, so disable that too. --- libguile/vm-engine.c | 12 +++++------- libguile/vm.c | 4 +--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 87e94ff2e..541e11cc8 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -1995,13 +1995,11 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp, if (!scm_module_system_booted_p) { -#ifdef VM_ENABLE_PARANOID_ASSERTIONS - ASSERT - (scm_is_true - scm_equal_p (modname, - scm_list_2 (SCM_BOOL_T, - scm_from_utf8_symbol ("guile")))); -#endif + ASSERT (scm_is_true + scm_equal_p (modname, + scm_list_2 + (SCM_BOOL_T, + scm_from_utf8_symbol ("guile")))); var = scm_lookup (sym); } else if (scm_is_true (SCM_CAR (modname))) diff --git a/libguile/vm.c b/libguile/vm.c index af1531ba9..e568655bb 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -60,9 +60,7 @@ static SCM sym_debug; /* The VM has a number of internal assertions that shouldn't normally be necessary, but might be if you think you found a bug in the VM. */ -#define VM_ENABLE_ASSERTIONS - -/* #define VM_ENABLE_PARANOID_ASSERTIONS */ +/* #define VM_ENABLE_ASSERTIONS */ static void vm_expand_stack (struct scm_vm *vp, SCM *new_sp) SCM_NOINLINE;