diff options
author | Marius Vollmer <mvo@zagadka.de> | 2001-07-26 21:40:18 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2001-07-26 21:40:18 +0000 |
commit | 904a077df1a670d386ca114ddb7a8e371684f655 (patch) | |
tree | 62ba0cc7b9226c16c662cf884cb2b6c440529df4 /libguile/dynwind.c | |
parent | 5b54c4daa124b0d9f9b984f0bf1733ac5ebba4d3 (diff) | |
download | guile-904a077df1a670d386ca114ddb7a8e371684f655.tar.gz |
* tags.h: Update tag system docs.
(scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
(scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
(SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
or SCM_NCONSP, respectively.
* struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
* print.c (scm_iprin1): Remove printing of glocs. Do not try to
tell glocs from structs.
* gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
* eval.c (scm_m_atbind): Make a list of variables, not glocs.
(scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
instead of with glocs.
(EVALCAR): Do not test for glocs.
(scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
condition.
(scm_unmemocar): Do not handle glocs.
(scm_m_atfop): Memoize as a variable, not as a gloc.
(scm_eval_args, scm_deval_args): Do not handle glocs.
(scm_ceval, scm_deval): Likewise.
* eval.h (SCM_XEVALCAR): Do not test for glocs.
(SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
Removed.
* debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
* dynwind.c (scm_swap_bindings): Likewise.
(scm_dowinds): Updated to recognize lists of variables instead of
lists of glocs.
* __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
Diffstat (limited to 'libguile/dynwind.c')
-rw-r--r-- | libguile/dynwind.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/libguile/dynwind.c b/libguile/dynwind.c index 6a32797cc..889c0d4fb 100644 --- a/libguile/dynwind.c +++ b/libguile/dynwind.c @@ -185,15 +185,15 @@ SCM_DEFINE (scm_wind_chain, "wind-chain", 0, 0, 0, #endif static void -scm_swap_bindings (SCM glocs, SCM vals) +scm_swap_bindings (SCM vars, SCM vals) { SCM tmp; while (SCM_NIMP (vals)) { - tmp = SCM_GLOC_VAL (SCM_CAR (glocs)); - SCM_GLOC_SET_VAL (SCM_CAR (glocs), SCM_CAR (vals)); + tmp = SCM_VARIABLE_REF (SCM_CAR (vars)); + SCM_VARIABLE_SET (SCM_CAR (vars), SCM_CAR (vals)); SCM_SETCAR (vals, tmp); - glocs = SCM_CDR (glocs); + vars = SCM_CDR (vars); vals = SCM_CDR (vals); } } @@ -219,13 +219,16 @@ scm_dowinds (SCM to, long delta) #endif { wind_key = SCM_CAR (wind_elt); - /* key = #t | symbol | thunk | list of glocs | list of fluids */ + /* key = #t | symbol | thunk | list of variables | list of fluids */ if (SCM_NIMP (wind_key)) { - if (SCM_TYP3 (wind_key) == scm_tc3_cons_gloc) - scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); - else if (SCM_TYP3 (wind_key) == scm_tc3_cons) - scm_swap_fluids (wind_key, SCM_CDR (wind_elt)); + if (SCM_CONSP (wind_key)) + { + if (SCM_VARIABLEP (SCM_CAR (wind_key))) + scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); + else if (SCM_FLUIDP (SCM_CAR (wind_key))) + scm_swap_fluids (wind_key, SCM_CDR (wind_elt)); + } else if (SCM_GUARDSP (wind_key)) SCM_BEFORE_GUARD (wind_key) (SCM_GUARD_DATA (wind_key)); else if (SCM_TYP3 (wind_key) == scm_tc3_closure) @@ -254,10 +257,13 @@ scm_dowinds (SCM to, long delta) wind_key = SCM_CAR (wind_elt); if (SCM_NIMP (wind_key)) { - if (SCM_TYP3 (wind_key) == scm_tc3_cons_gloc) - scm_swap_bindings (wind_key, from); - else if (SCM_TYP3 (wind_key) == scm_tc3_cons) - scm_swap_fluids_reverse (wind_key, from); + if (SCM_CONSP (wind_key)) + { + if (SCM_VARIABLEP (SCM_CAR (wind_key))) + scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); + else if (SCM_FLUIDP (SCM_CAR (wind_key))) + scm_swap_fluids_reverse (wind_key, SCM_CDR (wind_elt)); + } else if (SCM_GUARDSP (wind_key)) SCM_AFTER_GUARD (wind_key) (SCM_GUARD_DATA (wind_key)); else if (SCM_TYP3 (wind_key) == scm_tc3_closure) |