Branch: Tag:

2000-07-04

2000-07-04 00:43:58 by Martin Stjernholm <mast@lysator.liu.se>

Expelled even the innocent zeroing of destructed object references from
the gc check pass. It's upsetting the debug checks, and it's cleaner to
do all zapping of refs in the mark/cycle check pass anyway.

Rev: src/array.c:1.74
Rev: src/gc.c:1.101
Rev: src/gc.h:1.53
Rev: src/mapping.c:1.90
Rev: src/object.c:1.131
Rev: src/svalue.c:1.81
Rev: src/svalue.h:1.60

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.89 2000/07/03 20:14:07 mast Exp $"); + RCSID("$Id: mapping.c,v 1.90 2000/07/04 00:43:57 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
1891:    else    NEW_MAPPING_LOOP(m->data)    { -  gc_mark_svalues(&k->ind, 1); -  gc_mark_svalues(&k->val, 1); +  if (gc_mark_svalues(&k->ind, 1) || +  gc_mark_svalues(&k->val, 1)) { + #ifdef PIKE_DEBUG +  fatal("Looks like check_mapping_for_destruct " +  "didn't do its job properly.\n"); + #endif    }    }    }    } -  + }      void low_gc_cycle_check_mapping(struct mapping *m)   {
1915:    else    NEW_MAPPING_LOOP(m->data)    { -  gc_cycle_check_svalues(&k->ind, 1); -  gc_cycle_check_svalues(&k->val, 1); +  if (gc_cycle_check_svalues(&k->ind, 1) || +  gc_cycle_check_svalues(&k->val, 1)) { + #ifdef PIKE_DEBUG +  fatal("Looks like check_mapping_for_destruct " +  "didn't do its job properly.\n"); + #endif    }    }    } -  + }      void real_gc_cycle_check_mapping(struct mapping *m)   {
1955:    continue;       debug_gc_check_weak_svalues(&k->ind, 1, T_MAPPING, m); -  m->data->val_types |= +     debug_gc_check_weak_svalues(&k->val, 1, T_MAPPING, m);    }    }
1970:    continue;       debug_gc_check_svalues(&k->ind, 1, T_MAPPING, m); -  m->data->val_types |= +     debug_gc_check_svalues(&k->val, 1, T_MAPPING, m);    }    }