Branch: Tag:

2004-11-27

2004-11-27 22:48:11 by Martin Stjernholm <mast@lysator.liu.se>

Removed assumptions that inequality operations always works on total orders
(that's not even true for simple floats). I.e. that a <= b is the same as
!(a > b) and so on.

Rev: src/interpret_functions.h:1.177
Rev: src/operators.c:1.201
Rev: src/operators.h:1.17
Rev: src/peep.in:1.76
Rev: src/svalue.c:1.207
Rev: src/svalue.h:1.133
Rev: src/treeopt.in:1.76

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret_functions.h,v 1.176 2004/10/30 11:38:25 mast Exp $ + || $Id: interpret_functions.h,v 1.177 2004/11/27 22:48:10 mast Exp $   */      /*
1186:   CJUMP(F_BRANCH_WHEN_EQ, "branch if ==", is_eq);   CJUMP(F_BRANCH_WHEN_NE, "branch if !=", !is_eq);   CJUMP(F_BRANCH_WHEN_LT, "branch if <", is_lt); - CJUMP(F_BRANCH_WHEN_LE, "branch if <=", !is_gt); + CJUMP(F_BRANCH_WHEN_LE, "branch if <=", is_le);   CJUMP(F_BRANCH_WHEN_GT, "branch if >", is_gt); - CJUMP(F_BRANCH_WHEN_GE, "branch if >=", !is_lt); + CJUMP(F_BRANCH_WHEN_GE, "branch if >=", is_ge);      OPCODE0_BRANCH(F_BRANCH_AND_POP_WHEN_ZERO, "branch & pop if zero", 0, {    if(!UNSAFE_IS_ZERO(Pike_sp-1))
1574:   COMPARISON(F_EQ, "==", is_eq(Pike_sp-2,Pike_sp-1));   COMPARISON(F_NE, "!=", !is_eq(Pike_sp-2,Pike_sp-1));   COMPARISON(F_GT, ">", is_gt(Pike_sp-2,Pike_sp-1)); - COMPARISON(F_GE, ">=", !is_lt(Pike_sp-2,Pike_sp-1)); + COMPARISON(F_GE, ">=", is_ge(Pike_sp-2,Pike_sp-1));   COMPARISON(F_LT, "<", is_lt(Pike_sp-2,Pike_sp-1)); - COMPARISON(F_LE, "<=", !is_gt(Pike_sp-2,Pike_sp-1)); + COMPARISON(F_LE, "<=", is_le(Pike_sp-2,Pike_sp-1));      OPCODE0(F_ADD, "+", I_UPDATE_SP, {    f_add(2);