Branch: Tag:

1997-10-11

1997-10-11 06:49:20 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

right-side operator overloading implemented

Rev: src/array.c:1.18
Rev: src/interpret.c:1.49
Rev: src/lex.c:1.28
Rev: src/modules/Gmp/mpz_glue.c:1.23
Rev: src/modules/Gmp/testsuite.in:1.7
Rev: src/operators.c:1.20
Rev: src/program.c:1.43
Rev: src/program.h:1.21

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.48 1997/10/10 20:22:01 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.49 1997/10/11 06:48:23 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
1164:    }    break;    -  CASE(F_LSH); -  if(sp[-2].type != T_INT) -  { -  o_lsh(); -  }else{ -  if(sp[-1].type != T_INT) error("Bad argument 2 to <<\n"); -  sp--; -  sp[-1].u.integer = sp[-1].u.integer << sp->u.integer; -  } -  break; +  CASE(F_LSH); o_lsh(); break; +  CASE(F_RSH); o_rsh(); break;    -  CASE(F_RSH); -  if(sp[-2].type != T_INT) -  { -  o_rsh(); -  }else{ -  if(sp[-1].type != T_INT) error("Bad argument 2 to >>\n"); -  sp--; -  sp[-1].u.integer = sp[-1].u.integer >> sp->u.integer; -  } -  break; -  +     COMPARISMENT(F_EQ, is_eq(sp-2,sp-1));    COMPARISMENT(F_NE,!is_eq(sp-2,sp-1));    COMPARISMENT(F_GT, is_gt(sp-2,sp-1));