From a8a19efc2b922b86489aa9da942db89bc4ac66f3 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sat, 16 Nov 2002 16:20:14 +0000 Subject: [PATCH] * eval.h (SCM_MAKE_ILOC): New macro. * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing the iloc bitpattern here. --- libguile/ChangeLog | 7 +++++++ libguile/debug.c | 5 +---- libguile/eval.h | 6 ++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 0d7d9674d..84d15a0fb 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2002-11-16 Dirk Herrmann + + * eval.h (SCM_MAKE_ILOC): New macro. + + * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing + the iloc bitpattern here. + 2002-11-14 Mikael Djurfeldt * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be diff --git a/libguile/debug.c b/libguile/debug.c index dc947cc39..a6ae69aa4 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -245,10 +245,7 @@ SCM_DEFINE (scm_make_iloc, "make-iloc", 3, 0, 0, { SCM_VALIDATE_INUM (1, frame); SCM_VALIDATE_INUM (2, binding); - return SCM_PACK (SCM_UNPACK (SCM_ILOC00) - + SCM_IFRINC * SCM_INUM (frame) - + (!SCM_FALSEP (cdrp) ? SCM_ICDR : 0) - + SCM_IDINC * SCM_INUM (binding)); + SCM_MAKE_ILOC (SCM_INUM (frame), SCM_INUM (binding), !SCM_FALSEP (cdrp)); } #undef FUNC_NAME diff --git a/libguile/eval.h b/libguile/eval.h index 6315fe4aa..43d967ab3 100644 --- a/libguile/eval.h +++ b/libguile/eval.h @@ -92,6 +92,12 @@ SCM_API SCM scm_eval_options_interface (SCM setting); & (SCM_UNPACK (n) >> 8)) #define SCM_IDIST(n) (SCM_UNPACK (n) >> 20) #define SCM_ICDRP(n) (SCM_ICDR & SCM_UNPACK (n)) +#define SCM_MAKE_ILOC(frame_nr, binding_nr, last_p) \ + SCM_PACK ( \ + ((frame_nr) << 8) \ + + ((binding_nr) << 20) \ + + ((last_p) ? SCM_ICDR : 0) \ + + scm_tc8_iloc )