diff options
author | Andy Wingo <wingo@pobox.com> | 2013-11-21 10:07:58 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-11-21 10:07:58 +0100 |
commit | f593117165ceb7bf287e15b3c01a217140c19421 (patch) | |
tree | 872113e05c47e595def55860ba81489fb60581c9 | |
parent | 473d56373341b0224aa43c3149564ae7f2e20471 (diff) | |
download | guile-f593117165ceb7bf287e15b3c01a217140c19421.tar.gz |
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.
-rw-r--r-- | libguile/vm-engine.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 20a5ee05d..433f59146 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -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 */ |