Branch: Tag:

2015-04-22

2015-04-22 12:59:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Optimizer: Removed some conflicting peep rules.

Also added a few missing rules, and added use of the new error syntax.

45:   CONST0 COMPL: CONST_1   CONST1 COMPL: NEG_NUMBER(2)   CONST_1 COMPL: CONST0 - NUMBER COMPL: NEG_NUMBER($1a+1) - NEG_NUMBER COMPL: NUMBER($1a-1) +    BIGNUM COMPL: NUMBER(-0x80000000) // Note: Invalid as NEG_NUMBER on 32bit!   COMPL COMPL :   NEGATE CONST_1 ADD_INTS : COMPL
76:   ASSIGN_LOCAL_NUMBER_AND_POP LOCAL($1a) : ASSIGN_LOCAL_NUMBER_AND_POP($1a,$1b) NUMBER($1b)   ASSIGN_GLOBAL_NUMBER_AND_POP GLOBAL($1a) : ASSIGN_GLOBAL_NUMBER_AND_POP($1a,$1b) NUMBER($1b)   NUMBER COMPL: NUMBER(~$1a) + NEG_NUMBER COMPL: NEG_NUMBER(~$1a)   ASSIGN_LOCAL_NUMBER_AND_POP LOCAL_LVALUE LOCAL($1a) : ASSIGN_LOCAL_NUMBER_AND_POP($1a,$1b) LOCAL_LVALUE($2a) NUMBER($1b)   ASSIGN_GLOBAL_NUMBER_AND_POP GLOBAL_LVALUE GLOBAL($1a) : ASSIGN_GLOBAL_NUMBER_AND_POP($1a,$1b) GLOBAL_LVALUE($2a) NUMBER($1b)   ASSIGN_LOCAL_NUMBER_AND_POP GLOBAL_LVALUE LOCAL($1a) : ASSIGN_LOCAL_NUMBER_AND_POP($1a,$1b) GLOBAL_LVALUE($2a) NUMBER($1b)
158:   // CONST1 DIVIDE :   // NUMBER DIVIDE [!($1a & ($1a - 1))]: NUMBER(my_log2($1a)) RSH    - CONST0 SUBTRACT: - CONST0 XOR: - CONST_1 XOR: COMPL +    CONST0 RETURN: RETURN_0   CONST1 RETURN: RETURN_1   CONST0 VOLATILE_RETURN: RETURN_0
329:   OPER_INT(CONST1,1)   OPER_INT(CONST_1,-1)   OPER_INT(BIGNUM,0x7fffffff) + OPER_INT(CONST0, 0)    - CONST0 MOD [ yyerror("Divide by constant 0"),1 ] : - CONST0 DIVIDE [ yyerror("Divide by constant 0"),1 ] : + MOD_INT(0) : "Division by constant 0." + DIVIDE_INT(0) : "Division by constant 0."    - CONST0 LSH : LSH_INT(0); - CONST0 RSH : RSH_INT(0); - CONST0 SUBTRACT : SUBTRACT_INT(0); - CONST0 ADD : ADD_INT(0); - CONST0 AND : AND_INT(0); - CONST0 OR : OR_INT(0); - CONST0 XOR : XOR_INT(0); - CONST0 MULTIPLY : MULTIPLY_INT(0); -  -  +    // Some noops related to the above opcodes.   // MOD_INT(1): POP_VALUE CONST0 // cf string % int ==> string   LSH_INT(0):