Branch: Tag:

2010-11-25

2010-11-25 20:33:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Preparations for changing the identifier information for constants.

1188:    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. */
1522:    }    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.");