pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.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: builtin_functions.c,v 1.456 2003/02/04 17:32:19 mast Exp $ + || $Id: builtin_functions.c,v 1.457 2003/03/28 14:23:23 marcus Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.456 2003/02/04 17:32:19 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.457 2003/03/28 14:23:23 marcus Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:7220:    }   }      /* map(), map_array() and filter() inherit sideeffects from their    * second argument.    */   static node *fix_map_node_info(node *n)   {    int argno;    node **cb_; -  int node_info = OPT_SIDE_EFFECT; /* Assume worst case. */ +  /* Assume worst case. */ +  int node_info = OPT_SIDE_EFFECT | OPT_EXTERNAL_DEPEND;       /* Note: argument 2 has argno 1. */    for (argno = 1; (cb_ = my_get_arg(&_CDR(n), argno)); argno++) {    node *cb = *cb_;       if ((cb->token == F_CONSTANT) &&    (cb->u.sval.type == T_FUNCTION) &&    (cb->u.sval.subtype == FUNCTION_BUILTIN)) {    if (cb->u.sval.u.efun->optimize == fix_map_node_info) {    /* map(), map_array() or filter(). */    continue;    } -  node_info = cb->u.sval.u.efun->flags & OPT_SIDE_EFFECT; +  node_info &= cb->u.sval.u.efun->flags;    }    /* FIXME: Type-checking? */    break;    }       if (!cb_) {    yyerror("Too few arguments to map() or filter()!\n");    }       n->node_info |= node_info;