Branch: Tag:

2012-06-18

2012-06-18 11:37:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed some peep hole optimizations.

One of the new rules leaked marks.
Another was off by one and was very specific.

14:      MARK MARK: MARK2   MARK POP_MARK: - MARK POP_TO_MARK: MARK + MARK2 POP_MARK: MARK + MARK POP_TO_MARK: + MARK2 POP_TO_MARK: MARK      SWAP SWAP:   DUP POP_VALUE:
65:      // Ok, this is ridiculously specific, but it is generated by for(..)   // when the variable is not used, like above, but for globals: - ASSIGN_GLOBAL_NUMBER_AND_POP[$1b==0] GLOBAL_LVALUE($1a) DEC NEGATE: ASSIGN_GLOBAL_NUMBER_AND_POP($1a,-1) CONST0 + ASSIGN_GLOBAL_NUMBER_AND_POP[$1b > -0x80000000] GLOBAL_LVALUE($1a) DEC: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b - 1) NUMBER($1b - 1)    -  + ASSIGN_GLOBAL_NUMBER_AND_POP[$1b < 0x80000000] GLOBAL_LVALUE($1a) INC: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b + 1) NUMBER($1b + 1) +  + ASSIGN_GLOBAL_NUMBER_AND_POP[$1b > -0x80000000] GLOBAL_LVALUE($1a) DEC_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b - 1) + ASSIGN_GLOBAL_NUMBER_AND_POP[$1b < 0x80000000] GLOBAL_LVALUE($1a) INC_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b + 1) +    LOCAL_LVALUE LOCAL ADD_TO_AND_POP : ADD_LOCALS_AND_POP($1a,$2a)   LOCAL_LVALUE NUMBER ADD_TO_AND_POP: ADD_LOCAL_INT_AND_POP($1a,$2a)   LOCAL_LVALUE CONST_1 ADD_TO_AND_POP: ADD_LOCAL_INT_AND_POP($1a,-1)