pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1178:   #endif       /* Mark the identifier reference as used. */    PTR_FROM_INT(parent_prog, i)->id_flags |= ID_USED;       copy_pike_type(res->type, id->type);       /* FIXME */    if(IDENTIFIER_IS_CONSTANT(id->identifier_flags))    { +  if (!(PTR_FROM_INT(parent_prog, i)->id_flags & ID_LOCAL)) { +  /* It's possible to overload the identifier. */    res->node_info = OPT_EXTERNAL_DEPEND; -  +  } else { +  struct svalue *s = &parent_prog->constants[id->func.offset].sval; +  if ((s->type == T_PROGRAM) && +  (s->u.program->flags & PROGRAM_USES_PARENT)) { +  /* The constant program refers to its parent, so we need as well. */ +  res->node_info = OPT_EXTERNAL_DEPEND; +  } +  }    }else{    res->node_info = OPT_NOT_CONST;    if (IDENTIFIER_IS_VARIABLE(id->identifier_flags) &&    (id->run_time_type == PIKE_T_GET_SET)) {    /* Special case of F_EXTERNAL for ease of detection. */    res->token = F_GET_SET;    }    }    if (i) {    Pike_compiler->compiler_frame->opt_flags |= OPT_EXTERNAL_DEPEND;