Branch: Tag:

2000-07-18

2000-07-18 05:48:20 by Martin Stjernholm <mast@lysator.liu.se>

Fixed tricky gc problems by implementing a gc-tailored call stack that can
be rotated. That also made the whole thing quite a bit less hairy.

Rev: src/array.c:1.78
Rev: src/array.h:1.21
Rev: src/gc.c:1.107
Rev: src/gc.h:1.55
Rev: src/mapping.c:1.93
Rev: src/mapping.h:1.27
Rev: src/multiset.c:1.25
Rev: src/multiset.h:1.13
Rev: src/object.c:1.136
Rev: src/object.h:1.49
Rev: src/program.c:1.251
Rev: src/program.h:1.96
Rev: src/svalue.c:1.84
Rev: src/testsuite.in:1.314

16:   #include "gc.h"   #include "security.h"    - RCSID("$Id: multiset.c,v 1.24 2000/07/11 03:45:10 mast Exp $"); + RCSID("$Id: multiset.c,v 1.25 2000/07/18 05:48:20 mast Exp $");      struct multiset *first_multiset;   
307:    }   }    - void real_gc_cycle_check_multiset(struct multiset *l) + void real_gc_cycle_check_multiset(struct multiset *l, int weak)   { -  GC_CYCLE_ENTER(l, 0) { -  gc_cycle_check_array(l->ind); +  GC_CYCLE_ENTER(l, weak) { +  gc_cycle_check_array(l->ind, 0);    } GC_CYCLE_LEAVE;   }    - void real_gc_cycle_check_multiset_weak(struct multiset *l) - { -  GC_CYCLE_ENTER(l, 1) { -  gc_cycle_check_array(l->ind); -  } GC_CYCLE_LEAVE; - } -  +    #ifdef PIKE_DEBUG   unsigned gc_touch_all_multisets(void)   {
360:   {    struct multiset *l;    for (l = gc_internal_multiset; l; l = l->next) { -  real_gc_cycle_check_multiset(l); -  run_lifo_queue(&gc_mark_queue); +  real_gc_cycle_check_multiset(l, 0); +  gc_cycle_run_queue();    }   }   
369:   {    struct multiset *l,*next;    -  /* No gc_ext_weak_refs stuff here; it's been taken care of by -  * gc_free_all_unreferenced_arrays(). */ -  +     for(l=gc_internal_multiset;l;l=next)    {    if(gc_do_free(l))