Branch: Tag:

2017-12-11

2017-12-11 18:05:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Add symbolic constants COMPILER_PASS_*.

This is in preparation for adding more passes.

1876:       get_all_args("pop_type_attribute", args, "%W%*%*", &attr, &a, &b);    -  if (Pike_compiler->compiler_pass == 2) { +  if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    MAKE_CONST_STRING(deprecated_string, "deprecated");    if ((attr == deprecated_string) &&    !(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS)) {
1918:       get_all_args("push_type_attribute", args, "%W%*%*", &attr, &a, &b);    -  if (Pike_compiler->compiler_pass == 2) { +  if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    MAKE_CONST_STRING(deprecated_string, "deprecated");    if ((attr == deprecated_string) &&    !(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS) &&
1974:       get_all_args("apply_type_attribute", args, "%W%*.%*", &attr, &a, &b);    -  if (Pike_compiler->compiler_pass == 2) { +  if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    MAKE_CONST_STRING(deprecated_string, "deprecated");    if ((attr == deprecated_string) &&    !(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS) &&
2742:    mkintnode(0)),    NULL));    } -  if ((Pike_compiler->compiler_pass == 2) && +  if ((Pike_compiler->compiler_pass == COMPILER_PASS_LAST) &&    !(Pike_compiler->compiler_frame->variable[e].flags &    LOCAL_VAR_IS_USED)) {    ref_push_string(Pike_compiler->compiler_frame->variable[e].name);
2773:    * actually is used from a nested scope. */    for(;level<Pike_compiler->compiler_frame->min_number_of_locals;level++)    { -  if ((Pike_compiler->compiler_pass == 2) && +  if ((Pike_compiler->compiler_pass == COMPILER_PASS_LAST) &&    !(Pike_compiler->compiler_frame->variable[level].flags &    LOCAL_VAR_IS_USED)) {    ref_push_string(Pike_compiler->compiler_frame->variable[level].name);