Branch: Tag:

2004-03-13

2004-03-13 13:22:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Renamed flag counter Pike_compiler->check_final to Pike_compiler->flags.
Moved the global flag force_resolve to Pike_compiler->flags.
Defined flags COMPILATION_{CHECK_FINAL,FORCE_RESOLVE}.
The above fixes various bugs introduced by yesterdays changes.
Added compilation pass as parameter to low_start_new_program().

Rev: src/compilation.h:1.31
Rev: src/encode.c:1.165
Rev: src/language.yacc:1.315
Rev: src/las.c:1.324
Rev: src/program.c:1.485
Rev: src/program.h:1.179

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: las.c,v 1.323 2003/12/03 09:35:24 grubba Exp $ + || $Id: las.c,v 1.324 2004/03/13 13:22:40 grubba Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.323 2003/12/03 09:35:24 grubba Exp $"); + RCSID("$Id: las.c,v 1.324 2004/03/13 13:22:40 grubba Exp $");      #include "language.h"   #include "interpret.h"
1253:    * first place to look up these efuns in the module being compiled.    * Wouldn't it be better if this function consulted    * compiler_handler->get_default_module? /mast */ -  int orig_force_resolve = force_resolve; -  force_resolve = 1; +  int orig_flags = Pike_compiler->flags; +  Pike_compiler->flags |= COMPILATION_FORCE_RESOLVE;    name = make_shared_string(function);    if(!name || !(n=find_module_identifier(name,0)))    {    free_string(name);    my_yyerror("Internally used efun undefined: %s",function); -  force_resolve = orig_force_resolve; +  Pike_compiler->flags = orig_flags;    return mkintnode(0);    }    free_string(name);    n = mkapplynode(n, args); -  force_resolve = orig_force_resolve; +  Pike_compiler->flags = orig_flags;    return n;   }   
1950:    if (SAFE_IS_ZERO(Pike_sp-1)) yy_describe_exception(&thrown);    pop_stack();    } -  }else if (!force_resolve) { +  }else if (!(Pike_compiler->flags & COMPILATION_FORCE_RESOLVE)) {    /* Hope it's there in pass 2 */    pop_stack();   #if 0