diff --git a/libguile/ChangeLog b/libguile/ChangeLog index b1c43c756..d78fd3fe7 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,14 @@ +2001-09-15 Gary Houston + + * root.h (scm_root_state): removed the continuation_stack and + continuation_stack_ptr members, which have no apparent purpose. + (scm_continuation_stack, scm_continuation_stack_ptr): #defines + removed. + * root.c (root_mark), init.c (restart_stack, start_stack), gc + (scm_igc): remove all references to contination_stack and + continuation_stack_ptr, avoiding allocation of a vector and + useless processing during gc. + 2001-09-13 Dirk Herrmann * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc. diff --git a/libguile/gc.c b/libguile/gc.c index 5629e9605..f10e33350 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -1074,21 +1074,6 @@ scm_igc (const char *what) ++scm_gc_heap_lock; - /* flush dead entries from the continuation stack */ - { - long x; - long bound; - SCM * elts; - elts = SCM_VELTS (scm_continuation_stack); - bound = SCM_VECTOR_LENGTH (scm_continuation_stack); - x = SCM_INUM (scm_continuation_stack_ptr); - while (x < bound) - { - elts[x] = SCM_BOOL_F; - ++x; - } - } - scm_c_hook_run (&scm_before_mark_c_hook, 0); clear_mark_space (); diff --git a/libguile/init.c b/libguile/init.c index f768cc7d9..5c96be4dc 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -162,7 +162,6 @@ restart_stack (void *base) SCM_DFRAME (scm_rootcont) = scm_last_debug_frame = 0; #endif SCM_BASE (scm_rootcont) = base; - scm_continuation_stack_ptr = SCM_MAKINUM (0); } static void @@ -187,13 +186,6 @@ start_stack (void *base) contregs->seq = 0; SCM_NEWSMOB (scm_rootcont, scm_tc16_continuation, contregs); } - /* The root continuation is further initialized by restart_stack. */ - - /* Create the look-aside stack for variables that are shared between - * captured continuations. - */ - scm_continuation_stack = scm_c_make_vector (512, SCM_UNDEFINED); - /* The continuation stack is further initialized by restart_stack. */ /* The remainder of stack initialization is factored out to another * function so that if this stack is ever exitted, it can be diff --git a/libguile/root.c b/libguile/root.c index 26a914948..e55c393a1 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -73,8 +73,6 @@ root_mark (SCM root) scm_gc_mark (s->rootcont); scm_gc_mark (s->dynwinds); - scm_gc_mark (s->continuation_stack); - scm_gc_mark (s->continuation_stack_ptr); scm_gc_mark (s->progargs); scm_gc_mark (s->exitval); scm_gc_mark (s->cur_inp); @@ -122,8 +120,6 @@ scm_make_root (SCM parent) /* Initialize everything right now, in case a GC happens early. */ root_state->rootcont = root_state->dynwinds - = root_state->continuation_stack - = root_state->continuation_stack_ptr = root_state->progargs = root_state->exitval = root_state->cur_inp diff --git a/libguile/root.h b/libguile/root.h index c3f83ed28..995ff14d3 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -89,8 +89,6 @@ typedef struct scm_root_state SCM rootcont; SCM dynwinds; - SCM continuation_stack; - SCM continuation_stack_ptr; #ifdef DEBUG_EXTENSIONS /* It is very inefficient to have this variable in the root state. */ scm_t_debug_frame *last_debug_frame; @@ -119,8 +117,6 @@ typedef struct scm_root_state #define scm_rootcont (scm_root->rootcont) #define scm_dynwinds (scm_root->dynwinds) -#define scm_continuation_stack (scm_root->continuation_stack) -#define scm_continuation_stack_ptr (scm_root->continuation_stack_ptr) #define scm_progargs (scm_root->progargs) #ifdef USE_THREADS #define scm_last_debug_frame (scm_root->last_debug_frame)