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.471 2003/01/09 18:59:00 grubba Exp $ + || $Id: program.c,v 1.472 2003/01/11 00:01:20 mast Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.471 2003/01/09 18:59:00 grubba Exp $"); + RCSID("$Id: program.c,v 1.472 2003/01/11 00:01:20 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:6227:    gc_recurse_svalues(f->locals,f->num_locals);    if(f->scope) gc_recurse_frame(f->scope);   }      static void gc_recurse_trampoline(struct object *o)   {    if (THIS->frame) gc_recurse_frame(THIS->frame);   }       - /* This placeholder should is used + /* This placeholder should be used    * in the first compiler pass to take the place    * of unknown things    */   struct program *placeholder_program;   struct object *placeholder_object;      void placeholder_index(INT32 args)   {    pop_n_elems(args);    ref_push_object(Pike_fp->current_object);
pike.git/src/program.c:6561: Inside #if defined(GC2)
  {    gc_mark_program_pos = first_program;    while (gc_mark_program_pos != gc_internal_program && gc_ext_weak_refs) {    struct program *p = gc_mark_program_pos;    gc_mark_program_pos = p->next;    gc_mark_program_as_referenced(p);    }    discard_queue(&gc_mark_queue);   }    - void gc_free_all_unreferenced_programs(void) + size_t gc_free_all_unreferenced_programs(void)   {    struct program *p,*next; -  +  size_t freed = 0;   #ifdef PIKE_DEBUG    int first = 1;   #endif       for(p=gc_internal_program;p;p=next)    {    debug_malloc_touch(p);       if(gc_do_free(p))    {
pike.git/src/program.c:6603: Inside #if defined(GC2)
   }    if(e && p->inherits[e].prog)    {    free_program(p->inherits[e].prog);    p->inherits[e].prog=0;    }    }       gc_free_extra_ref(p);    SET_NEXT_AND_FREE(p, free_program); +  freed++;   #ifdef PIKE_DEBUG    if (first) gc_internal_program = next;   #endif    }else{    next=p->next;   #ifdef PIKE_DEBUG    first = 0;   #endif    }    }
pike.git/src/program.c:6629: Inside #if defined(GC2) and #if defined(PIKE_DEBUG)
   Pike_fatal("gc_internal_program was bogus.\n");    for(e=0;e<p->num_constants;e++)    {    if(p->constants[e].sval.type == T_PROGRAM && p->constants[e].sval.u.program == p)    tmp++;    }    if(tmp >= p->refs)    gc_fatal(p, 1 ,"garbage collector failed to free program!!!\n");    }   #endif +  +  return freed;   }      #endif /* GC2 */         void push_compiler_frame(int lexical_scope)   {    struct compiler_frame *f;    f=ALLOC_STRUCT(compiler_frame);    f->previous=Pike_compiler->compiler_frame;