pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4513:    * the reference added. May be NULL to indicate Pike_compiler.    *    * @param i    * Inherit number in q->new_program.    *    * @param f    * Reference number in q->new_program->inherit[i].prog.    *    * @return    * Returns an equivalent reference that is INLINE|HIDDEN. +  * +  * Returns -1 if the referenced identifier is -1 or a prototype.    */   PMOD_EXPORT int really_low_reference_inherited_identifier(struct program_state *q,    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(f==-1) return -1;       p = np->inherits[i].prog;    -  +  if ((q?q:Pike_compiler)->compiler_pass == 2) { +  struct identifier *id = ID_FROM_INT(p, i); +  if (((id->identifier_flags & IDENTIFIER_TYPE_MASK) == +  IDENTIFIER_PIKE_FUNCTION) && (id->func.offset == -1)) { +  /* Prototype. */ +  return -1; +  } +  } +     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;