pike.git / src / peep.in

version» Context lines:

pike.git/src/peep.in:1:   // - // $Id: peep.in,v 1.51 2001/06/07 21:46:50 hubbe Exp $ + // $Id: peep.in,v 1.52 2001/06/19 23:59:33 hubbe Exp $   //      NOP :   POP_N_ELEMS (0) :   POP_N_ELEMS POP_VALUE : POP_N_ELEMS ($1a + 1)   POP_VALUE POP_VALUE : POP_N_ELEMS (2)   POP_VALUE POP_N_ELEMS : POP_N_ELEMS ($2a + 1)   POP_N_ELEMS POP_N_ELEMS : POP_N_ELEMS ($1a + $2a)   POP_N_ELEMS(1) : POP_VALUE   POP_VALUE POP_TO_MARK : POP_TO_MARK   POP_N_ELEMS POP_TO_MARK : POP_TO_MARK      MARK MARK: MARK2   MARK POP_MARK:   // The opcode list is clearer without this.   //SYNCH_MARK POP_SYNCH_MARK:      ASSIGN_GLOBAL POP_VALUE : ASSIGN_GLOBAL_AND_POP($1a)   ASSIGN_LOCAL POP_VALUE : ASSIGN_LOCAL_AND_POP($1a) - CALL_LFUN POP_VALUE : CALL_LFUN_AND_POP($1a) - APPLY POP_VALUE : APPLY_AND_POP($1a) - CALL_FUNCTION POP_VALUE : CALL_FUNCTION_AND_POP +    RECUR POP_VALUE : RECUR_AND_POP($1a) - MARK APPLY : MARK_APPLY($2a) - MARK_APPLY POP_VALUE : MARK_APPLY_POP($1a) +    NUMBER(0) : CONST0   NUMBER(1) : CONST1   NUMBER(-1) : CONST_1   NUMBER (0x7fffffff) : BIGNUM   CONST0 NEGATE : CONST0   CONST1 NEGATE : CONST_1   CONST_1 NEGATE : CONST1   NUMBER NEGATE : NEG_NUMBER($1a)   NUMBER [$1a < 0 && (-$1a)>0] : NEG_NUMBER (-$1a)   NEG_NUMBER NEGATE : NUMBER ($1a)
pike.git/src/peep.in:84:      // F_SYNCH_MARK and F_POP_SYNCH_MARK is output only with -d3 and   // higher. We keep them solely for balancing the asm debug output.   #define DeadCodeEndCond(op) \    [op != F_LABEL && op != F_SYNCH_MARK && op != F_POP_SYNCH_MARK]   BRANCH ? DeadCodeEndCond($2o) : BRANCH($1a)   RETURN ? DeadCodeEndCond($2o) : RETURN   RETURN_0 ? DeadCodeEndCond($2o) : RETURN_0   RETURN_1 ? DeadCodeEndCond($2o) : RETURN_1   RETURN_LOCAL ? DeadCodeEndCond($2o) : RETURN_LOCAL($1a) - APPLY_AND_RETURN ? DeadCodeEndCond($2o) : APPLY_AND_RETURN($1a) - CALL_FUNCTION_AND_RETURN ? DeadCodeEndCond($2o) : CALL_FUNCTION_AND_RETURN($1a) - CALL_LFUN_AND_RETURN ? DeadCodeEndCond($2o) : CALL_LFUN_AND_RETURN($1a) +       LOCAL_LVALUE INC : INC_LOCAL ($1a)   LOCAL_LVALUE POST_INC : POST_INC_LOCAL ($1a)   LOCAL_LVALUE INC_AND_POP : INC_LOCAL_AND_POP ($1a)   INC_LOCAL POP_VALUE : INC_LOCAL_AND_POP ($1a)   POST_INC_LOCAL POP_VALUE : INC_LOCAL_AND_POP ($1a)      LOCAL_LVALUE DEC : DEC_LOCAL ($1a)   LOCAL_LVALUE POST_DEC : POST_DEC_LOCAL ($1a)   LOCAL_LVALUE DEC_AND_POP : DEC_LOCAL_AND_POP ($1a)
pike.git/src/peep.in:221:      LTOSVAL2 ADD_INTS ASSIGN_AND_POP : ADD_TO_AND_POP   LTOSVAL ADD_INTS ASSIGN_AND_POP : ADD_TO_AND_POP      LTOSVAL2 ADD_FLOATS ASSIGN_AND_POP : ADD_TO_AND_POP   LTOSVAL ADD_FLOATS ASSIGN_AND_POP : ADD_TO_AND_POP      LOCAL CONST1 ADD_TO_AND_POP : INC_LOCAL_AND_POP($1a)   LOCAL CONST_1 ADD_TO_AND_POP : DEC_LOCAL_AND_POP($1a)    - APPLY [ check_tailrecursion() ] RETURN : APPLY_AND_RETURN($1a) - CALL_FUNCTION [ check_tailrecursion() ] RETURN : CALL_FUNCTION_AND_RETURN - CALL_LFUN [ check_tailrecursion() ] RETURN : CALL_LFUN_AND_RETURN($1a) -  +    LOCAL RETURN : RETURN_LOCAL($1a)   #ifdef EAT_STACK   APPLY ASSIGN_LOCAL_AND_POP : APPLY_ASSIGN_LOCAL_AND_POP($1a,$2a)   #endif   ASSIGN_LOCAL_AND_POP INC_LOCAL_AND_POP($1a) : ADD_INT(1) ASSIGN_LOCAL_AND_POP($1a)   ASSIGN_LOCAL_AND_POP DEC_LOCAL_AND_POP($1a) : ADD_NEG_INT(1) ASSIGN_LOCAL_AND_POP($1a)   NUMBER ADD_INT [ !INT_TYPE_ADD_OVERFLOW($1a, $2a) ] : NUMBER($1a+$2a)   NUMBER ADD_NEG_INT [ !INT_TYPE_SUB_OVERFLOW($1a, $2a) ]: NUMBER($1a-$2a)   NEG_NUMBER ADD_INT [ !INT_TYPE_ADD_OVERFLOW(-$1a, $2a) ]: NUMBER(-$1a+$2a)   NEG_NUMBER ADD_NEG_INT [ !INT_TYPE_SUB_OVERFLOW(-$1a, $2a) ]: NUMBER(-$1a-$2a)
pike.git/src/peep.in:364:   // MARK TAIL_RECUR : BRANCH ($1a)      ASSIGN_LOCAL BRANCH_WHEN_ZERO 2_LOCALS(,$1a) BRANCH_WHEN_EQ : ASSIGN_LOCAL($1a) BRANCH_AND_POP_WHEN_ZERO($2a) LOCAL($3a) BRANCH_WHEN_EQ($4a)   ASSIGN_LOCAL BRANCH_WHEN_ZERO 2_LOCALS(,$1a) BRANCH_WHEN_NE : ASSIGN_LOCAL($1a) BRANCH_AND_POP_WHEN_ZERO($2a) LOCAL($3a) BRANCH_WHEN_NE($4a)      /* This will facilitate other optimizations I hope */   CLEAR_LOCAL MARK LOCAL [ $1a != $3a ] : MARK LOCAL($3a) CLEAR_LOCAL($1a)      /* The result of this optimization could be reordered... */   CLEAR_LOCAL MARK LOCAL($1a) : MARK CLEAR_LOCAL($1a) CONST0 +  +  +  + #define LOW_MKCALLOPTS(A) \ + A POP_VALUE: A##_AND_POP($1a); \ + A [ check_tailrecursion() ] RETURN : A##_AND_RETURN($1a); \ + A##_AND_RETURN ? DeadCodeEndCond($2o) : A##_AND_RETURN($1a) +  + #define MKCALLOPTS(A) \ + MARK A: MARK_##A($2a) ; \ + LOW_MKCALLOPTS(A); \ + LOW_MKCALLOPTS(MARK_##A); +  +  + MKCALLOPTS(APPLY) + MKCALLOPTS(CALL_FUNCTION) + MKCALLOPTS(CALL_LFUN) + MKCALLOPTS(CALL_BUILTIN) +