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.62 1998/05/12 23:51:26 hubbe Exp $"); + RCSID("$Id: las.c,v 1.63 1998/06/06 03:27:25 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:949:   int node_is_false(node *n)   {    if(!n) return 0;    switch(n->token)    {    case F_CONSTANT: return IS_ZERO(& n->u.sval);    default: return 0;    }   }    + int node_may_overload(node *n, int lfun) + { +  if(!n) return 0; +  if(!n->type) return 1; +  return type_may_overload(n->type->str, lfun); + } +    node **last_cmd(node **a)   {    node **n;    if(!a || !*a) return (node **)NULL;    if((*a)->token == F_CAST) return last_cmd(&CAR(*a));    if((*a)->token != F_ARG_LIST) return a;    if(CDR(*a))    {    if(CDR(*a)->token != F_CAST && CAR(*a)->token != F_ARG_LIST)    return &CDR(*a);
pike.git/src/las.c:994:    return n;       if(CDR(*a))    if((n=low_get_arg(&CDR(*a),nr)))    return n;       return 0;   }      node **my_get_arg(node **a,int n) { return low_get_arg(a,&n); } - /* static node **first_arg(node **a) { return my_get_arg(a,0); } */ +     -  + node **is_call_to(node *n, c_fun f) + { +  switch(n->token) +  { +  case F_APPLY: +  if(CAR(n) && +  CAR(n)->token == F_CONSTANT && +  CAR(n)->u.sval.type == T_FUNCTION && +  CAR(n)->u.sval.subtype == FUNCTION_BUILTIN && +  CAR(n)->u.sval.u.efun->function == f) +  return & CDR(n); +  } +  return 0; + } +  +    static void low_print_tree(node *foo,int needlval)   {    if(!foo) return;    switch(foo->token)    {    case F_LOCAL:    if(needlval) putchar('&');    printf("$%ld",(long)foo->u.number);    break;