Branch: Tag:

2004-03-16

2004-03-16 13:42:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cleaned up handling of COMPILATION_FORCE_RESOLVE.

Rev: src/language.yacc:1.332
Rev: src/las.c:1.345

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.344 2004/03/13 14:45:05 grubba Exp $ + || $Id: las.c,v 1.345 2004/03/16 13:42:30 grubba Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.344 2004/03/13 14:45:05 grubba Exp $"); + RCSID("$Id: las.c,v 1.345 2004/03/16 13:42:30 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_flags = Pike_compiler->flags; -  Pike_compiler->flags |= COMPILATION_FORCE_RESOLVE; -  name = make_shared_string(function); +  int orig_flags; +  SET_FORCE_RESOLVE(orig_flags); +  name = findstring(function);    if(!name || !(n=find_module_identifier(name,0)))    { -  free_string(name); +  UNSET_FORCE_RESOLVE(orig_flags);    my_yyerror("Internally used efun undefined: %s",function); -  Pike_compiler->flags = orig_flags; +     return mkintnode(0);    } -  free_string(name); +  UNSET_FORCE_RESOLVE(orig_flags);    n = mkapplynode(n, args); -  Pike_compiler->flags = orig_flags; +     return n;   }