pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.220 2001/07/16 19:48:57 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.221 2001/07/17 06:50:35 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:750:   #define LOW_GET_JUMP() EXTRACT_INT(PROG_COUNTER)   #define LOW_SKIPJUMP() (PROG_COUNTER += sizeof(INT32))      /* Labels to jump to to cause eval_instruction to return */   /* FIXME: Replace these with assembler lables */   void *do_inter_return_label;   void *do_escape_catch_label;   void *dummy_label;       - #define OPCODE0(O,N,C) void PIKE_CONCAT(opcode_,O)(void) C - #define OPCODE1(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1) C - #define OPCODE2(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1,INT32 arg2) C + #define OPCODE0(O,N,C) \ + void PIKE_CONCAT(opcode_,O)(void) { \ + DO_IF_DEBUG(if(t_flag > 3) fprintf(stderr,"- %s()\n",N));\ + C }    - #define OPCODE0_JUMP(O,N,C) void PIKE_CONCAT(opcode_,O)(void) C - #define OPCODE1_JUMP(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1) C - #define OPCODE2_JUMP(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1,INT32 arg2) C + #define OPCODE1(O,N,C) \ + void PIKE_CONCAT(opcode_,O)(INT32 arg1) {\ + DO_IF_DEBUG(if(t_flag > 3) fprintf(stderr,"- %s(%d)\n",N,arg1)); \ + C }    - #define OPCODE0_TAIL(O,N,C) void PIKE_CONCAT(opcode_,O)(void) C - #define OPCODE1_TAIL(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1) C - #define OPCODE2_TAIL(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1,INT32 arg2) C +     - #define OPCODE0_TAILJUMP(O,N,C) void PIKE_CONCAT(opcode_,O)(void) C - #define OPCODE1_TAILJUMP(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1) C - #define OPCODE2_TAILJUMP(O,N,C) void PIKE_CONCAT(opcode_,O)(INT32 arg1,INT32 arg2) C + #define OPCODE2(O,N,C) \ + void PIKE_CONCAT(opcode_,O)(INT32 arg1,INT32 arg2) { \ + DO_IF_DEBUG(if(t_flag > 3) fprintf(stderr,"- %s(%d,%d)\n",N,arg1,arg2)); \ + C }    -  +  + #define OPCODE0_JUMP(O,N,C) OPCODE0(O,N,C) + #define OPCODE1_JUMP(O,N,C) OPCODE1(O,N,C) + #define OPCODE2_JUMP(O,N,C) OPCODE2(O,N,C) +  + #define OPCODE0_TAIL(O,N,C) OPCODE0(O,N,C) + #define OPCODE1_TAIL(O,N,C) OPCODE1(O,N,C) + #define OPCODE2_TAIL(O,N,C) OPCODE2(O,N,C) +  + #define OPCODE0_TAILJUMP(O,N,C) OPCODE0(O,N,C) + #define OPCODE1_TAILJUMP(O,N,C) OPCODE1(O,N,C) + #define OPCODE2_TAILJUMP(O,N,C) OPCODE2(O,N,C) +    #undef HAVE_COMPUTED_GOTO      #if defined(__i386__) && defined(__GNUC__)   #define PROG_COUNTER (((unsigned char **)__builtin_frame_address(0))[1])      static int eval_instruction(PIKE_OPCODE_T *pc)   {    do_inter_return_label = && inter_return_label;    do_escape_catch_label = && inter_escape_catch_label;