pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.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"   #include <math.h> - RCSID("$Id: operators.c,v 1.91 2000/04/20 02:41:45 hubbe Exp $"); + RCSID("$Id: operators.c,v 1.92 2000/05/01 03:33:47 hubbe Exp $");   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"   #include "mapping.h"   #include "array.h"   #include "stralloc.h"   #include "opcodes.h"   #include "operators.h"   #include "language.h"   #include "pike_memory.h"
pike.git/src/operators.c:421:    l = add_multisets(sp - args, args);    pop_n_elems(args);    push_multiset(l);    break;    }    }   }      static int generate_sum(node *n)   { +  node **first_arg, **second_arg;    switch(count_args(CDR(n)))    {    case 1:    do_docode(CDR(n),0);    return 1;       case 2: -  +  first_arg=my_get_arg(&_CDR(n), 0); +  second_arg=my_get_arg(&_CDR(n), 1); +     do_docode(CDR(n),DO_NOT_COPY); -  +  if(first_arg[0]->type == float_type_string && +  second_arg[0]->type == float_type_string) +  { +  emit0(F_ADD_FLOATS); +  } +  else if(first_arg[0]->type == int_type_string && +  second_arg[0]->type == int_type_string) +  { +  emit0(F_ADD_INTS); +  } +  else +  {    emit0(F_ADD); -  +  }    return 1;       default:    return 0;    }   }      static node *optimize_eq(node *n)   {    node **first_arg, **second_arg, *ret;