Branch: Tag:

2004-04-30

2004-04-30 20:33:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Disabled some broken optimizations.

Rev: src/peep.in:1.69

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: peep.in,v 1.68 2003/12/03 17:12:51 grubba Exp $ + // $Id: peep.in,v 1.69 2004/04/30 20:33:07 grubba Exp $      NOP :   POP_N_ELEMS (0) :
228:   NUMBER [$1a >= 0] SUBTRACT : ADD_NEG_INT ($1a)   NUMBER [$1a < 0 && ($1a != -$1a)] SUBTRACT : ADD_INT (-$1a)    - ADD_INT ADD_INT: ADD_INT ($1a+$2a) - ADD_NEG_INT ADD_NEG_INT: ADD_NEG_INT ($1a+$2a) - ADD_NEG_INT ADD_INT [$1a <= $2a]: ADD_INT ($2a-$1a) - ADD_NEG_INT ADD_INT [$1a > $2a]: ADD_NEG_INT ($1a-$2a) - ADD_INT ADD_NEG_INT [$2a <= $1a]: ADD_INT ($1a-$2a) - ADD_INT ADD_NEG_INT [$2a > $1a]: ADD_NEG_INT ($2a-$1a) + // This set of optimizations is broken. Consider the case: + // STRING ADD_INT ADD_INT + // + // ADD_INT ADD_INT: ADD_INT ($1a+$2a) + // ADD_NEG_INT ADD_NEG_INT: ADD_NEG_INT ($1a+$2a) + // ADD_NEG_INT ADD_INT [$1a <= $2a]: ADD_INT ($2a-$1a) + // ADD_NEG_INT ADD_INT [$1a > $2a]: ADD_NEG_INT ($1a-$2a) + // ADD_INT ADD_NEG_INT [$2a <= $1a]: ADD_INT ($1a-$2a) + // ADD_INT ADD_NEG_INT [$2a > $1a]: ADD_NEG_INT ($2a-$1a)    -  + NUMBER ADD_INT : NUMBER ($1a+$2a) + NUMBER ADD_NEG_INT : NUMBER ($1a-$2a) +    LTOSVAL2 ADD ASSIGN : ADD_TO   LTOSVAL ADD ASSIGN : ADD_TO