pike.git/src/peep.in

Branch: Tag:

2014-08-31

2014-08-31 10:14:32 by Per Hedbor <ph@opera.com>

• 2c3055afeccdc7f0861d8467b5d2cd770378fb32 (21 lines) (+21/-0) [ Show | Annotate ]
Branch: 8.0
Added a few more opcodes to do constant integer arithmentcs.

290:   NUMBER [\$1a >= 0] SUBTRACT : ADD_NEG_INT (\$1a)   NEG_NUMBER [\$1a > 0] SUBTRACT : ADD_INT (\$1a)    + NUMBER MOD : MOD_INT(\$1a) + NUMBER LSH : LSH_INT(\$1a) + NUMBER RSH : RSH_INT(\$1a) + NUMBER SUBTRACT : SUBTRACT_INT(\$1a) + NUMBER AND : DIVIDE_INT(\$1a) + NUMBER OR : OR_INT(\$1a) + NUMBER XOR : XOR_INT(\$1a) + NUMBER MULTIPLY : MULTIPLY_INT(\$1a) + NUMBER DIVIDE : DIVIDE_INT(\$1a) +  + NEG_NUMBER MOD : MOD_INT(-\$1a) + NEG_NUMBER LSH : LSH_INT(-\$1a) + NEG_NUMBER RSH : RSH_INT(-\$1a) + NEG_NUMBER SUBTRACT : SUBTRACT_INT(-\$1a) + NEG_NUMBER AND : DIVIDE_INT(-\$1a) + NEG_NUMBER OR : OR_INT(-\$1a) + NEG_NUMBER XOR : XOR_INT(-\$1a) + NEG_NUMBER MULTIPLY : MULTIPLY_INT(-\$1a) + NEG_NUMBER DIVIDE : DIVIDE_INT(-\$1a) +    // This set of optimizations is broken. Consider the case:   // STRING ADD_INT ADD_INT   //