1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 14:50:19 +02:00

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.
This commit is contained in:
Andy Wingo 2014-02-20 19:57:47 +01:00
parent 2a62eda85a
commit 698c55b04b
2 changed files with 6 additions and 10 deletions

View file

@ -1995,13 +1995,11 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
if (!scm_module_system_booted_p) if (!scm_module_system_booted_p)
{ {
#ifdef VM_ENABLE_PARANOID_ASSERTIONS ASSERT (scm_is_true
ASSERT scm_equal_p (modname,
(scm_is_true scm_list_2
scm_equal_p (modname, (SCM_BOOL_T,
scm_list_2 (SCM_BOOL_T, scm_from_utf8_symbol ("guile"))));
scm_from_utf8_symbol ("guile"))));
#endif
var = scm_lookup (sym); var = scm_lookup (sym);
} }
else if (scm_is_true (SCM_CAR (modname))) else if (scm_is_true (SCM_CAR (modname)))

View file

@ -60,9 +60,7 @@ static SCM sym_debug;
/* The VM has a number of internal assertions that shouldn't normally be /* 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. */ necessary, but might be if you think you found a bug in the VM. */
#define VM_ENABLE_ASSERTIONS /* #define VM_ENABLE_ASSERTIONS */
/* #define VM_ENABLE_PARANOID_ASSERTIONS */
static void vm_expand_stack (struct scm_vm *vp, SCM *new_sp) SCM_NOINLINE; static void vm_expand_stack (struct scm_vm *vp, SCM *new_sp) SCM_NOINLINE;