pike.git / src / program.h

version» Context lines:

pike.git/src/program.h: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.h,v 1.257 2008/06/29 12:49:51 nilsson Exp $ + || $Id: program.h,v 1.258 2008/08/17 11:00:07 mast Exp $   */      #ifndef PROGRAM_H   #define PROGRAM_H      #include <stdarg.h>   #include "global.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "svalue.h"
pike.git/src/program.h:663:    debug_malloc_touch(_); \    DO_IF_DEBUG ( \    DO_IF_PIKE_CLEANUP ( \    if (gc_external_refs_zapped) \    gc_check_zapped (_, PIKE_T_PROGRAM, __FILE__, __LINE__))); \    if(!sub_ref(_)) \    really_free_program(_); \    }while(0)   #endif    + /* FIXME: Maybe try to replace free_program with this in the future to +  * catch more bugs, but there's code that requires the current one. */ + /* FIXME: Cleanup all the misguided "<foo> = NULL" in exit functions. */ + #define free_program_ptr(P) do { \ +  struct program **pp_ = &(P); \ +  free_program (*pp_); \ +  MARK_INVALID_PTR (*pp_); \ +  } while (0) +    BLOCK_ALLOC_FILL_PAGES(program, n/a);         extern struct program *first_program;   extern struct program *null_program;   extern struct program *compilation_env_program;   extern struct program *compilation_program;   extern struct object *compilation_environment;   extern struct program *pike_trampoline_program;   extern struct program *gc_internal_program;
pike.git/src/program.h:698:   #define COMPILER_IN_CATCH 1      #define ADD_STORAGE(X) low_add_storage(sizeof(X), ALIGNOF(X),0)      #define STORAGE_NEEDED(X) ((X)->storage_needed - (X)->inherits[0].storage_offset)      #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) void PIKE_CONCAT(add_to_,NAME(ARGTYPE ARG));   #include "program_areas.h"      typedef int supporter_callback (void *, int); +    struct Supporter   {   #ifdef PIKE_DEBUG    int magic;   #endif -  +     struct Supporter *previous; -  +  /* Makes up a linked list of supporters with the first one in +  * current_supporter. Supporters are linked onto this list during +  * the (recursive) compilation of each compilation unit (i.e. +  * compiled string). Thus nested programs and programs built from C +  * don't have supporters. */ +     struct Supporter *depends_on; -  struct Supporter *dependants; -  struct Supporter *next_dependant; +  /* The supporter furthest in on the current_supporter linked list +  * that this one depends on. When it gets unlinked from that list, +  * this becomes a back pointer for the dependants linked list +  * below. */ +  +  struct Supporter *dependants, *next_dependant; +  /* dependants points to a linked list of supporters that depends on +  * this one, and next_dependant makes up the links between those +  * supporters. A supporter is linked onto this list when it is +  * unlinked from the current_supporter list. */ +     struct object *self;    supporter_callback *fun;    void *data; -  +     struct program *prog; -  +  /* The top level program in the compilation unit. */   };      /* Prototypes begin here */   PMOD_EXPORT void do_free_program (struct program *p);   void ins_int(INT32 i, void (*func)(char tmp));   void ins_short(int i, void (*func)(char tmp));   void add_relocated_int_to_program(INT32 i);   void use_module(struct svalue *s);   void unuse_modules(INT32 howmany);   node *find_module_identifier(struct pike_string *ident,