pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:7056:    funp = prog->identifier_references + i;    if(funp->id_flags & ID_HIDDEN) continue;    if(!(funp->id_flags & ID_VARIANT)) continue;    if(funp->id_flags & ID_PROTECTED)    if(!(flags & SEE_PROTECTED))    continue;    fun = ID_FROM_PTR(prog, funp);    /* if(fun->func.offset == -1) continue; * Prototype */    if(!is_same_string(fun->name,name)) continue;    if(type && (fun->type != type)) { -  if ((Pike_compiler->compiler_pass == COMPILER_PASS_LAST) && +  if ((Pike_compiler->compiler_pass != COMPILER_PASS_FIRST) &&    !(funp->id_flags & ID_INHERITED) &&    match_types(fun->type, type)) {    tentative = i;    }    continue;    }    if(funp->id_flags & ID_INHERITED)    {    struct inherit *inh = INHERIT_FROM_PTR(prog, funp);    if ((funp->id_flags & ID_PRIVATE) && !(flags & SEE_PRIVATE)) continue;
pike.git/src/program.c:7096:    last_inh = funp->inherit_offset;    depth = inh->inherit_level;    id = i;    }    } else {    CDFPRINTF("Found %d\n", i);    return i;    }    }    if ((id < 0) && (tentative >= 0)) { +  if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    // Usually due to forward-referring types. The tentative match    // is often correct, but may in some cases be wrong eg due to    // having fall back implementations that use the mixed type.    yytype_report(REPORT_WARNING,    NULL, 0, ID_FROM_INT(prog, tentative)->type,    NULL, 0, type,    0, "Variant type mismatch in second pass for %S.",    name); -  +  }    id = tentative;    }    CDFPRINTF("Found %d\n", id);    return id;   }      /**    * This is the dispatcher function for variant functions.    *    * cf end_first_pass().