Branch: Tag:

2000-12-01

2000-12-01 01:13:46 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

branch unwinding implemented, will help performance of loops using BREAK a lot

Rev: src/docode.c:1.85
Rev: src/opcodes.h:1.7
Rev: src/peep.c:1.41
Rev: src/peep.h:1.7
Rev: src/peep.in:1.42

1:   // - // $Id: peep.in,v 1.41 2000/10/09 23:59:20 hubbe Exp $ + // $Id: peep.in,v 1.42 2000/12/01 01:13:46 hubbe Exp $   //      NOP :
75:   POP_VALUE RETURN_1: RETURN_1   POP_N_ELEMS RETURN_1: RETURN_1    + NOTREACHED !LABEL : NOTREACHED   BRANCH !LABEL : BRANCH($1a)   RETURN !LABEL : RETURN   RETURN_0 !LABEL : RETURN_0
246:   BRANCH_IF_LOCAL POINTER LABEL($2a) : LABEL($2a)   BRANCH_IF_NOT_LOCAL POINTER LABEL($2a) : LABEL($2a)    - DEC_LOCAL_AND_POP LOCAL ($1a) : DEC_LOCAL ($1a) - INC_LOCAL_AND_POP LOCAL ($1a) : INC_LOCAL ($1a) + #define OPT_INCDEC(X) \ + X##_LOCAL_AND_POP LOCAL ($1a) : X##_LOCAL ($1a) ; \ + X##_LOCAL_AND_POP LOCAL LOCAL ($1a) : LOCAL($2a) X##_LOCAL ($1a) ; \ + X##_LOCAL_AND_POP GLOBAL LOCAL ($1a) : GLOBAL($2a) X##_LOCAL ($1a) ; +  + OPT_INCDEC(INC) + OPT_INCDEC(DEC) +    ASSIGN_LOCAL_AND_POP LOCAL($1a) : ASSIGN_LOCAL($1a)   ASSIGN_GLOBAL_AND_POP GLOBAL($1a) : ASSIGN_GLOBAL($1a)   APPLY_ASSIGN_LOCAL_AND_POP LOCAL ($1b) : APPLY_ASSIGN_LOCAL($1a,$1b)