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.30 1997/03/17 03:04:39 hubbe Exp $"); + RCSID("$Id: las.c,v 1.31 1997/04/16 03:09:12 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"   #include "constants.h"   #include "mapping.h"   #include "multiset.h"   #include "error.h"   #include "docode.h"   #include "main.h"   #include "memory.h"   #include "operators.h"   #include "callback.h"   #include "pike_macros.h" -  + #include "peep.h"      #define LASDEBUG      int lasdebug=0;      static node *eval(node *);   static void optimize(node *n);      dynamic_buffer areas[NUM_AREAS];   node *init_node = 0;
pike.git/src/las.c:1425:   #endif       switch(n->token)    {    case F_APPLY:    if(CAR(n)->token == F_CONSTANT &&    CAR(n)->u.sval.type == T_FUNCTION &&    CAR(n)->u.sval.subtype == FUNCTION_BUILTIN && /* driver fun? */    CAR(n)->u.sval.u.efun->optimize)    { -  if(tmp1=CAR(n)->u.sval.u.efun->optimize(n)) +  if((tmp1=CAR(n)->u.sval.u.efun->optimize(n)))    {    goto use_tmp1;    }    }    break;       case F_ARG_LIST:    case F_LVALUE_LIST:    if(!CAR(n)) goto use_cdr;    if(!CDR(n)) goto use_car;
pike.git/src/las.c:1940:    expected=stupid_args(CAR(n), expected,vargs);    if(expected==-1) return -1;    return stupid_args(CDR(n), expected,vargs);    case F_LOCAL:    return n->u.number==expected ? expected + 1 : -1;    default:    return -1;    }   }    - static is_null_branch(node *n) + static int is_null_branch(node *n)   {    if(!n) return 1;    if(n->token==F_CAST && n->type==void_type_string)    return is_null_branch(CAR(n));    if(n->token==F_ARG_LIST)    return is_null_branch(CAR(n)) && is_null_branch(CDR(n));    return 0;   }      static struct svalue *is_stupid_func(node *n,
pike.git/src/las.c:2015:    args=count_arguments(type);    if(args < 0)    {    args=~args;    vargs=IDENTIFIER_VARARGS;    }else{    vargs=0;    }    n=mknode(F_ARG_LIST,n,0);    -  if(foo=is_stupid_func(n, args, vargs)) +  if((foo=is_stupid_func(n, args, vargs)))    {    if(foo->type == T_FUNCTION && foo->subtype==FUNCTION_BUILTIN)    {    tmp.c_fun=foo->u.efun->function;    ret=define_function(name,    type,    modifiers,    IDENTIFIER_C_FUNCTION | vargs,    &tmp);    free_node(n);