Branch: Tag:

2014-08-15

2014-08-15 14:05:39 by Per Hedbor <ph@opera.com>

Removed CLEAR_2_LOCAL & CLEAR_4_LOCAL, added CLEAR_N_LOCAL

This simplifies things a bit, and reduces codesize at times.

The record I have seen while running the testsuite was a clear_n_local(23).

95:   // Remove clearing of locals from the beginning of functions   // But don't remove clearing of arguments!   BYTE ENTRY START_FUNCTION LABEL(0) CLEAR_LOCAL [$1a <= $5a] : BYTE($1a) ENTRY START_FUNCTION LABEL(0) - BYTE ENTRY START_FUNCTION LABEL(0) CLEAR_2_LOCAL [$1a <= $5a] : BYTE($1a) ENTRY START_FUNCTION LABEL(0) - BYTE ENTRY START_FUNCTION LABEL(0) CLEAR_4_LOCAL [$1a <= $5a] : BYTE($1a) ENTRY START_FUNCTION LABEL(0) + BYTE ENTRY START_FUNCTION LABEL(0) CLEAR_N_LOCAL [$1a <= $5a] : BYTE($1a) ENTRY START_FUNCTION LABEL(0)      BYTE ENTRY START_FUNCTION CLEAR_LOCAL [$1a <= $4a] : BYTE($1a) ENTRY START_FUNCTION - BYTE ENTRY START_FUNCTION CLEAR_2_LOCAL [$1a <= $4a] : BYTE($1a) ENTRY START_FUNCTION - BYTE ENTRY START_FUNCTION CLEAR_4_LOCAL [$1a <= $4a] : BYTE($1a) ENTRY START_FUNCTION + BYTE ENTRY START_FUNCTION CLEAR_N_LOCAL [$1a <= $4a] : BYTE($1a) ENTRY START_FUNCTION      CLEAR_LOCAL CLEAR_LOCAL($1a) : CLEAR_LOCAL($1a) - CLEAR_LOCAL CLEAR_LOCAL($1a+1) : CLEAR_2_LOCAL($1a) - CLEAR_2_LOCAL CLEAR_2_LOCAL($1a+2) : CLEAR_4_LOCAL($1a) + CLEAR_LOCAL CLEAR_LOCAL($1a+1) : CLEAR_N_LOCAL($1a,2)    - // Attempt to make the above trigger more often. - CLEAR_LOCAL CLEAR_2_LOCAL($1a+1) : CLEAR_2_LOCAL($1a) CLEAR_LOCAL($2a+1) - CLEAR_LOCAL CLEAR_4_LOCAL($1a+1) : CLEAR_4_LOCAL($1a) CLEAR_LOCAL($2a+3) - CLEAR_2_LOCAL CLEAR_4_LOCAL($1a+2) : CLEAR_4_LOCAL($1a) CLEAR_2_LOCAL($2a+2) + CLEAR_LOCAL CLEAR_N_LOCAL($1a+1) : CLEAR_N_LOCAL($1a,$2b+1) + CLEAR_N_LOCAL CLEAR_LOCAL($1a+$1b) : CLEAR_N_LOCAL($1a,$1b+1)      // Attempt to de-interleave clearing of locals.   CONST0 CLEAR_LOCAL : CLEAR_LOCAL($2a) CONST0