Branch: Tag:

2000-05-01

2000-05-01 03:33:47 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more optimizations (fairly minor)

Rev: src/docode.c:1.72
Rev: src/interpret_functions.h:1.20
Rev: src/language.yacc:1.183
Rev: src/operators.c:1.92
Rev: src/peep.in:1.36

1:   /* -  * $Id: interpret_functions.h,v 1.19 2000/05/01 02:11:25 hubbe Exp $ +  * $Id: interpret_functions.h,v 1.20 2000/05/01 03:33:45 hubbe Exp $    *    * Opcode definitions for the interpreter.    */
1130:    f_add(2);   BREAK;    + OPCODE0(F_ADD_INTS, "int+int") +  if(sp[-1].type == T_INT && sp[-2].type == T_INT + #ifdef AUTO_BIGNUM +  && (!INT_TYPE_ADD_OVERFLOW(sp[-1].u.integer, sp[-2].u.integer)) + #endif +  ) +  { +  sp[-2].u.integer+=sp[-1].u.integer; +  sp--; +  }else{ +  f_add(2); +  } + BREAK; +  + OPCODE0(F_ADD_FLOATS, "float+float") +  if(sp[-1].type == T_FLOAT && sp[-2].type == T_FLOAT) +  { +  sp[-2].u.float_number+=sp[-1].u.float_number; +  sp--; +  }else{ +  f_add(2); +  } + BREAK; +    OPCODE0(F_SUBTRACT, "-")    o_subtract();   BREAK;