mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-03 13:20:26 +02:00
Fix continuation marking, and some tests.
* libguile/continuations.c (continuation_mark): Mark the vm continuations. * libguile/vm.c (vm_cont_mark): Fix the marking function. (vm_mark): Fix this one too -- the size is a number of STACKITEMS, which we foolishly assume are the same size as SCM. * test-suite/tests/ftw.test: Make our stat hacks verifyable without assuming that they are interpreted. * test-suite/tests/r5rs_pitfall.test: Re-indent.
This commit is contained in:
parent
107139eaad
commit
7ff017002d
4 changed files with 28 additions and 28 deletions
|
@ -51,6 +51,7 @@ continuation_mark (SCM obj)
|
|||
|
||||
scm_gc_mark (continuation->root);
|
||||
scm_gc_mark (continuation->throw_value);
|
||||
scm_gc_mark (continuation->vm_conts);
|
||||
scm_mark_locations (continuation->stack, continuation->num_stack_items);
|
||||
#ifdef __ia64__
|
||||
if (continuation->backing_store)
|
||||
|
|
|
@ -80,16 +80,14 @@ struct scm_vm_cont {
|
|||
static SCM
|
||||
vm_cont_mark (SCM obj)
|
||||
{
|
||||
scm_t_ptrdiff i, size;
|
||||
size_t size;
|
||||
SCM *stack;
|
||||
|
||||
stack = SCM_VM_CONT_DATA (obj)->stack_base;
|
||||
size = SCM_VM_CONT_DATA (obj)->stack_size;
|
||||
|
||||
/* we could be smarter about this. */
|
||||
for (i = 0; i < size; i ++)
|
||||
if (SCM_NIMP (stack[i]))
|
||||
scm_gc_mark (stack[i]);
|
||||
scm_mark_locations ((SCM_STACKITEM *) stack, size);
|
||||
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
|
@ -333,7 +331,7 @@ vm_mark (SCM obj)
|
|||
|
||||
/* mark the stack conservatively */
|
||||
scm_mark_locations ((SCM_STACKITEM *) vp->stack_base,
|
||||
sizeof (SCM) * (vp->sp - vp->stack_base + 1));
|
||||
vp->sp - vp->stack_base + 1);
|
||||
|
||||
/* mark other objects */
|
||||
for (i = 0; i < SCM_VM_NUM_HOOKS; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue