1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

CHECK_OVERFLOW tweak

* libguile/vm-engine.c (CHECK_OVERFLOW): Now that we aren't checking for
  overflow on every push, fetch the stack limit from the vm instead of a
  local.
This commit is contained in:
Andy Wingo 2013-11-21 10:07:58 +01:00
parent 473d563733
commit f593117165

View file

@ -170,7 +170,7 @@
#define CHECK_OVERFLOW(sp) \
do { \
if (SCM_UNLIKELY ((sp) >= stack_limit)) \
if (SCM_UNLIKELY ((sp) >= vp->stack_limit)) \
vm_error_stack_overflow (vp); \
} while (0)
@ -432,7 +432,6 @@ VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_)
/* Cached variables. */
struct scm_vm *vp = SCM_VM_DATA (vm);
SCM *stack_limit = vp->stack_limit; /* stack limit address */
scm_i_thread *current_thread = SCM_I_CURRENT_THREAD;
scm_i_jmp_buf registers; /* used for prompts */