pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.612 2007/01/16 18:31:18 grubba Exp $ + || $Id: program.c,v 1.613 2007/04/25 22:02:07 mast Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:7522:    /* Strong ref follows. It must be last. */    if(p->parent)    gc_cycle_check_program(p->parent, 0);    }    } GC_CYCLE_LEAVE;   }      static void gc_check_program(struct program *p)   {    int e; - #ifdef PIKE_DEBUG -  extern void * check_for; - #endif +        debug_malloc_touch(p);       if (p->flags & PROGRAM_AVOID_CHECK) {    /* Program is in an inconsistent state.    * don't look closer at it.    */    debug_malloc_touch(p);    return;    }
pike.git/src/program.c:7553:       for(e=0;e<p->num_inherits;e++)    {    if(p->inherits[e].parent)    {    debug_gc_check (p->inherits[e].parent,    " as inherited parent object of a program");    }      #ifdef PIKE_DEBUG -  if(d_flag && p->inherits[e].name && check_for != (void *)(ptrdiff_t)1) +  if (Pike_in_gc == GC_PASS_LOCATE && p->inherits[e].name)    debug_gc_check (p->inherits[e].name, " as inherit name");   #endif       if(e && p->inherits[e].prog)    debug_gc_check (p->inherits[e].prog, " as inherited program of a program");    }    - #ifdef PIKE_DEBUG -  if(d_flag && check_for != (void *)(ptrdiff_t)1) + #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP) +  if (gc_keep_markers || Pike_in_gc == GC_PASS_LOCATE)    {    int e;    for(e=0;e<(int)p->num_strings;e++) -  debug_gc_check (p->strings[e], " as program string"); +  debug_gc_check (p->strings[e], " in the string storage of a program");       for(e=0;e<(int)p->num_identifiers;e++)    { -  debug_gc_check (p->identifiers[e].name, " as program identifier name"); -  debug_gc_check (p->identifiers[e].type, " as program identifier type"); +  debug_gc_check (p->identifiers[e].name, +  " as identifier name in a program"); +  debug_gc_check (p->identifiers[e].type, +  " as identifier type in a program");    }    }   #endif    } GC_LEAVE;   }      unsigned gc_touch_all_programs(void)   {    unsigned n = 0;    struct program *p;