Branch: Tag:

2017-01-09

2017-01-09 22:16:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: API change for docode.c:do_code_block().

Propagate identifier_flags explicitly to do_code_block().

2813:   }      /* Used to generate code for functions. */ - INT32 do_code_block(node *n) + INT32 do_code_block(node *n, int identifier_flags)   {    struct compilation *c = THIS_COMPILATION;    struct reference *id = NULL; -  struct identifier *i = NULL; +     INT32 entry_point;    int aggregate_cnum = -1;   #ifdef PIKE_DEBUG
2828:    if (Pike_compiler->compiler_frame->current_function_number >= 0) {    id = Pike_compiler->new_program->identifier_references +    Pike_compiler->compiler_frame->current_function_number; -  i = ID_FROM_PTR(Pike_compiler->new_program, id); +     }       init_bytecode();
2843:    emit2(F_FILL_STACK, Pike_compiler->compiler_frame->num_args, 1);    }    emit1(F_MARK_AT, Pike_compiler->compiler_frame->num_args); -  if (i && i->identifier_flags & IDENTIFIER_VARARGS) { +  if (identifier_flags & IDENTIFIER_VARARGS) {    struct svalue *sval =    simple_mapping_string_lookup(get_builtin_constants(), "aggregate");    if (!sval) {
2900:    emit2(F_FILL_STACK, Pike_compiler->compiler_frame->num_args, 1);    }    emit1(F_MARK_AT, Pike_compiler->compiler_frame->num_args); -  if (i && i->identifier_flags & IDENTIFIER_VARARGS) { +  if (identifier_flags & IDENTIFIER_VARARGS) {    emit1(F_CALL_BUILTIN, aggregate_cnum);    if (Pike_compiler->compiler_frame->max_number_of_locals !=    Pike_compiler->compiler_frame->num_args+1) {