From f0ecc4980246b66a0eb1cbb5d4a35e898d63ff6e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 7 Feb 2006 17:30:41 +0000 Subject: [PATCH] set cont_key mark before capturing svn: r2158 --- src/mzscheme/src/fun.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mzscheme/src/fun.c b/src/mzscheme/src/fun.c index 2e37fa2312..79ad1648d8 100644 --- a/src/mzscheme/src/fun.c +++ b/src/mzscheme/src/fun.c @@ -2956,7 +2956,7 @@ static MZ_MARK_STACK_TYPE find_shareable_marks(int for_recycle) if (seg[pos].pos < MZ_CONT_MARK_POS) break; if (SAME_OBJ(seg[pos].key, cont_key) - || (for_recycle && SAME_OBJ(seg[pos].key, scheme_stack_dump_key))) + || (0 && for_recycle && SAME_OBJ(seg[pos].key, scheme_stack_dump_key))) delta++; else delta = 0; @@ -3057,6 +3057,9 @@ internal_call_cc (int argc, Scheme_Object *argv[]) } scheme_cont_capture_count++; + /* Set cont_key mark before capturing marks: */ + scheme_set_cont_mark(cont_key, (Scheme_Object *)cont); + if (p->cc_ok == thread_init_cc_ok) { /* This continuation can be used by other threads, so we need to track ownership of the runstack */ @@ -3106,8 +3109,6 @@ internal_call_cc (int argc, Scheme_Object *argv[]) scheme_flatten_config(scheme_current_config()); - scheme_set_cont_mark(cont_key, (Scheme_Object *)cont); - if (scheme_setjmpup_relative(&cont->buf, cont, p->next ? p->stack_start : p->o_start, sub_cont)) { /* We arrive here when the continuation is applied */ MZ_MARK_STACK_TYPE copied_cms = 0;