Branch: Tag:

2017-12-14

2017-12-14 15:01:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added even more COMPILER_PASS_*.

The compiler now seems to survive renumbering of COMPILER_PASS_*.

Also fixes a few (disabled) debug statements in language.yacc.

3173:    }else{    tmp.u.program=p;    add_ref(p); -  if((pass == 2) && name) +  if((pass != COMPILER_PASS_FIRST) && name)    {    struct identifier *i;    id=isidentifier(name);
3184:    i->type=get_type_of_svalue(&tmp);    }    } -  if (pass == 1) { +  if (pass == COMPILER_PASS_FIRST) {    if(c->compilation_depth >= 1) {    add_ref(p->parent = Pike_compiler->new_program);    debug_malloc_touch (p);
3426:    (long)th_self(), (long)line, file,    lock_depth, c->compilation_depth);    -  low_start_new_program(0,1,0,0,0); +  low_start_new_program(0, COMPILER_PASS_FIRST, 0, 0, 0);    store_linenumber(line,c->lex.current_file);    debug_malloc_name(Pike_compiler->new_program, file, line);