diff options
author | Gary Houston <ghouston@arglist.com> | 2000-11-25 16:58:25 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 2000-11-25 16:58:25 +0000 |
commit | 5f144b105db0dcbe3b33947317d3e9b98cbd5269 (patch) | |
tree | b2491ba314e94a35b79871c086523d79192f5e91 /libguile/stacks.c | |
parent | 7f555fb4ed423ad783c961bed500c19d3159886a (diff) | |
download | guile-5f144b105db0dcbe3b33947317d3e9b98cbd5269.tar.gz |
* 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.
Diffstat (limited to 'libguile/stacks.c')
-rw-r--r-- | libguile/stacks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/stacks.c b/libguile/stacks.c index c048d94cd..e3de7eb23 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -433,7 +433,7 @@ SCM_DEFINE (scm_make_stack, "make-stack", 1, 0, 1, SCM_ASSERT (SCM_NIMP (obj), obj, SCM_ARG1, FUNC_NAME); if (SCM_DEBUGOBJP (obj)) dframe = (scm_debug_frame *) SCM_DEBUGOBJ_FRAME (obj); - else if (scm_tc7_contin == SCM_TYP7 (obj)) + else if (SCM_CONTINUATIONP (obj)) { offset = ((SCM_STACKITEM *) ((char *) SCM_CONTREGS (obj) + sizeof (scm_contregs)) - SCM_BASE (obj)); @@ -517,7 +517,7 @@ SCM_DEFINE (scm_stack_id, "stack-id", 1, 0, 0, SCM_VALIDATE_NIM (1,stack); if (SCM_DEBUGOBJP (stack)) dframe = (scm_debug_frame *) SCM_DEBUGOBJ_FRAME (stack); - else if (scm_tc7_contin == SCM_TYP7 (stack)) + else if (SCM_CONTINUATIONP (stack)) { offset = ((SCM_STACKITEM *) ((char *) SCM_CONTREGS (stack) + sizeof (scm_contregs)) - SCM_BASE (stack)); @@ -587,7 +587,7 @@ SCM_DEFINE (scm_last_stack_frame, "last-stack-frame", 1, 0, 0, SCM_VALIDATE_NIM (1,obj); if (SCM_DEBUGOBJP (obj)) dframe = (scm_debug_frame *) SCM_DEBUGOBJ_FRAME (obj); - else if (scm_tc7_contin == SCM_TYP7 (obj)) + else if (SCM_CONTINUATIONP (obj)) { offset = ((SCM_STACKITEM *) ((char *) SCM_CONTREGS (obj) + sizeof (scm_contregs)) - SCM_BASE (obj)); |