* use an applicable SMOB to represent continuations, instead of a
authorGary Houston <ghouston@arglist.com>
Sat, 25 Nov 2000 16:58:25 +0000 (16:58 +0000)
committerGary Houston <ghouston@arglist.com>
Sat, 25 Nov 2000 16:58:25 +0000 (16:58 +0000)
commit5f144b105db0dcbe3b33947317d3e9b98cbd5269
treeb2491ba314e94a35b79871c086523d79192f5e91
parent7f555fb4ed423ad783c961bed500c19d3159886a
* use an applicable SMOB to represent continuations, instead of a
custom tc7 type.  This will make it easier to support R5RS
multiple value continuations, without the use of a Scheme-level
wrapper.

* continuations.c (scm_tc16_continuation, continuation_mark,
continuation_free, continuation_print, continuation_apply):
new SMOB support.
(scm_make_continuation): new procedure, replaces scm_make_cont
with a different interface.
(copy_stack_and_call, scm_dynthrow, scm_init_continuations): rewritten.
(CHEAP_CONTINUATIONS): removed non-working code completely.
(scm_call_continuation): removed.
* continuations.h (struct scm_contregs): add num_stack_items and
stack fields.  previously stack was stored following this struct:
use a tail array instead.
(SCM_CONTINUATIONP): new macro.
(SCM_CONTINUATION_LENGTH, SCM_SET_CONTINUATION_LENGTH):
rewritten.
(SCM_SET_CONTREGS): removed.
* tags.h: removed scm_tc7_contin (was tag 61).
* debug.c, gc.c, hash.c, print.c, procprop.c, procs.c:
removed scm_tc7_contin support.
* eval.c: use scm_make_continuation instead of scm_make_cont.
don't set jump buffers here.  remove scm_tc7_contin support.
* init.c, root.c: create SMOB continuation for rootcont instead
of scm_tc7_contin.  call scm_init_continuations before
scm_init_root.
* root.c: remove support for static jmpbuf.  It's not used by
default and I broke it.  create SMOB continuation for rootcont.
* stacks.c: use SCM_CONTINUATIONP.
14 files changed:
libguile/ChangeLog
libguile/continuations.c
libguile/continuations.h
libguile/debug.c
libguile/eval.c
libguile/gc.c
libguile/hash.c
libguile/init.c
libguile/print.c
libguile/procprop.c
libguile/procs.c
libguile/root.c
libguile/stacks.c
libguile/tags.h