pike.git / src / interpreter.h

version» Context lines:

pike.git/src/interpreter.h:13:   #undef SKIPJUMP   #undef DOJUMP   #undef CASE   #undef BREAK   #undef DONE      #undef JUMP_DONE   #define JUMP_DONE DONE       - #define CASE(X) case (X)-F_OFFSET: + #define CASE(X) case (X):   #define DONE break   #define FETCH      #define LOW_GET_ARG() ((PROG_COUNTER++)[0])   #if PIKE_BYTECODE_METHOD == PIKE_BYTECODE_SPARC   #define LOW_GET_JUMP() (PROG_COUNTER[0])   #define LOW_SKIPJUMP() (++PROG_COUNTER)   #else /* PIKE_BYTECODE_METHOD != PIKE_BYTECODE_SPARC */   #define LOW_GET_JUMP() (INT32)get_unaligned32(PROG_COUNTER)   #define LOW_SKIPJUMP() (PROG_COUNTER += sizeof(INT32))
pike.git/src/interpreter.h:72:    PIKE_INSTR_T instr = pc[0];    Pike_fp->pc = pc++;       STEP_BREAK_LINE      #ifdef PIKE_DEBUG    if (d_flag || Pike_interpreter.trace_level > 2)    low_debug_instr_prologue (instr);   #endif    -  switch(instr) +  switch(instr + F_OFFSET)    {    /* NOTE: The prefix handling is not needed in computed-goto mode. */    /* Support to allow large arguments */ -  CASE(F_PREFIX_256); prefix+=256; DONE; -  CASE(F_PREFIX_512); prefix+=512; DONE; -  CASE(F_PREFIX_768); prefix+=768; DONE; -  CASE(F_PREFIX_1024); prefix+=1024; DONE; -  CASE(F_PREFIX_24BITX256); +  case F_PREFIX_256: prefix+=256; break; +  case F_PREFIX_512: prefix+=512; break; +  case F_PREFIX_768: prefix+=768; break; +  case F_PREFIX_1024: prefix+=1024; break; +  case F_PREFIX_24BITX256:    prefix += (unsigned INT32)(pc++)[0]<<24; -  CASE(F_PREFIX_WORDX256); +  /* FALLTHRU */ +  case F_PREFIX_WORDX256:    prefix += (unsigned INT32)(pc++)[0]<<16; -  CASE(F_PREFIX_CHARX256); +  /* FALLTHRU */ +  case F_PREFIX_CHARX256:    prefix += (pc++)[0]<<8; -  DONE; +  break;       /* Support to allow large arguments */ -  CASE(F_PREFIX2_256); prefix2+=256; DONE; -  CASE(F_PREFIX2_512); prefix2+=512; DONE; -  CASE(F_PREFIX2_768); prefix2+=768; DONE; -  CASE(F_PREFIX2_1024); prefix2+=1024; DONE; -  CASE(F_PREFIX2_24BITX256); +  case F_PREFIX2_256: prefix2+=256; break; +  case F_PREFIX2_512: prefix2+=512; break; +  case F_PREFIX2_768: prefix2+=768; break; +  case F_PREFIX2_1024: prefix2+=1024; break; +  case F_PREFIX2_24BITX256:    prefix2 += (unsigned INT32)(pc++)[0]<<24; -  CASE(F_PREFIX2_WORDX256); +  /* FALLTHRU */ +  case F_PREFIX2_WORDX256:    prefix2 += (unsigned INT32)(pc++)[0]<<16; -  CASE(F_PREFIX2_CHARX256); +  /* FALLTHRU */ +  case F_PREFIX2_CHARX256:    prefix2 += (pc++)[0]<<8; -  DONE; +  break;         #define INTERPRETER      #define OPCODE0(OP, DESC, FLAGS, CODE) CASE(OP); CODE; DONE   #define OPCODE1(OP, DESC, FLAGS, CODE) CASE(OP); { \    arg1=GET_ARG(); \    FETCH; \    CODE; \    } DONE
pike.git/src/interpreter.h:170:   #define OPCODE1_TAILPTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE   #define OPCODE2_TAILPTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE      #define OPCODE0_BRANCH OPCODE0_PTRJUMP   #define OPCODE1_BRANCH OPCODE1_PTRJUMP   #define OPCODE2_BRANCH OPCODE2_PTRJUMP   #define OPCODE0_TAILBRANCH OPCODE0_TAILPTRJUMP   #define OPCODE1_TAILBRANCH OPCODE1_TAILPTRJUMP   #define OPCODE2_TAILBRANCH OPCODE2_TAILPTRJUMP    + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 7 + # define ADVERTISE_FALLTHROUGH ATTRIBUTE((fallthrough)); + #else + # define ADVERTISE_FALLTHROUGH + #endif +    #include "interpret_functions.h"    -  + #undef ADVERTISE_FALLTHROUGH +     default:    Pike_fatal("Strange instruction %ld\n",(long)instr);    }    }       UNREACHABLE();      }