pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:21:   #include "main.h"   #include "pike_memory.h"   #include "gc.h"   #include "threads.h"   #include "constants.h"   #include "operators.h"   #include "builtin_functions.h"   #include "stuff.h"   #include "mapping.h"   #include "cyclic.h" - #include "pike_security.h" +    #include "pike_types.h"   #include "opcodes.h"   #include "version.h"   #include "block_allocator.h"   #include "block_alloc.h"   #include "pikecode.h"   #include "pike_compiler.h"   #include "module_support.h"   #include "bitvector.h"   
pike.git/src/program.c:2859:      struct program *low_allocate_program(void)   {    struct program *p=alloc_program();    memset(p, 0, sizeof(struct program));    p->flags|=PROGRAM_VIRGIN;    p->alignment_needed=1;       GC_ALLOC(p);    p->id=++current_program_id; -  INIT_PIKE_MEMOBJ(p, T_PROGRAM); +  p->refs=1;       DOUBLELINK(first_program, p);    ACCURATE_GETTIMEOFDAY(& p->timestamp);    return p;   }      /*    * Start building a new program    */   void low_start_new_program(struct program *p,
pike.git/src/program.c:2984:    Pike_compiler->fake_object->prev=Pike_compiler->fake_object;    Pike_compiler->fake_object->refs=0;    add_ref(Pike_compiler->fake_object); /* For DMALLOC... */    Pike_compiler->fake_object->prog=p;    add_ref(p);      #ifdef PIKE_DEBUG    Pike_compiler->fake_object->program_id=p->id;   #endif    - #ifdef PIKE_SECURITY -  Pike_compiler->fake_object->prot=0; - #endif -  +     debug_malloc_touch(Pike_compiler->fake_object);    debug_malloc_touch(Pike_compiler->fake_object->storage);       if (Pike_compiler->fake_object->storage) {    if(name)    {    /* Fake objects have parents regardless of PROGRAM_USES_PARENT */    if((((struct parent_info *)Pike_compiler->fake_object->storage)->parent=Pike_compiler->previous->fake_object))    add_ref(Pike_compiler->previous->fake_object);    ((struct parent_info *)Pike_compiler->fake_object->storage)->parent_identifier=id;
pike.git/src/program.c:3293:    mexec_free((char *)p->NAME); p->NAME=0; \    }   #endif /* PIKE_USE_MACHINE_CODE */   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    if(p->NAME) { \    dmfree((char *)p->NAME); p->NAME=0; \    }   #include "program_areas.h"    }    -  EXIT_PIKE_MEMOBJ(p); -  +     GC_FREE(p);   }      #ifdef PIKE_DEBUG   void dump_program_desc(struct program *p)   {    int e,d,q;   /* fprintf(stderr,"Program '%s':\n",p->name->str); */       fprintf(stderr,"$$$$$ dump_program_desc for %p\n", p);