pike.git / src / interpreter.h

version» Context lines:

pike.git/src/interpreter.h:6:   #undef GET_ARG2   #undef GET_JUMP   #undef SKIPJUMP   #undef DOJUMP   #undef CASE   #undef BREAK   #undef DONE      #ifdef HAVE_COMPUTED_GOTO    - #define CASE(OP) PIKE_CONCAT(LABEL_,OP): + #define CASE(OP) PIKE_CONCAT(LABEL_,OP): FETCH + #define FETCH (instr = pc[0])   #ifdef PIKE_DEBUG   #define DONE continue   #else /* !PIKE_DEBUG */   #define DONE do { \ -  Pike_fp->pc = pc; \ -  instr = (pc++)[0]; \ +  Pike_fp->pc = pc++; \    goto *instr; \    } while(0)      #endif /* PIKE_DEBUG */      #define LOW_GET_ARG() ((INT32)(ptrdiff_t)(*(pc++)))   #define LOW_GET_JUMP() ((INT32)(ptrdiff_t)(*(pc))) - #define LOW_SKIPJUMP() (pc++) + #define LOW_SKIPJUMP() (instr = (++pc)[0])      #define GET_ARG() LOW_GET_ARG()   #define GET_ARG2() LOW_GET_ARG()      #else /* !HAVE_COMPUTED_GOTO */      #define CASE(X) case (X)-F_OFFSET:   #define DONE break -  + #define FETCH      #define LOW_GET_ARG() ((pc++)[0])   #define LOW_GET_JUMP() EXTRACT_INT(pc)   #define LOW_SKIPJUMP() (pc += sizeof(INT32))      #ifdef PIKE_DEBUG      #define GET_ARG() (backlog[backlogp].arg=(\    instr=prefix,\    prefix=0,\
pike.git/src/interpreter.h:84:      #define GET_JUMP() LOW_GET_JUMP()   #define SKIPJUMP() LOW_SKIPJUMP()      #endif /* PIKE_DEBUG */      #define DOJUMP() do { \    INT32 tmp; \    tmp = GET_JUMP(); \    pc += tmp; \ +  FETCH; \    if(tmp < 0) \    fast_check_threads_etc(6); \    } while(0)      #ifndef STEP_BREAK_LINE   #define STEP_BREAK_LINE   #endif      static int eval_instruction(PIKE_OPCODE_T *pc)   {
pike.git/src/interpreter.h:110:   #endif /* HAVE_COMPUTED_GOTO */      #ifdef HAVE_COMPUTED_GOTO    goto *strap;    normal_strap:   #endif /* HAVE_COMPUTED_GOTO */       debug_malloc_touch(Pike_fp);    while(1)    { -  Pike_fp->pc = pc; -  instr = (pc++)[0]; +  instr = pc[0]; +  Pike_fp->pc = pc++;       STEP_BREAK_LINE      #ifdef PIKE_DEBUG       if(t_flag > 2)    {    char *file, *f;    INT32 linep;   
pike.git/src/interpreter.h:271:    prefix2 += (pc++)[0]<<8;    DONE;   #endif /* HAVE_COMPUTED_GOTO */         #define INTERPRETER      #define OPCODE0(OP, DESC, CODE) CASE(OP); CODE; DONE   #define OPCODE1(OP, DESC, CODE) CASE(OP); { \    INT32 arg1=GET_ARG(); \ +  FETCH; \    CODE; \    } DONE      #define OPCODE2(OP, DESC, CODE) CASE(OP); { \    INT32 arg1=GET_ARG(); \    INT32 arg2=GET_ARG2(); \ -  +  FETCH; \    CODE; \    } DONE      #define OPCODE0_TAIL(OP, DESC, CODE) CASE(OP); CODE   #define OPCODE1_TAIL(OP, DESC, CODE) CASE(OP); CODE   #define OPCODE2_TAIL(OP, DESC, CODE) CASE(OP); CODE      #define OPCODE0_JUMP(OP, DESC, CODE) CASE(OP); CODE; DONE   #define OPCODE0_TAILJUMP(OP, DESC, CODE) CASE(OP); CODE      /* These are something of a special case as they    * requires a POINTER stored explicitly after    * the instruction itself.    */   #define OPCODE1_JUMP(OP, DESC, CODE) CASE(OP); { \    INT32 arg1=GET_ARG(); \ -  +  FETCH; \    CODE; \    } DONE      #define OPCODE2_JUMP(OP, DESC, CODE) CASE(OP); { \    INT32 arg1=GET_ARG(); \    INT32 arg2=GET_ARG2(); \ -  +  FETCH; \    CODE; \    } DONE      #define OPCODE1_TAILJUMP(OP, DESC, CODE) CASE(OP); CODE   #define OPCODE2_TAILJUMP(OP, DESC, CODE) CASE(OP); CODE      #include "interpret_functions.h"      #ifndef HAVE_COMPUTED_GOTO    default: