pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: las.c,v 1.19 1997/02/11 01:52:26 hubbe Exp $"); + RCSID("$Id: las.c,v 1.20 1997/02/11 07:10:54 hubbe Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:991:    {    p->err=1;    return;    }    p->globals[n->u.number]=VAR_USED;    }    break;       case F_APPLY:    if(n->tree_info & OPT_SIDE_EFFECT) -  MEMSET(p->globals, MAX_GLOBAL, VAR_USED); +  MEMSET(p->globals, VAR_USED, MAX_GLOBAL);    break;       case F_INDEX:    case F_ARROW:    find_written_vars(CAR(n), p, lvalue);    find_written_vars(CDR(n), p, 0);    break;       case F_INC:    case F_DEC:
pike.git/src/las.c:1042:      /* return 1 if A depends on B */   static int depend_p2(node *a,node *b)   {    struct used_vars aa,bb;    int e;       if(!a || !b || is_const(a)) return 0;    aa.err=0;    bb.err=0; -  for(e=0;e<MAX_LOCAL;e++) aa.locals[e]=bb.locals[e]=VAR_UNUSED; -  for(e=0;e<MAX_GLOBAL;e++) aa.globals[e]=bb.globals[e]=VAR_UNUSED; +  MEMSET((char *)aa.locals, VAR_UNUSED, MAX_LOCAL); +  MEMSET((char *)bb.locals, VAR_UNUSED, MAX_LOCAL); +  MEMSET((char *)aa.globals, VAR_UNUSED, MAX_GLOBAL); +  MEMSET((char *)bb.globals, VAR_UNUSED, MAX_GLOBAL);       find_used_variables(a,&aa,0,0);    find_written_vars(b,&bb,0);       if(aa.err || bb.err) return 1;       for(e=0;e<MAX_LOCAL;e++)    if(aa.locals[e]==VAR_USED && bb.locals[e]!=VAR_UNUSED)    return 1;