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.78 1999/12/15 01:40:34 grubba Exp $"); + RCSID("$Id: operators.c,v 1.79 1999/12/15 07:50:00 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:590:    sp[-2].u.float_number=(FLOAT_TYPE)sp[-2].u.integer;    sp[-2].type=T_FLOAT;    return 1;    }    else if(sp[-1].type==T_INT && sp[-2].type==T_FLOAT)    {    sp[-1].u.float_number=(FLOAT_TYPE)sp[-1].u.integer;    sp[-1].type=T_FLOAT;    return 1;    } +  + #ifdef AUTO_BIGNUM +  if(is_bignum_object_in_svalue(sp-2) && sp[-1].type==T_FLOAT) +  { +  stack_swap(); +  push_constant_text(tFloat); +  stack_swap(); +  f_cast(); +  stack_swap(); +  return 1; +  } +  else if(is_bignum_object_in_svalue(sp-1) && sp[-2].type==T_FLOAT) +  { +  push_constant_text(tFloat); +  stack_swap(); +  f_cast(); +  return 1; +  } + #endif    return 0;   }      static int call_lfun(int left, int right)   {    if(sp[-2].type == T_OBJECT &&    sp[-2].u.object->prog &&    FIND_LFUN(sp[-2].u.object->prog,left) != -1)    {    apply_lfun(sp[-2].u.object, left, 1);