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

* debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and

CHECK_EXIT and removed all references to them.
This commit is contained in:
Dirk Herrmann 2002-03-25 23:45:02 +00:00
parent 680516ba5f
commit 5132eef0cf
4 changed files with 60 additions and 45 deletions

5
NEWS
View file

@ -105,6 +105,11 @@ had problems because with them allocation and initialization was separated and
the GC could sometimes observe half initialized cells. Only careful coding by the GC could sometimes observe half initialized cells. Only careful coding by
the user of SCM_NEWCELL and SCM_NEWCELL2 could make this safe and efficient. the user of SCM_NEWCELL and SCM_NEWCELL2 could make this safe and efficient.
** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
instead.
** Removed definitions: scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, ** 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, 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, scm_debug_newcell2, scm_tc16_allocated, scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2, scm_tc16_allocated,

View file

@ -1,3 +1,8 @@
2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
* debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
CHECK_EXIT and removed all references to them.
2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de> 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
* debug.h (scm_ready_p, debug_print): Removed declarations. * debug.h (scm_ready_p, debug_print): Removed declarations.

View file

@ -3,7 +3,7 @@
#ifndef SCM_DEBUG_H #ifndef SCM_DEBUG_H
#define SCM_DEBUG_H #define SCM_DEBUG_H
/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc. /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -93,19 +93,16 @@ SCM_API int scm_check_entry_p;
SCM_API int scm_check_apply_p; SCM_API int scm_check_apply_p;
SCM_API int scm_check_exit_p; SCM_API int scm_check_exit_p;
#define CHECK_ENTRY scm_check_entry_p
#define CHECK_APPLY scm_check_apply_p
#define CHECK_EXIT scm_check_exit_p
#define SCM_RESET_DEBUG_MODE \ #define SCM_RESET_DEBUG_MODE \
do {\ do {\
CHECK_ENTRY = (SCM_ENTER_FRAME_P || SCM_BREAKPOINTS_P)\ scm_check_entry_p = (SCM_ENTER_FRAME_P || SCM_BREAKPOINTS_P)\
&& !SCM_FALSEP (SCM_ENTER_FRAME_HDLR);\ && !SCM_FALSEP (SCM_ENTER_FRAME_HDLR);\
CHECK_APPLY = (SCM_APPLY_FRAME_P || SCM_TRACE_P)\ scm_check_apply_p = (SCM_APPLY_FRAME_P || SCM_TRACE_P)\
&& !SCM_FALSEP (SCM_APPLY_FRAME_HDLR);\ && !SCM_FALSEP (SCM_APPLY_FRAME_HDLR);\
CHECK_EXIT = (SCM_EXIT_FRAME_P || SCM_TRACE_P)\ scm_check_exit_p = (SCM_EXIT_FRAME_P || SCM_TRACE_P)\
&& !SCM_FALSEP (SCM_EXIT_FRAME_HDLR);\ && !SCM_FALSEP (SCM_EXIT_FRAME_HDLR);\
scm_debug_mode = SCM_DEVAL_P || CHECK_ENTRY || CHECK_APPLY || CHECK_EXIT;\ scm_debug_mode = SCM_DEVAL_P\
|| scm_check_entry_p || scm_check_apply_p || scm_check_exit_p;\
scm_ceval_ptr = scm_debug_mode ? scm_deval : scm_ceval;\ scm_ceval_ptr = scm_debug_mode ? scm_deval : scm_ceval;\
} while (0) } while (0)
@ -212,6 +209,12 @@ SCM_API SCM scm_proc_to_mem (SCM obj);
SCM_API SCM scm_debug_hang (SCM obj); SCM_API SCM scm_debug_hang (SCM obj);
#endif /*GUILE_DEBUG*/ #endif /*GUILE_DEBUG*/
#if SCM_ENABLE_DEPRECATED == 1
#define CHECK_ENTRY scm_check_entry_p
#define CHECK_APPLY scm_check_apply_p
#define CHECK_EXIT scm_check_exit_p
#endif
#endif /* SCM_DEBUG_H */ #endif /* SCM_DEBUG_H */
/* /*

View file

@ -1670,7 +1670,7 @@ scm_eval_body (SCM code, SCM env)
#define ENTER_APPLY \ #define ENTER_APPLY \
do { \ do { \
SCM_SET_ARGSREADY (debug);\ SCM_SET_ARGSREADY (debug);\
if (CHECK_APPLY && SCM_TRAPS_P)\ if (scm_check_apply_p && SCM_TRAPS_P)\
if (SCM_APPLY_FRAME_P || (SCM_TRACE_P && PROCTRACEP (proc)))\ if (SCM_APPLY_FRAME_P || (SCM_TRACE_P && PROCTRACEP (proc)))\
{\ {\
SCM tmp, tail = SCM_BOOL(SCM_TRACED_FRAME_P (debug)); \ SCM tmp, tail = SCM_BOOL(SCM_TRACED_FRAME_P (debug)); \
@ -1937,39 +1937,41 @@ loop:
start: start:
debug.info->e.exp = x; debug.info->e.exp = x;
debug.info->e.env = env; debug.info->e.env = env;
if (CHECK_ENTRY && SCM_TRAPS_P) if (scm_check_entry_p && SCM_TRAPS_P)
if (SCM_ENTER_FRAME_P || (SCM_BREAKPOINTS_P && SRCBRKP (x))) {
{ if (SCM_ENTER_FRAME_P || (SCM_BREAKPOINTS_P && SRCBRKP (x)))
SCM tail = SCM_BOOL(SCM_TAILRECP (debug)); {
SCM_SET_TAILREC (debug); SCM tail = SCM_BOOL(SCM_TAILRECP (debug));
if (SCM_CHEAPTRAPS_P) SCM_SET_TAILREC (debug);
arg1 = scm_make_debugobj (&debug); if (SCM_CHEAPTRAPS_P)
else arg1 = scm_make_debugobj (&debug);
{ else
int first; {
SCM val = scm_make_continuation (&first); int first;
SCM val = scm_make_continuation (&first);
if (first)
arg1 = val; if (first)
else arg1 = val;
{ else
x = val; {
if (SCM_IMP (x)) x = val;
RETURN (x); if (SCM_IMP (x))
else RETURN (x);
/* This gives the possibility for the debugger to else
modify the source expression before evaluation. */ /* This gives the possibility for the debugger to
goto dispatch; modify the source expression before evaluation. */
} goto dispatch;
} }
SCM_TRAPS_P = 0; }
scm_call_4 (SCM_ENTER_FRAME_HDLR, SCM_TRAPS_P = 0;
scm_sym_enter_frame, scm_call_4 (SCM_ENTER_FRAME_HDLR,
arg1, scm_sym_enter_frame,
tail, arg1,
scm_unmemocopy (x, env)); tail,
SCM_TRAPS_P = 1; scm_unmemocopy (x, env));
} SCM_TRAPS_P = 1;
}
}
#endif #endif
#if defined (USE_THREADS) || defined (DEVAL) #if defined (USE_THREADS) || defined (DEVAL)
dispatch: dispatch:
@ -3327,7 +3329,7 @@ evapply: /* inputs: x, proc */
} }
#ifdef DEVAL #ifdef DEVAL
exit: exit:
if (CHECK_EXIT && SCM_TRAPS_P) if (scm_check_exit_p && SCM_TRAPS_P)
if (SCM_EXIT_FRAME_P || (SCM_TRACE_P && SCM_TRACED_FRAME_P (debug))) if (SCM_EXIT_FRAME_P || (SCM_TRACE_P && SCM_TRACED_FRAME_P (debug)))
{ {
SCM_CLEAR_TRACED_FRAME (debug); SCM_CLEAR_TRACED_FRAME (debug);
@ -3789,7 +3791,7 @@ tail:
} }
#ifdef DEVAL #ifdef DEVAL
exit: exit:
if (CHECK_EXIT && SCM_TRAPS_P) if (scm_check_exit_p && SCM_TRAPS_P)
if (SCM_EXIT_FRAME_P || (SCM_TRACE_P && SCM_TRACED_FRAME_P (debug))) if (SCM_EXIT_FRAME_P || (SCM_TRACE_P && SCM_TRACED_FRAME_P (debug)))
{ {
SCM_CLEAR_TRACED_FRAME (debug); SCM_CLEAR_TRACED_FRAME (debug);