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

* dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'

argument since it is always zero now.  Changed all callers.
Removed code for handling fluids.
This commit is contained in:
Marius Vollmer 2004-01-07 20:21:30 +00:00
parent 96e3b2f808
commit 14578fa4ea
3 changed files with 11 additions and 23 deletions

View file

@ -239,8 +239,7 @@ copy_stack_and_call (scm_t_contregs *continuation, SCM val,
delta = scm_ilength (scm_dynwinds) - scm_ilength (continuation->dynenv);
data.continuation = continuation;
data.dst = dst;
scm_i_dowinds (continuation->dynenv, delta, 0,
copy_stack, &data);
scm_i_dowinds (continuation->dynenv, delta, copy_stack, &data);
scm_last_debug_frame = continuation->dframe;

View file

@ -136,9 +136,9 @@ static scm_t_bits tc16_frame;
#define FRAME_REWINDABLE_P(f) (SCM_CELL_WORD_0(f) & FRAME_F_REWINDABLE)
static scm_t_bits tc16_winder;
#define WINDER_P(w) SCM_SMOB_PREDICATE (tc16_winder, (w))
#define WINDER_PROC(w) ((void (*)(void *))SCM_CELL_WORD_1 (w))
#define WINDER_DATA(w) ((void *)SCM_CELL_WORD_2 (w))
#define WINDER_P(w) SCM_SMOB_PREDICATE (tc16_winder, (w))
#define WINDER_PROC(w) ((void (*)(void *))SCM_CELL_WORD_1 (w))
#define WINDER_DATA(w) ((void *)SCM_CELL_WORD_2 (w))
#define WINDER_F_EXPLICIT (1 << 16)
#define WINDER_F_REWIND (1 << 17)
@ -263,12 +263,11 @@ scm_swap_bindings (SCM vars, SCM vals)
void
scm_dowinds (SCM to, long delta)
{
scm_i_dowinds (to, delta, 0, NULL, NULL);
scm_i_dowinds (to, delta, NULL, NULL);
}
void
scm_i_dowinds (SCM to, long delta, int explicit,
void (*turn_func) (void *), void *data)
scm_i_dowinds (SCM to, long delta, void (*turn_func) (void *), void *data)
{
tail:
if (SCM_EQ_P (to, scm_dynwinds))
@ -281,8 +280,7 @@ scm_i_dowinds (SCM to, long delta, int explicit,
SCM wind_elt;
SCM wind_key;
scm_i_dowinds (SCM_CDR (to), 1 + delta, explicit,
turn_func, data);
scm_i_dowinds (SCM_CDR (to), 1 + delta, turn_func, data);
wind_elt = SCM_CAR (to);
#if 0
@ -303,11 +301,7 @@ scm_i_dowinds (SCM to, long delta, int explicit,
else if (WINDER_P (wind_elt))
{
if (WINDER_REWIND_P (wind_elt))
{
void (*proc) (void *) = WINDER_PROC (wind_elt);
void *data = WINDER_DATA (wind_elt);
proc (data);
}
WINDER_PROC (wind_elt) (WINDER_DATA (wind_elt));
}
else
{
@ -349,13 +343,8 @@ scm_i_dowinds (SCM to, long delta, int explicit,
}
else if (WINDER_P (wind_elt))
{
if (!WINDER_REWIND_P (wind_elt)
&& (!explicit || WINDER_EXPLICIT_P (wind_elt)))
{
void (*proc) (void *) = WINDER_PROC (wind_elt);
void *data = WINDER_DATA (wind_elt);
proc (data);
}
if (!WINDER_REWIND_P (wind_elt))
WINDER_PROC (wind_elt) (WINDER_DATA (wind_elt));
}
else
{

View file

@ -36,7 +36,7 @@ SCM_API SCM scm_internal_dynamic_wind (scm_t_guard before,
void *inner_data,
void *guard_data);
SCM_API void scm_dowinds (SCM to, long delta);
SCM_API void scm_i_dowinds (SCM to, long delta, int explicit,
SCM_API void scm_i_dowinds (SCM to, long delta,
void (*turn_func) (void *), void *data);
SCM_API void scm_init_dynwind (void);