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.601 2006/07/04 14:38:17 mast Exp $ + || $Id: program.c,v 1.602 2006/07/05 02:21:51 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:1181:    if (SHIFT < 0 || SHIFT > 2 || \    POS + (LEN << SHIFT) > PROG->linenumbers + PROG->num_linenumbers) \    Pike_fatal ("Invalid file entry in linenumber info.\n"); \    } while (0)   #else   #define CHECK_FILE_ENTRY(PROG, POS, LEN, SHIFT) do {} while (0)   #endif      int get_small_number(char **q);    + PMOD_EXPORT void do_free_program (struct program *p) + { +  if (p) +  free_program(p); + } +    /* So what if we don't have templates? / Hubbe */      #ifdef PIKE_DEBUG   #define CHECK_FOO(NUMTYPE,TYPE,NAME) \    if(Pike_compiler->malloc_size_program-> PIKE_CONCAT(num_,NAME) < \    Pike_compiler->new_program-> PIKE_CONCAT(num_,NAME)) \    Pike_fatal("Pike_compiler->new_program->num_" #NAME " is out of order\n");\    if(Pike_compiler->new_program->flags & PROGRAM_OPTIMIZED) \    Pike_fatal("Tried to reallocate fixed program.\n")   
pike.git/src/program.c:3444:    * argument.    *    * This function is obsolete, use pike_set_prog_event_callback instead.    */   PMOD_EXPORT void set_gc_check_callback(void (*m)(struct object *))   {    add_compat_event_handler();    ((oldhandlertype *)Pike_compiler->new_program->program)[PROG_EVENT_GC_CHECK]=m;   }    - void pike_set_prog_event_callback(void (*cb)(int)) + PMOD_EXPORT void pike_set_prog_event_callback(void (*cb)(int))   {   #ifdef PIKE_DEBUG    if(Pike_compiler->new_program->event_handler)    Pike_fatal("Program already has an event handler!\n");   #endif    Pike_compiler->new_program->event_handler=cb;   }    - void pike_set_prog_optimize_callback(node *(*opt)(node *)) + PMOD_EXPORT void pike_set_prog_optimize_callback(node *(*opt)(node *))   {   #ifdef PIKE_DEBUG    if(Pike_compiler->new_program->optimize)    Pike_fatal("Program already has an optimize handler!\n");   #endif    Pike_compiler->new_program->optimize = opt;   }      int really_low_reference_inherited_identifier(struct program_state *q,    int e,
pike.git/src/program.c:5235:    depth = inh->inherit_level;    id = i;    }    } else {    return i;    }    }    return id;   }    - int low_find_lfun(struct program *p, ptrdiff_t lfun) + PMOD_EXPORT int low_find_lfun(struct program *p, ptrdiff_t lfun)   {    struct pike_string *lfun_name = lfun_strings[lfun];    unsigned int flags = 0;    struct identifier *id;    int i =    really_low_find_shared_string_identifier(lfun_name,    dmalloc_touch(struct program *,    p),    SEE_STATIC);    if (i < 0 || !(p->flags & PROGRAM_FIXED)) return i;