pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.290 2007/06/10 18:11:13 mast Exp $ + || $Id: gc.c,v 1.291 2007/06/11 18:28:53 mast Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:2673:    }    if (!brokenly_refd && (r->rf_flags & GC_PREV_BROKEN)) {    CYCLE_DEBUG_MSG (r, "> gc_cycle_push, found broken");    brokenly_refd = r;    }    else    CYCLE_DEBUG_MSG (r, "> gc_cycle_push, search");    }    }    -  else { /* weak < 0 */ +  else if (weak < 0) {    struct gc_rec_frame *r;    CYCLE_DEBUG_MSG (cycle_frame, "gc_cycle_push, search strong");    /* Find the last weakly linked thing and the last one which    * isn't strongly linked. */    for (r = stack_top; r != cycle_frame; r = r->prev) {    CHECK_REC_STACK_FRAME (r);    DO_IF_DEBUG (link_search++);    if (r->rf_flags & GC_PREV_WEAK) {    CYCLE_DEBUG_MSG (r, "> gc_cycle_push, found weak");    weakly_refd = r;
pike.git/src/gc.c:2720:   #endif    }       if (weakly_refd) {    /* The backward link is normal or strong and there are one or    * more weak links in the cycle. Let's break it at the last    * one (to avoid having to clobber the others after the    * rotation). */    CYCLE_DEBUG_MSG (weakly_refd, "gc_cycle_push, weak break");    rotate_rec_stack (cycle_frame, weakly_refd); +  /* FIXME: Motivate why it isn't necessary to mark up new +  * cycle_id's here. */   #ifdef DEBUG_MALLOC    check_cycle_ids_on_stack (cycle_frame, weakly_refd, "after weak break");   #endif    }       else {    struct gc_rec_frame *cycle_id = cycle_frame->cycle_id;    struct gc_rec_frame *break_pos;       if (brokenly_refd) {