pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:3893:       MAKE_CONST_STRING(s,"__INIT");          /* Collect references to inherited __INIT functions */    if (!(Pike_compiler->new_program->flags & PROGRAM_AVOID_CHECK)) {    for(e=Pike_compiler->new_program->num_inherits-1;e;e--)    {    int id;    if(Pike_compiler->new_program->inherits[e].inherit_level!=1) continue; -  id=low_reference_inherited_identifier(0, e, s, SEE_PROTECTED); +  id = Pike_compiler->new_program->inherits[e].prog->lfuns[LFUN___INIT]; +  id = really_low_reference_inherited_identifier(0, e, id);    if(id!=-1)    {    Pike_compiler->init_node=mknode(F_COMMA_EXPR,    mkcastnode(void_type_string,    mkapplynode(mkidentifiernode(id),0)),    Pike_compiler->init_node);    }    }    }   
pike.git/src/program.c:3922:    e=dooptcode(s,    mknode(F_COMMA_EXPR,    Pike_compiler->init_node,    mknode(F_RETURN,mkintnode(0),0)),    function_type_string,    ID_PROTECTED);    Pike_compiler->init_node=0;    } else if (finish == 2) {    /* Called from decode_value(). */    e = low_find_lfun(Pike_compiler->new_program, LFUN___INIT); +  if ((e != -1) && !ID_FROM_INT(Pike_compiler->new_program, e)->func.offset) { +  /* Just a prototype. Make sure not to call it. */ +  e = -1; +  }    }else{ -  +  /* Note that we may zap an __INIT that existed in pass 1 here. +  * This is intentional to avoid having to keep track of whether +  * __INIT() is just a prototype or not. +  */    e=-1;    }    Pike_compiler->new_program->lfuns[LFUN___INIT]=e;       pop_compiler_frame(); /* Pop __INIT local variables */       if(Pike_compiler->num_parse_error > 0)    {    CDFPRINTF((stderr, "th(%ld) %p Compilation errors (%d).\n",    (long)th_self(), Pike_compiler->new_program,