pike.git / src / peep.in

version» Context lines:

pike.git/src/peep.in:52:   NEGATE CONST1 SUBTRACT : COMPL   CONST1 ADD_INTS NEGATE : COMPL   ADD_INT(1) NEGATE : COMPL   CONST_1 SUBTRACT NEGATE : COMPL   COMPL CONST1 ADD_INTS : NEGATE   COMPL ADD_INT(1) : NEGATE   COMPL CONST_1 SUBTRACT : NEGATE   CONST_1 ADD_INTS COMPL : NEGATE   ADD_NEG_INT(1) COMPL : NEGATE   CONST1 SUBTRACT COMPL : NEGATE - NUMBER ASSIGN_LOCAL NEGATE: NUMBER($1a) ASSIGN_LOCAL_AND_POP($2a) NEG_NUMBER($1a) - NEG_NUMBER ASSIGN_LOCAL NEGATE: NEG_NUMBER($1a) ASSIGN_LOCAL_AND_POP($2a) NUMBER($1a) - CONST1 ASSIGN_LOCAL NEGATE: CONST1 ASSIGN_LOCAL_AND_POP($2a) CONST_1 - CONST_1 ASSIGN_LOCAL NEGATE: CONST_1 ASSIGN_LOCAL_AND_POP($2a) CONST1 +     - CONST0 ASSIGN_LOCAL: CLEAR_LOCAL($2a) CONST0 -  +    LOCAL_2_LOCAL [$1a == $1b] :   GLOBAL ASSIGN_GLOBAL_AND_POP($1a) :      // Generated by for( int i=0; i<local; i++ ) where i is not used in   // the loop.   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)
pike.git/src/peep.in:91:   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)   LOCAL_LVALUE CONST1 ADD_TO_AND_POP: ADD_LOCAL_INT_AND_POP($1a,1)   LOCAL_LVALUE CONST0 ADD_TO_AND_POP:      LOCAL_LVALUE LTOSVAL ADD_INT ASSIGN: ADD_LOCAL_INT($1a,$3a)   LOCAL_LVALUE LTOSVAL ADD_NEG_INT [ !INT32_NEG_OVERFLOW($3a) ] ASSIGN: ADD_LOCAL_INT($1a,-$3a)      NUMBER ASSIGN_LOCAL_AND_POP : ASSIGN_LOCAL_NUMBER_AND_POP($2a,$1a) + NEG_NUMBER ASSIGN_LOCAL_AND_POP [ !INT32_NEG_OVERFLOW($1a) ] : ASSIGN_LOCAL_NUMBER_AND_POP($2a,-$1a)   CONST0 ASSIGN_LOCAL_AND_POP : CLEAR_LOCAL($2a)   CONST1 ASSIGN_LOCAL_AND_POP : ASSIGN_LOCAL_NUMBER_AND_POP($2a,1)   CONST_1 ASSIGN_LOCAL_AND_POP : ASSIGN_LOCAL_NUMBER_AND_POP($2a,-1)      NUMBER ASSIGN_GLOBAL_AND_POP : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,$1a) -  + NEG_NUMBER ASSIGN_GLOBAL_AND_POP [ !INT32_NEG_OVERFLOW($1a) ] : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,-$1a)   CONST0 ASSIGN_GLOBAL_AND_POP : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,0)   CONST1 ASSIGN_GLOBAL_AND_POP : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,1)   CONST_1 ASSIGN_GLOBAL_AND_POP : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,-1)    -  + // Propagate constants past assignments. + NUMBER ASSIGN_LOCAL : ASSIGN_LOCAL_NUMBER_AND_POP($2a,$1a) NUMBER($1a) + NEG_NUMBER ASSIGN_LOCAL [ !INT32_NEG_OVERFLOW($1a) ] : ASSIGN_LOCAL_NUMBER_AND_POP($2a,-$1a) NEG_NUMBER($1a) + CONST0 ASSIGN_LOCAL : CLEAR_LOCAL($2a) CONST0 + CONST1 ASSIGN_LOCAL : ASSIGN_LOCAL_NUMBER_AND_POP($2a,1) CONST1 + CONST_1 ASSIGN_LOCAL : ASSIGN_LOCAL_NUMBER_AND_POP($2a,-1) CONST_1 +  + NUMBER ASSIGN_GLOBAL : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,$1a) NUMBER($1a) + NEG_NUMBER ASSIGN_GLOBAL [ !INT32_NEG_OVERFLOW($1a) ] : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,-$1a) NEG_NUMBER($1a) + CONST0 ASSIGN_GLOBAL : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,0) CONST0 + CONST1 ASSIGN_GLOBAL : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,1) CONST1 + CONST_1 ASSIGN_GLOBAL : ASSIGN_GLOBAL_NUMBER_AND_POP($2a,-1) CONST_1 +    // 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_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_N_LOCAL [$1a <= $4a] : BYTE($1a) ENTRY START_FUNCTION      CLEAR_LOCAL CLEAR_LOCAL($1a) : CLEAR_LOCAL($1a)   CLEAR_LOCAL CLEAR_LOCAL($1a+1) : CLEAR_N_LOCAL($1a,2)
pike.git/src/peep.in:347:   // MULTIPLY_INT(0): POP_VALUE CONST0 // cf string * int ==> string   MULTIPLY_INT(1):   MULTIPLY_INT(-1): NEGATE      // this should be automatically const optimized, right?   // ADD_INTS ADD_INTS: ADD_INTS ($1a+$2a)         // This set of optimizations is broken. Consider the case:   // STRING ADD_INT ADD_INT + //   // ADD_INT ADD_INT: ADD_INTS ($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)      // FIXME: What about LTOSVAL_AND_FREE variants of the following three rules?      LTOSVAL2_AND_FREE ADD ASSIGN : ADD_TO
pike.git/src/peep.in:772:   GLOBAL_LVALUE NUMBER ASSIGN_GLOBAL_AND_POP($1a) DEC_AND_POP : NUMBER($2a) ADD_NEG_INT(1) ASSIGN_GLOBAL_AND_POP($1a)   GLOBAL_LVALUE NEG_NUMBER ASSIGN_GLOBAL_AND_POP($1a) INC_AND_POP : NEG_NUMBER($2a) ADD_INT(1) ASSIGN_GLOBAL_AND_POP($1a)   GLOBAL_LVALUE NEG_NUMBER ASSIGN_GLOBAL_AND_POP($1a) DEC_AND_POP : NEG_NUMBER($2a) ADD_NEG_INT(1) ASSIGN_GLOBAL_AND_POP($1a)      // Move marks to where they're relevant.   MARK CLEAR_LOCAL: CLEAR_LOCAL($2a) MARK   MARK ASSIGN_LOCAL_NUMBER_AND_POP: ASSIGN_LOCAL_NUMBER_AND_POP($2a,$2b) MARK   MARK ASSIGN_GLOBAL_NUMBER_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($2a,$2b) MARK   MARK NEG_NUMBER ASSIGN_LOCAL_AND_POP: NEG_NUMBER($2a) ASSIGN_LOCAL_AND_POP($3a) MARK   MARK NEG_NUMBER ASSIGN_GLOBAL_AND_POP: NEG_NUMBER($2a) ASSIGN_GLOBAL_AND_POP($3a) MARK - MARK_AND_CONST1 ASSIGN_LOCAL_AND_POP: CONST1 ASSIGN_LOCAL_AND_POP($3a) MARK - MARK_AND_CONST1 ASSIGN_GLOBAL_AND_POP: CONST1 ASSIGN_GLOBAL_AND_POP($3a) MARK - MARK CONST_1 ASSIGN_GLOBAL_AND_POP: CONST_1 ASSIGN_GLOBAL_AND_POP($3a) MARK -  - CONST_1 ASSIGN_LOCAL COMPL : CONST_1 ASSIGN_LOCAL_AND_POP($2a) CONST0 - CONST_1 ASSIGN_GLOBAL COMPL : CONST_1 ASSIGN_GLOBAL_AND_POP($2a) CONST0 -  - CONST0 ASSIGN_LOCAL COMPL : CLEAR_LOCAL($2a) CONST_1 - CONST0 ASSIGN_GLOBAL COMPL : CONST0 ASSIGN_GLOBAL_AND_POP($2a) CONST_1 + MARK_AND_CONST1 ASSIGN_LOCAL_AND_POP: ASSIGN_LOCAL_NUMBER_AND_POP($3a,1) MARK + MARK_AND_CONST1 ASSIGN_GLOBAL_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($3a,1) MARK