mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +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:
parent
680516ba5f
commit
5132eef0cf
4 changed files with 60 additions and 45 deletions
5
NEWS
5
NEWS
|
@ -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 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,
|
||||
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,
|
||||
|
|
|
@ -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>
|
||||
|
||||
* debug.h (scm_ready_p, debug_print): Removed declarations.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef 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
|
||||
* 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_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 \
|
||||
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);\
|
||||
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);\
|
||||
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_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;\
|
||||
} while (0)
|
||||
|
||||
|
@ -212,6 +209,12 @@ SCM_API SCM scm_proc_to_mem (SCM obj);
|
|||
SCM_API SCM scm_debug_hang (SCM obj);
|
||||
#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 */
|
||||
|
||||
/*
|
||||
|
|
|
@ -1670,7 +1670,7 @@ scm_eval_body (SCM code, SCM env)
|
|||
#define ENTER_APPLY \
|
||||
do { \
|
||||
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)))\
|
||||
{\
|
||||
SCM tmp, tail = SCM_BOOL(SCM_TRACED_FRAME_P (debug)); \
|
||||
|
@ -1937,39 +1937,41 @@ loop:
|
|||
start:
|
||||
debug.info->e.exp = x;
|
||||
debug.info->e.env = env;
|
||||
if (CHECK_ENTRY && SCM_TRAPS_P)
|
||||
if (SCM_ENTER_FRAME_P || (SCM_BREAKPOINTS_P && SRCBRKP (x)))
|
||||
{
|
||||
SCM tail = SCM_BOOL(SCM_TAILRECP (debug));
|
||||
SCM_SET_TAILREC (debug);
|
||||
if (SCM_CHEAPTRAPS_P)
|
||||
arg1 = scm_make_debugobj (&debug);
|
||||
else
|
||||
{
|
||||
int first;
|
||||
SCM val = scm_make_continuation (&first);
|
||||
|
||||
if (first)
|
||||
arg1 = val;
|
||||
else
|
||||
{
|
||||
x = val;
|
||||
if (SCM_IMP (x))
|
||||
RETURN (x);
|
||||
else
|
||||
/* This gives the possibility for the debugger to
|
||||
modify the source expression before evaluation. */
|
||||
goto dispatch;
|
||||
}
|
||||
}
|
||||
SCM_TRAPS_P = 0;
|
||||
scm_call_4 (SCM_ENTER_FRAME_HDLR,
|
||||
scm_sym_enter_frame,
|
||||
arg1,
|
||||
tail,
|
||||
scm_unmemocopy (x, env));
|
||||
SCM_TRAPS_P = 1;
|
||||
}
|
||||
if (scm_check_entry_p && SCM_TRAPS_P)
|
||||
{
|
||||
if (SCM_ENTER_FRAME_P || (SCM_BREAKPOINTS_P && SRCBRKP (x)))
|
||||
{
|
||||
SCM tail = SCM_BOOL(SCM_TAILRECP (debug));
|
||||
SCM_SET_TAILREC (debug);
|
||||
if (SCM_CHEAPTRAPS_P)
|
||||
arg1 = scm_make_debugobj (&debug);
|
||||
else
|
||||
{
|
||||
int first;
|
||||
SCM val = scm_make_continuation (&first);
|
||||
|
||||
if (first)
|
||||
arg1 = val;
|
||||
else
|
||||
{
|
||||
x = val;
|
||||
if (SCM_IMP (x))
|
||||
RETURN (x);
|
||||
else
|
||||
/* This gives the possibility for the debugger to
|
||||
modify the source expression before evaluation. */
|
||||
goto dispatch;
|
||||
}
|
||||
}
|
||||
SCM_TRAPS_P = 0;
|
||||
scm_call_4 (SCM_ENTER_FRAME_HDLR,
|
||||
scm_sym_enter_frame,
|
||||
arg1,
|
||||
tail,
|
||||
scm_unmemocopy (x, env));
|
||||
SCM_TRAPS_P = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined (USE_THREADS) || defined (DEVAL)
|
||||
dispatch:
|
||||
|
@ -3327,7 +3329,7 @@ evapply: /* inputs: x, proc */
|
|||
}
|
||||
#ifdef DEVAL
|
||||
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)))
|
||||
{
|
||||
SCM_CLEAR_TRACED_FRAME (debug);
|
||||
|
@ -3789,7 +3791,7 @@ tail:
|
|||
}
|
||||
#ifdef DEVAL
|
||||
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)))
|
||||
{
|
||||
SCM_CLEAR_TRACED_FRAME (debug);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue