pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4328:   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;   }      PMOD_EXPORT int really_low_reference_inherited_identifier(struct program_state *q, -  int e, -  int i) +  int i, +  int f)   {    struct program *np=(q?q:Pike_compiler)->new_program;    struct reference funp;    struct program *p;    int d, num_id_refs;    -  if(i==-1) return -1; +  if(f==-1) return -1;    -  p = np->inherits[e].prog; +  p = np->inherits[i].prog;    -  funp = p->identifier_references[i]; -  funp.inherit_offset += e; +  funp = p->identifier_references[f]; +  funp.inherit_offset += i;    funp.id_flags = (funp.id_flags & ~ID_INHERITED) | ID_INLINE|ID_HIDDEN;       num_id_refs = np->num_identifier_references;       for(d = 0; d < num_id_refs; d++)    {    struct reference *refp;    refp = np->identifier_references + d;       if ((refp->inherit_offset == funp.inherit_offset) &&    (refp->identifier_offset == funp.identifier_offset) && -  ((refp->id_flags | ID_USED) == (funp.id_flags | ID_USED))) +  ((refp->id_flags | ID_USED) == (funp.id_flags | ID_USED))) {    return d;    } -  +  }       funp.run_time_type = PIKE_T_UNKNOWN;       if(q)    low_add_to_identifier_references(q,funp);    else    add_to_identifier_references(funp);    /* NOTE: np->num_identifier_references has been increased by one by    * {low_,}add_to_identifier_references().    */   #ifdef PIKE_DEBUG    if (num_id_refs != np->num_identifier_references-1) {    fatal("Unexpected number of identifier references: %d != %d\n",    num_id_refs, np->num_identifier_references-1);    }   #endif /* PIKE_DEBUG */ -  +     return num_id_refs; /* aka np->num_identifier_references - 1 */   }      PMOD_EXPORT int low_reference_inherited_identifier(struct program_state *q,    int e,    struct pike_string *name,    int flags)   {    struct program *np=(q?q:Pike_compiler)->new_program;    struct program *p;