pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || 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: program.c,v 1.633 2008/01/03 15:58:27 grubba Exp $ + || $Id: program.c,v 1.634 2008/01/03 16:49:46 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:8214:    f->opt_flags = OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND; /* FIXME: Should be 0. */    Pike_compiler->compiler_frame=f;   }      void low_pop_local_variables(int level)   {    while(Pike_compiler->compiler_frame->current_number_of_locals > level)    {    int e;    e=--(Pike_compiler->compiler_frame->current_number_of_locals); -  if (!(Pike_compiler->compiler_frame->variable[e].flags & +  if ((Pike_compiler->compiler_pass == 2) && +  !(Pike_compiler->compiler_frame->variable[e].flags &    LOCAL_VAR_IS_USED)) {    struct pike_string *save_file = lex.current_file;    int save_line = lex.current_line;    lex.current_file = Pike_compiler->compiler_frame->variable[e].file;    lex.current_line = Pike_compiler->compiler_frame->variable[e].line;    yywarning("Unused local variable %S.\n",    Pike_compiler->compiler_frame->variable[e].name);    lex.current_file = save_file;    lex.current_line = save_line;    }
pike.git/src/program.c:8244:   void pop_local_variables(int level)   {   #if 1    /* We need to save the variables Kuppo (but not their names) */    if(level < Pike_compiler->compiler_frame->min_number_of_locals)    {    /* FIXME: Consider using flags to indicate whether a local variable    * actually is used from a nested scope. */    for(;level<Pike_compiler->compiler_frame->min_number_of_locals;level++)    { -  if (!(Pike_compiler->compiler_frame->variable[level].flags & +  if ((Pike_compiler->compiler_pass == 2) && +  !(Pike_compiler->compiler_frame->variable[level].flags &    LOCAL_VAR_IS_USED)) {    struct pike_string *save_file = lex.current_file;    int save_line = lex.current_line;    lex.current_file = Pike_compiler->compiler_frame->variable[level].file;    lex.current_line = Pike_compiler->compiler_frame->variable[level].line;    yywarning("Unused local variable %S.\n",    Pike_compiler->compiler_frame->variable[level].name);    lex.current_file = save_file;    lex.current_line = save_line;    }