pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1767:    free_svalues((struct svalue *)low_make_buf_space(0, &c->used_modules),    howmany,    BIT_MAPPING | BIT_OBJECT | BIT_PROGRAM);    if(Pike_compiler->module_index_cache)    {    free_mapping(Pike_compiler->module_index_cache);    Pike_compiler->module_index_cache=0;    }   }    - int low_find_shared_string_identifier(struct pike_string *name, -  struct program *prog); -  -  -  +    static struct node_s *index_modules(struct pike_string *ident,    struct mapping **module_index_cache,    const int num_used_modules,    struct svalue *modules)    /* num_used_modules is declared const here to convince the compiler that it is not    * modified in between setjmp() and longjmp(). This prevents -Wglobbered warnings.    */   {    if(*module_index_cache)    {
pike.git/src/program.c:6653:    * |    * +-A---foo    *    * External lookup of identifier "foo" in E():    *    * F-+-A---foo --- Pike 7.7.33    * |    * +-E---foo Pike 7.7.34 ---    */   PMOD_EXPORT int really_low_find_shared_string_identifier(struct pike_string *name, -  struct program *prog, +  const struct program *prog,    int flags)   {    struct reference *funp;    struct identifier *fun;    int id, i, depth, last_inh;      #if 0    CDFPRINTF((stderr,"th(%ld) %p Trying to find %s flags=%d\n",    (long)th_self(), prog, name->str, flags));   #endif
pike.git/src/program.c:6960:    if (TYPEOF(*id) == T_INT) return id->u.integer;    my_yyerror("Bad entry in lfun lookup table for %S.", lfun_name);    return -1;   }      /**    * Lookup the number of a function in a program given the name in    * a shared_string    */   int low_find_shared_string_identifier(struct pike_string *name, -  struct program *prog) +  const struct program *prog)   {    int max,min,tst;    struct identifier *fun;       if(prog->flags & PROGRAM_FIXED)    {    unsigned short *funindex = prog->identifier_index;    size_t val_n = PTR_TO_INT (name);      #ifdef PIKE_DEBUG
pike.git/src/program.c:7015: Inside #if defined(FIND_FUNCTION_HASHSIZE)
  {    struct pike_string *name;    int id;    int fun;   };      static struct ff_hash cache[FIND_FUNCTION_HASHSIZE];   #endif      int find_shared_string_identifier(struct pike_string *name, -  struct program *prog) +  const struct program *prog)   {   #ifdef PIKE_DEBUG    if (!prog) {    Pike_fatal("find_shared_string_identifier(): No program!\n"    "Identifier: %s%s%s\n",    name?"\"":"", name?name->str:"NULL", name?"\"":"");    }   #endif /* PIKE_DEBUG */   #ifdef FIND_FUNCTION_HASHSIZE    if(prog -> flags & PROGRAM_FIXED
pike.git/src/program.c:7049: Inside #if defined(FIND_FUNCTION_HASHSIZE)
   if(cache[hashval].name) free_string(cache[hashval].name);    copy_shared_string(cache[hashval].name,name);    cache[hashval].id=prog->id;    return cache[hashval].fun=low_find_shared_string_identifier(name,prog);    }   #endif /* FIND_FUNCTION_HASHSIZE */       return low_find_shared_string_identifier(name,prog);   }    - PMOD_EXPORT int find_identifier(const char *name,struct program *prog) + PMOD_EXPORT int find_identifier(const char *name,const struct program *prog)   {    struct pike_string *n;    if(!prog) {    if (strlen(name) < 1024) {    Pike_error("Lookup of identifier %s in destructed object.\n", name);    } else {    Pike_error("Lookup of long identifier in destructed object.\n");    }    }    n=findstring(name);