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

1:   // 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: peep.in,v 1.75 2004/11/27 22:02:58 mast Exp $ + // $Id: peep.in,v 1.76 2004/11/27 22:48:11 mast Exp $      NOP :   POP_N_ELEMS (0) :
165:      EQ BRANCH_WHEN_ZERO: BRANCH_WHEN_NE ($2a)   NE BRANCH_WHEN_ZERO: BRANCH_WHEN_EQ ($2a) - LT BRANCH_WHEN_ZERO: BRANCH_WHEN_GE ($2a) - GT BRANCH_WHEN_ZERO: BRANCH_WHEN_LE ($2a) - LE BRANCH_WHEN_ZERO: BRANCH_WHEN_GT ($2a) - GE BRANCH_WHEN_ZERO: BRANCH_WHEN_LT ($2a) + // The following only work on total orders. We can't assume that. + // LT BRANCH_WHEN_ZERO: BRANCH_WHEN_GE ($2a) + // GT BRANCH_WHEN_ZERO: BRANCH_WHEN_LE ($2a) + // LE BRANCH_WHEN_ZERO: BRANCH_WHEN_GT ($2a) + // GE BRANCH_WHEN_ZERO: BRANCH_WHEN_LT ($2a)      EQ LOR: EQ_OR ($2a)   EQ LAND: EQ_AND ($2a)      EQ NOT: NE   NE NOT: EQ - LT NOT: GE - GT NOT: LE - LE NOT: GT - GE NOT: LT +     -  + // The following only work on total orders. We can't assume that. + // + // LT NOT: GE + // GT NOT: LE + // LE NOT: GT + // GE NOT: LT +    LOCAL LOCAL : 2_LOCALS ($1a,$2a)   MARK LOCAL : MARK_AND_LOCAL ($2a)   MARK GLOBAL: MARK_AND_GLOBAL ($2a)
224:   BRANCH_WHEN_EQ BRANCH LABEL ($1a) : BRANCH_WHEN_NE($2a) LABEL($1a)   BRANCH_WHEN_NE BRANCH LABEL ($1a) : BRANCH_WHEN_EQ($2a) LABEL($1a)    - BRANCH_WHEN_LT BRANCH LABEL ($1a) : BRANCH_WHEN_GE($2a) LABEL($1a) - BRANCH_WHEN_GE BRANCH LABEL ($1a) : BRANCH_WHEN_LT($2a) LABEL($1a) + // The following only work on total orders. We can't assume that. + // + // BRANCH_WHEN_LT BRANCH LABEL ($1a) : BRANCH_WHEN_GE($2a) LABEL($1a) + // BRANCH_WHEN_GE BRANCH LABEL ($1a) : BRANCH_WHEN_LT($2a) LABEL($1a) + // + // BRANCH_WHEN_LE BRANCH LABEL ($1a) : BRANCH_WHEN_GT($2a) LABEL($1a) + // BRANCH_WHEN_GT BRANCH LABEL ($1a) : BRANCH_WHEN_LE($2a) LABEL($1a)    - BRANCH_WHEN_LE BRANCH LABEL ($1a) : BRANCH_WHEN_GT($2a) LABEL($1a) - BRANCH_WHEN_GT BRANCH LABEL ($1a) : BRANCH_WHEN_LE($2a) LABEL($1a) +     -  +    CONST0 ADD_INTS: ADD_INT (0)   CONST1 ADD_INTS: ADD_INT (1)   CONST_1 ADD_INTS: ADD_NEG_INT (1)