pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1181:    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; +  } else if (id->func.const_info.offset != -1) { +  struct svalue *s = &parent_prog->constants[id->func.const_info.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)) {
pike.git/src/las.c:1515:    loc.parent_identifier = 0;       find_external_context(&loc, i->func.ext_ref.depth);    numid = i->func.ext_ref.id;    p = loc.o->prog;    i = ID_FROM_INT(p, numid);    } while (IDENTIFIER_IS_ALIAS(i->identifier_flags));    }    if(IDENTIFIER_IS_CONSTANT(i->identifier_flags))    { -  if(i->func.offset != -1) +  if(i->func.const_info.offset != -1)    { -  push_svalue(&PROG_FROM_INT(p, numid)->constants[i->func.offset].sval); +  push_svalue(&PROG_FROM_INT(p, numid)-> +  constants[i->func.const_info.offset].sval);    }else{    if(Pike_compiler->compiler_pass!=1)    yyerror("Constant is not defined yet.");    push_int(0);    }    } else {    my_yyerror("Identifier %S is not a constant", i->name);    push_int(0);    }    }