1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +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

5
NEWS
View file

@ -867,6 +867,11 @@ SCM_EVALIM, SCM_XEVAL, SCM_XEVALCAR
These macros were used in the implementation of the evaluator. It's unlikely
that they have been used by user code.
** Deprecated macros for iloc handling: SCM_ILOC00, SCM_IDINC, SCM_IDSTMSK
These macros were used in the implementation of the evaluator. It's unlikely
that they have been used by user code.
** Removed definitions: scm_lisp_nil, scm_lisp_t, s_nil_ify,
scm_m_nil_ify, s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
scm_m_0_ify, s_1_ify, scm_m_1_ify, scm_debug_newcell,

View file

@ -1,13 +1,37 @@
2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
* __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.
2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
* deprecated.c, deprecated.h, eval.c, eval.h: Deprecated
scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings,
scm_s_variable, scm_s_clauses, scm_s_formals. In eval.c the
* deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
definitions are make static and renamed from scm_s_xxx to s_xxx.
In deprecated.c the original definitions are copied.
* deprecated.h, eval.c, eval: Deprecated SCM_EVALIM2, SCM_EVALIM,
SCM_XEVAL and SCM_XEVALCAR. The macro definitions are moved from
* deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
SCM_XEVALCAR): Deprecated. The macro definitions are moved from
eval.h into eval.c and a copy (slightly modified to work in user
code) is placed into deprecated.h.

View file

@ -256,19 +256,20 @@
#define SCM_DEBUG_TYPING_STRICTNESS 1
#endif
/* If SCM_DEBUG_DEBUGGER_SUPPORT is set to 1, guile will provide a set of
* special functions that support debugging with a debugger like gdb. The
* behaviour of guile is not changed by this macro, only the set of functions
* that are available will differ. All functions that are introduced this way
* have the prefix 'scm_dbg_'. This allows to easily determine the set of
* support functions, given that your debugger provides automatic name
* completion. Note that these functions are intended to be used during
* interactive debugging sessions only. They are not considered part of
* guile's official API. They may change or disappear without notice or
* deprecation phase.
/* If SCM_DEBUG_DEBUGGING_SUPPORT is set to 1, guile will provide a set of
* special functions that support debugging with a debugger like gdb or
* debugging of guile internals on the scheme level. The behaviour of guile
* is not changed by this macro, only the set of functions that are available
* will differ. All functions that are introduced this way have the prefix
* 'scm_dbg_' on the C level and the prefix 'dbg-' on the scheme level. This
* allows to easily determine the set of support functions, given that your
* debugger or repl provide automatic name completion. Note that these
* functions are intended to be used during interactive debugging sessions
* only. They are not considered part of guile's official API. They may
* change or disappear without notice or deprecation phase.
*/
#ifndef SCM_DEBUG_DEBUGGER_SUPPORT
#define SCM_DEBUG_DEBUGGER_SUPPORT SCM_DEBUG
#ifndef SCM_DEBUG_DEBUGGING_SUPPORT
#define SCM_DEBUG_DEBUGGING_SUPPORT SCM_DEBUG
#endif

View file

@ -211,29 +211,6 @@ scm_make_memoized (SCM exp, SCM env)
#include "libguile/variable.h"
#include "libguile/procs.h"
SCM_DEFINE (scm_make_iloc, "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_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_DEFINE (scm_iloc_p, "iloc?", 1, 0, 0,
(SCM obj),
"Return @code{#t} if @var{obj} is an iloc.")
#define FUNC_NAME s_scm_iloc_p
{
return SCM_BOOL(SCM_ILOCP (obj));
}
#undef FUNC_NAME
SCM_DEFINE (scm_memcons, "memcons", 2, 1, 0,
(SCM car, SCM cdr, SCM env),
"Return a new memoized cons cell with @var{car} and @var{cdr}\n"

View file

@ -170,8 +170,6 @@ SCM_API SCM scm_make_debugobj (scm_t_debug_frame *debug);
SCM_API void scm_init_debug (void);
#ifdef GUILE_DEBUG
SCM_API SCM scm_make_iloc (SCM frame, SCM binding, SCM cdrp);
SCM_API SCM scm_iloc_p (SCM obj);
SCM_API SCM scm_memcons (SCM car, SCM cdr, SCM env);
SCM_API SCM scm_mem_to_proc (SCM obj);
SCM_API SCM scm_proc_to_mem (SCM obj);

View file

@ -27,6 +27,13 @@
#if (SCM_ENABLE_DEPRECATED == 1)
/* From eval.h: Macros for handling ilocs. These were deprecated in guile
* 1.7.0 on 2003-06-04. */
#define SCM_ILOC00 SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
#define SCM_IDINC (0x00100000L)
#define SCM_IDSTMSK (-SCM_IDINC)
/* From eval.h: Error messages of the evaluator. These were deprecated in
* guile 1.7.0 on 2003-06-02. */
SCM_API const char scm_s_expression[];

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)) \

View file

@ -59,21 +59,12 @@ SCM_API SCM scm_eval_options_interface (SCM setting);
*
*/
#define SCM_ILOCP(n) (SCM_ITAG8(n)==scm_tc8_iloc)
#define SCM_ILOC00 SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
#define SCM_IDINC (0x00100000L)
#define SCM_ICDR (0x00080000L)
#define SCM_IFRINC (0x00000100L)
#define SCM_IDSTMSK (-SCM_IDINC)
#define SCM_IFRAME(n) ((long)((SCM_ICDR-SCM_IFRINC)>>8) \
& (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 )

View file

@ -325,7 +325,7 @@ scm_i_init_card_freelist (scm_t_cell * card, SCM *free_list,
}
#if (SCM_DEBUG_DEBUGGER_SUPPORT == 1)
#if (SCM_DEBUG_DEBUGGING_SUPPORT == 1)
typedef struct scm_dbg_t_list_cell {
scm_t_bits car;