Branch: Tag:

2004-03-13

2004-03-13 14:45:06 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.

Rev: src/compilation.h:1.31
Rev: src/language.yacc:1.328
Rev: src/las.c:1.344
Rev: src/program.c:1.557
Rev: src/program.h:1.200

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.343 2003/11/19 17:19:29 grubba Exp $ + || $Id: las.c,v 1.344 2004/03/13 14:45:05 grubba Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.343 2003/11/19 17:19:29 grubba Exp $"); + RCSID("$Id: las.c,v 1.344 2004/03/13 14:45:05 grubba Exp $");      #include "language.h"   #include "interpret.h"
1260:    * 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;   }   
1946:    my_yyerror("Index '%s' not present in module.", id->str);    }    } -  }else if (!force_resolve) { +  }else if (!(Pike_compiler->flags & COMPILATION_FORCE_RESOLVE)) {    /* Hope it's there in pass 2 */    pop_stack();   #if 0
5401:    }   #endif    -  if(Pike_compiler->num_parse_error) return -1; +  if(Pike_compiler->num_parse_error) { +  return -1; +  }       num_strings = prog->num_strings;    num_constants = prog->num_constants;