pike.git / src / lex.c

version» Context lines:

pike.git/src/lex.c: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: lex.c,v 1.114 2003/08/06 18:05:27 mast Exp $ + || $Id: lex.c,v 1.115 2003/08/20 16:45:02 mast Exp $   */      #include "global.h" - RCSID("$Id: lex.c,v 1.114 2003/08/06 18:05:27 mast Exp $"); + RCSID("$Id: lex.c,v 1.115 2003/08/20 16:45:02 mast Exp $");   #include "language.h"   #include "array.h"   #include "lex.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "constants.h"   #include "hashtable.h"   #include "stuff.h"   #include "pike_memory.h"   #include "interpret.h"
pike.git/src/lex.c:149: Inside #if defined(PIKE_USE_MACHINE_CODE)
     #ifdef PIKE_USE_MACHINE_CODE   #define ADDR(X) , (void *)PIKE_CONCAT(opcode_,X)   #define NULLADDR , 0   #define ALIASADDR(X) , (void *)(X)      #define OPCODE0(OP,DESC,FLAGS) void PIKE_CONCAT(opcode_,OP)(void);   #define OPCODE1(OP,DESC,FLAGS) void PIKE_CONCAT(opcode_,OP)(INT32);   #define OPCODE2(OP,DESC,FLAGS) void PIKE_CONCAT(opcode_,OP)(INT32,INT32);    - #define OPCODE0_TAIL(OP,DESC,FLAGS) void PIKE_CONCAT(opcode_,OP)(void); - #define OPCODE1_TAIL(OP,DESC,FLAGS) void PIKE_CONCAT(opcode_,OP)(INT32); - #define OPCODE2_TAIL(OP,DESC,FLAGS) void PIKE_CONCAT(opcode_,OP)(INT32,INT32); -  +    #ifdef OPCODE_RETURN_JUMPADDR   #define OPCODE0_JUMP(OP,DESC,FLAGS) void *PIKE_CONCAT(jump_opcode_,OP)(void);   #define OPCODE1_JUMP(OP,DESC,FLAGS) void *PIKE_CONCAT(jump_opcode_,OP)(INT32);   #define OPCODE2_JUMP(OP,DESC,FLAGS) void *PIKE_CONCAT(jump_opcode_,OP)(INT32,INT32); - #define OPCODE0_TAILJUMP(OP,DESC,FLAGS) void *PIKE_CONCAT(jump_opcode_,OP)(void); - #define OPCODE1_TAILJUMP(OP,DESC,FLAGS) void *PIKE_CONCAT(jump_opcode_,OP)(INT32); - #define OPCODE2_TAILJUMP(OP,DESC,FLAGS) void *PIKE_CONCAT(jump_opcode_,OP)(INT32,INT32); +    #define JUMPADDR(X) , (void *)PIKE_CONCAT(jump_opcode_,X)   #else /* !OPCODE_RETURN_JUMPADDR */   #define OPCODE0_JUMP(OP, DESC, FLAGS) OPCODE0(OP, DESC, FLAGS)   #define OPCODE1_JUMP(OP, DESC, FLAGS) OPCODE1(OP, DESC, FLAGS)   #define OPCODE2_JUMP(OP, DESC, FLAGS) OPCODE2(OP, DESC, FLAGS) - #define OPCODE0_TAILJUMP(OP, DESC, FLAGS) OPCODE0_TAIL(OP, DESC, FLAGS) - #define OPCODE1_TAILJUMP(OP, DESC, FLAGS) OPCODE1_TAIL(OP, DESC, FLAGS) - #define OPCODE2_TAILJUMP(OP, DESC, FLAGS) OPCODE2_TAIL(OP, DESC, FLAGS) +    #define JUMPADDR(X) ADDR(X)   #endif /* !OPCODE_RETURN_JUMPADDR */      #define OPCODE0_PTRJUMP(OP,DESC,FLAGS) OPCODE0_JUMP(OP, DESC, FLAGS)   #define OPCODE1_PTRJUMP(OP,DESC,FLAGS) OPCODE1_JUMP(OP, DESC, FLAGS)   #define OPCODE2_PTRJUMP(OP,DESC,FLAGS) OPCODE2_JUMP(OP, DESC, FLAGS) - #define OPCODE0_TAILPTRJUMP(OP,DESC,FLAGS) OPCODE0_TAILJUMP(OP, DESC, FLAGS) - #define OPCODE1_TAILPTRJUMP(OP,DESC,FLAGS) OPCODE1_TAILJUMP(OP, DESC, FLAGS) - #define OPCODE2_TAILPTRJUMP(OP,DESC,FLAGS) OPCODE2_TAILJUMP(OP, DESC, FLAGS) +       #define OPCODE0_RETURN(OP,DESC,FLAGS) OPCODE0_JUMP(OP, DESC, FLAGS)   #define OPCODE1_RETURN(OP,DESC,FLAGS) OPCODE1_JUMP(OP, DESC, FLAGS)   #define OPCODE2_RETURN(OP,DESC,FLAGS) OPCODE2_JUMP(OP, DESC, FLAGS) - #define OPCODE0_TAILRETURN(OP,DESC,FLAGS) OPCODE0_TAILJUMP(OP, DESC, FLAGS) - #define OPCODE1_TAILRETURN(OP,DESC,FLAGS) OPCODE1_TAILJUMP(OP, DESC, FLAGS) - #define OPCODE2_TAILRETURN(OP,DESC,FLAGS) OPCODE2_TAILJUMP(OP, DESC, FLAGS) +       #define OPCODE0_ALIAS(OP, DESC, FLAGS, ADDR)   #define OPCODE1_ALIAS(OP, DESC, FLAGS, ADDR)   #define OPCODE2_ALIAS(OP, DESC, FLAGS, ADDR)      #ifdef OPCODE_INLINE_BRANCH   #define OPCODE0_BRANCH(OP,DESC,FLAGS) int PIKE_CONCAT(test_opcode_,OP)(void);   #define OPCODE1_BRANCH(OP,DESC,FLAGS) int PIKE_CONCAT(test_opcode_,OP)(INT32);   #define OPCODE2_BRANCH(OP,DESC,FLAGS) int PIKE_CONCAT(test_opcode_,OP)(INT32,INT32); - #define OPCODE0_TAILBRANCH(OP,DESC,FLAGS) int PIKE_CONCAT(test_opcode_,OP)(void); - #define OPCODE1_TAILBRANCH(OP,DESC,FLAGS) int PIKE_CONCAT(test_opcode_,OP)(INT32); - #define OPCODE2_TAILBRANCH(OP,DESC,FLAGS) int PIKE_CONCAT(test_opcode_,OP)(INT32,INT32); +    #define BRANCHADDR(X) , (void *)PIKE_CONCAT(test_opcode_,X)   #else /* !OPCODE_INLINE_BRANCH */   #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 +    #define BRANCHADDR(X) JUMPADDR(X)   #endif /* OPCODE_INLINE_BRANCH */    -  + #define OPCODE0_TAIL(OP,DESC,FLAGS) OPCODE0(OP,DESC,FLAGS) + #define OPCODE1_TAIL(OP,DESC,FLAGS) OPCODE1(OP,DESC,FLAGS) + #define OPCODE2_TAIL(OP,DESC,FLAGS) OPCODE2(OP,DESC,FLAGS) + #define OPCODE0_TAILJUMP(OP,DESC,FLAGS) OPCODE0_JUMP(OP,DESC,FLAGS) + #define OPCODE1_TAILJUMP(OP,DESC,FLAGS) OPCODE1_JUMP(OP,DESC,FLAGS) + #define OPCODE2_TAILJUMP(OP,DESC,FLAGS) OPCODE2_JUMP(OP,DESC,FLAGS) + #define OPCODE0_TAILPTRJUMP(OP,DESC,FLAGS) OPCODE0_PTRJUMP(OP, DESC, FLAGS) + #define OPCODE1_TAILPTRJUMP(OP,DESC,FLAGS) OPCODE1_PTRJUMP(OP, DESC, FLAGS) + #define OPCODE2_TAILPTRJUMP(OP,DESC,FLAGS) OPCODE2_PTRJUMP(OP, DESC, FLAGS) + #define OPCODE0_TAILRETURN(OP,DESC,FLAGS) OPCODE0_RETURN(OP, DESC, FLAGS) + #define OPCODE1_TAILRETURN(OP,DESC,FLAGS) OPCODE1_RETURN(OP, DESC, FLAGS) + #define OPCODE2_TAILRETURN(OP,DESC,FLAGS) OPCODE2_RETURN(OP, DESC, FLAGS) + #define OPCODE0_TAILBRANCH(OP,DESC,FLAGS) OPCODE0_BRANCH(OP,DESC,FLAGS) + #define OPCODE1_TAILBRANCH(OP,DESC,FLAGS) OPCODE1_BRANCH(OP,DESC,FLAGS) + #define OPCODE2_TAILBRANCH(OP,DESC,FLAGS) OPCODE2_BRANCH(OP,DESC,FLAGS) +    #include "interpret_protos.h"      #undef OPCODE0   #undef OPCODE1   #undef OPCODE2   #undef OPCODE0_TAIL   #undef OPCODE1_TAIL   #undef OPCODE2_TAIL      #undef OPCODE0_JUMP