pike.git / src / interpreter.h

version» Context lines:

pike.git/src/interpreter.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpreter.h,v 1.84 2003/03/22 17:32:20 grubba Exp $ + || $Id: interpreter.h,v 1.85 2003/08/06 18:05:27 mast Exp $   */      #undef LOW_GET_ARG   #undef LOW_GET_JUMP   #undef LOW_SKIPJUMP   #undef GET_ARG   #undef GET_ARG2   #undef GET_JUMP   #undef SKIPJUMP   #undef DOJUMP   #undef CASE   #undef BREAK   #undef DONE    -  + #undef JUMP_DONE + #define JUMP_DONE DONE +    #ifdef HAVE_COMPUTED_GOTO      #define CASE(OP) PIKE_CONCAT(LABEL_,OP): FETCH   #define FETCH (instr = PROG_COUNTER[0])   #ifdef PIKE_DEBUG   #define DONE continue   #else /* !PIKE_DEBUG */   #define DONE do { \    Pike_fp->pc = PROG_COUNTER++; \    goto *instr; \
pike.git/src/interpreter.h:161:    } DONE      #define OPCODE0_ALIAS(OP, DESC, FLAGS, FUN) OPCODE0(OP, DESC, FLAGS, {FUN();})   #define OPCODE1_ALIAS(OP, DESC, FLAGS, FUN) OPCODE1(OP, DESC, FLAGS, {FUN(arg1);})   #define OPCODE2_ALIAS(OP, DESC, FLAGS, FUN) OPCODE2(OP, DESC, FLAGS, {FUN(arg1, arg2);})      #define OPCODE0_TAIL(OP, DESC, FLAGS, CODE) CASE(OP); CODE   #define OPCODE1_TAIL(OP, DESC, FLAGS, CODE) CASE(OP); CODE   #define OPCODE2_TAIL(OP, DESC, FLAGS, CODE) CASE(OP); CODE    + #define OPCODE0_JUMP OPCODE0 + #define OPCODE1_JUMP OPCODE1 + #define OPCODE2_JUMP OPCODE2 + #define OPCODE0_TAILJUMP OPCODE0_TAIL + #define OPCODE1_TAILJUMP OPCODE1_TAIL + #define OPCODE2_TAILJUMP OPCODE2_TAIL +    #define OPCODE0_RETURN(OP, DESC, FLAGS, CODE) OPCODE0(OP, DESC, FLAGS, CODE)   #define OPCODE1_RETURN(OP, DESC, FLAGS, CODE) OPCODE1(OP, DESC, FLAGS, CODE)   #define OPCODE2_RETURN(OP, DESC, FLAGS, CODE) OPCODE2(OP, DESC, FLAGS, CODE)   #define OPCODE0_TAILRETURN(OP, DESC, FLAGS, CODE) OPCODE0_TAIL(OP, DESC, FLAGS, CODE)   #define OPCODE1_TAILRETURN(OP, DESC, FLAGS, CODE) OPCODE1_TAIL(OP, DESC, FLAGS, CODE)   #define OPCODE2_TAILRETURN(OP, DESC, FLAGS, CODE) OPCODE2_TAIL(OP, DESC, FLAGS, CODE)    - #define OPCODE0_JUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE; DONE - #define OPCODE0_TAILJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE + #define OPCODE0_PTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE; DONE + #define OPCODE0_TAILPTRJUMP(OP, DESC, FLAGS, 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, FLAGS, CODE) CASE(OP); { \ + #define OPCODE1_PTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); { \    INT32 arg1=GET_ARG(); \    FETCH; \    CODE; \    } DONE    - #define OPCODE2_JUMP(OP, DESC, FLAGS, CODE) CASE(OP); { \ + #define OPCODE2_PTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); { \    INT32 arg1=GET_ARG(); \    INT32 arg2=GET_ARG2(); \    FETCH; \    CODE; \    } DONE    - #define OPCODE1_TAILJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE - #define OPCODE2_TAILJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE + #define OPCODE1_TAILPTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE + #define OPCODE2_TAILPTRJUMP(OP, DESC, FLAGS, CODE) CASE(OP); CODE    - #define OPCODE0_BRANCH OPCODE0_JUMP - #define OPCODE1_BRANCH OPCODE1_JUMP - #define OPCODE2_BRANCH OPCODE2_JUMP - #define OPCODE0_TAILBRANCH OPCODE0_TAILJUMP - #define OPCODE1_TAILBRANCH OPCODE1_TAILJUMP - #define OPCODE2_TAILBRANCH OPCODE2_TAILJUMP + #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      #include "interpret_functions.h"      #ifndef HAVE_COMPUTED_GOTO    default:    Pike_fatal("Strange instruction %ld\n",(long)instr);    }   #endif /* !HAVE_COMPUTED_GOTO */    }   
pike.git/src/interpreter.h:223:   #undef OPCODE2   #undef OPCODE0_TAIL   #undef OPCODE1_TAIL   #undef OPCODE2_TAIL   #undef OPCODE0_JUMP   #undef OPCODE1_JUMP   #undef OPCODE2_JUMP   #undef OPCODE0_TAILJUMP   #undef OPCODE1_TAILJUMP   #undef OPCODE2_TAILJUMP + #undef OPCODE0_PTRJUMP + #undef OPCODE1_PTRJUMP + #undef OPCODE2_PTRJUMP + #undef OPCODE0_TAILPTRJUMP + #undef OPCODE1_TAILPTRJUMP + #undef OPCODE2_TAILPTRJUMP   #undef OPCODE0_RETURN   #undef OPCODE1_RETURN   #undef OPCODE2_RETURN   #undef OPCODE0_TAILRETURN   #undef OPCODE1_TAILRETURN   #undef OPCODE2_TAILRETURN   #undef OPCODE0_BRANCH   #undef OPCODE1_BRANCH   #undef OPCODE2_BRANCH   #undef OPCODE0_TAILBRANCH
pike.git/src/interpreter.h:249:    */   #undef LABEL   #define LABEL(OP) &&PIKE_CONCAT(LABEL_,OP)   #define NULL_LABEL(OP) NULL   #define OPCODE0(OP,DESC) LABEL(OP),   #define OPCODE1(OP,DESC) LABEL(OP),   #define OPCODE2(OP,DESC) LABEL(OP),   #define OPCODE0_TAIL(OP,DESC) LABEL(OP),   #define OPCODE1_TAIL(OP,DESC) LABEL(OP),   #define OPCODE2_TAIL(OP,DESC) LABEL(OP), - #define OPCODE0_JUMP(OP,DESC) LABEL(OP), - #define OPCODE1_JUMP(OP,DESC) LABEL(OP), - #define OPCODE2_JUMP(OP,DESC) LABEL(OP), - #define OPCODE0_TAILJUMP(OP,DESC) LABEL(OP), - #define OPCODE1_TAILJUMP(OP,DESC) LABEL(OP), - #define OPCODE2_TAILJUMP(OP,DESC) LABEL(OP), + #define OPCODE0_PTRJUMP(OP,DESC) LABEL(OP), + #define OPCODE1_PTRJUMP(OP,DESC) LABEL(OP), + #define OPCODE2_PTRJUMP(OP,DESC) LABEL(OP), + #define OPCODE0_TAILPTRJUMP(OP,DESC) LABEL(OP), + #define OPCODE1_TAILPTRJUMP(OP,DESC) LABEL(OP), + #define OPCODE2_TAILPTRJUMP(OP,DESC) LABEL(OP),   #define OPCODE0_RETURN(OP,DESC) LABEL(OP),   #define OPCODE1_RETURN(OP,DESC) LABEL(OP),   #define OPCODE2_RETURN(OP,DESC) LABEL(OP),   #define OPCODE0_TAILRETURN(OP,DESC) LABEL(OP),   #define OPCODE1_TAILRETURN(OP,DESC) LABEL(OP),   #define OPCODE2_TAILRETURN(OP,DESC) LABEL(OP),       init_strap:    strap = &&normal_strap;    {