1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

* __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,

SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
	SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
	generalized it to apply not only to C level functions but also to
	scheme level functions.

	* debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
	scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
	scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
	eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
	only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
	respectively.

	* deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
	SCM_IDSTMSK): Deprecated.  The macro definitions are moved from
	eval.h into eval.c and a copy is placed into deprecated.h.

	* eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
	into eval.c. This definition was not part of the API in any
	officially released version of guile and thus does not need to go
	through a phase of deprecation.
This commit is contained in:
Dirk Herrmann 2003-06-04 05:28:34 +00:00
parent e90c3a895d
commit d0624e391b
9 changed files with 104 additions and 52 deletions

View file

@ -85,6 +85,55 @@ char *alloca ();
/* {Ilocs}
*
* Ilocs are memoized references to variables in local environment frames.
* They are represented as three values: The relative offset of the
* environment frame, the number of the binding within that frame, and a
* boolean value indicating whether the binding is the last binding in the
* frame.
*/
#define SCM_ILOC00 SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
#define SCM_IDINC (0x00100000L)
#define SCM_IDSTMSK (-SCM_IDINC)
#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 )
#if (SCM_DEBUG_DEBUGGING_SUPPORT == 1)
SCM scm_dbg_make_iloc (SCM frame, SCM binding, SCM cdrp);
SCM_DEFINE (scm_dbg_make_iloc, "dbg-make-iloc", 3, 0, 0,
(SCM frame, SCM binding, SCM cdrp),
"Return a new iloc with frame offset @var{frame}, binding\n"
"offset @var{binding} and the cdr flag @var{cdrp}.")
#define FUNC_NAME s_scm_dbg_make_iloc
{
SCM_VALIDATE_INUM (1, frame);
SCM_VALIDATE_INUM (2, binding);
return SCM_MAKE_ILOC (SCM_INUM (frame),
SCM_INUM (binding),
!SCM_FALSEP (cdrp));
}
#undef FUNC_NAME
SCM scm_dbg_iloc_p (SCM obj);
SCM_DEFINE (scm_dbg_iloc_p, "dbg-iloc?", 1, 0, 0,
(SCM obj),
"Return @code{#t} if @var{obj} is an iloc.")
#define FUNC_NAME s_scm_dbg_iloc_p
{
return SCM_BOOL (SCM_ILOCP (obj));
}
#undef FUNC_NAME
#endif
#define SCM_VALIDATE_NON_EMPTY_COMBINATION(x) \
do { \
if (SCM_EQ_P ((x), SCM_EOL)) \