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.216 2001/07/08 20:58:35 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.217 2001/07/09 11:37:20 grubba 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:128: Inside #if defined(PIKE_DEBUG)
   {    if(f->context.parent)    gc_external_mark2(f->context.parent,0," in Pike_fp->context.parent on current stack");    gc_external_mark2(f->current_object,0," in Pike_fp->current_object on current stack");    gc_external_mark2(f->context.prog,0," in Pike_fp->context.prog on current stack");    }      }   #endif    - static int eval_instruction(unsigned char *pc); + static int eval_instruction(PIKE_OPCODE_T *pc);      PMOD_EXPORT void init_interpreter(void)   {   #ifdef USE_MMAP_FOR_STACK    static int fd = -1;         #ifndef MAP_VARIABLE   #define MAP_VARIABLE 0   #endif
pike.git/src/interpret.c:632:   void reset_evaluator(void)   {    Pike_fp=0;    pop_n_elems(Pike_sp - Pike_interpreter.evaluator_stack);   }      #ifdef PIKE_DEBUG   #define BACKLOG 1024   struct backlog   { + #ifdef HAVE_COMPUTED_GOTO +  PIKE_OPCODE_T instruction; + #else /* !HAVE_COMPUTED_GOTO */    INT32 instruction; -  + #endif /* HAVE_COMPUTED_GOTO */    INT32 arg,arg2;    struct program *program; -  unsigned char *pc; +  PIKE_OPCODE_T *pc;   #ifdef _REENTRANT    struct object *thread_id;   #endif    ptrdiff_t stack;    ptrdiff_t mark_stack;   };      struct backlog backlog[BACKLOG];   int backlogp=BACKLOG-1;   
pike.git/src/interpret.c:676: Inside #if defined(_REENTRANT)
     #ifdef _REENTRANT    if(thread != backlog[e].thread_id)    {    fprintf(stderr,"[Thread swap, Pike_interpreter.thread_id=%p]\n",backlog[e].thread_id);    thread = backlog[e].thread_id;    }   #endif       file=get_line(backlog[e].pc-1,backlog[e].program, &line); + #ifdef HAVE_COMPUTED_GOTO +  fprintf(stderr,"%s:%ld: %s", +  file, +  (long)line, +  low_get_f_name(backlog[e].instruction, backlog[e].program)); + #else /* !HAVE_COMPUTED_GOTO */    if(backlog[e].instruction < 0 || backlog[e].instruction+F_OFFSET > F_MAX_OPCODE)    {    fprintf(stderr,"%s:%ld: ILLEGAL INSTRUCTION %d\n",    file,    (long)line,    backlog[e].instruction + F_OFFSET);    continue;    }    -  +     fprintf(stderr,"%s:%ld: %s",    file,    (long)line,    low_get_f_name(backlog[e].instruction + F_OFFSET, backlog[e].program));    if(instrs[backlog[e].instruction].flags & I_HASARG2)    {    fprintf(stderr,"(%ld,%ld)",    (long)backlog[e].arg,    (long)backlog[e].arg2);    }
pike.git/src/interpret.c:707:    {    fprintf(stderr,"(%+ld)", (long)backlog[e].arg);    }    else if(instrs[backlog[e].instruction].flags & I_HASARG)    {    fprintf(stderr,"(%ld)", (long)backlog[e].arg);    }    fprintf(stderr," %ld, %ld\n",    DO_NOT_WARN((long)backlog[e].stack),    DO_NOT_WARN((long)backlog[e].mark_stack)); + #endif /* HAVE_COMPUTED_GOTO */    }    }while(e!=backlogp);   }      #endif - static int o_catch(unsigned char *pc); + static int o_catch(PIKE_OPCODE_T *pc);         #ifdef PIKE_DEBUG   #define EVAL_INSTR_RET_CHECK(x) \    if (x == -2) \    fatal("Return value -2 from eval_instruction is not handled here.\n"\    "Probable cause: F_ESCAPE_CATCH outside catch block.\n")   #else   #define EVAL_INSTR_RET_CHECK(x)   #endif
pike.git/src/interpret.c:1451:    eval_instruction(Pike_fp->pc);    low_return();    }   }         /* Put catch outside of eval_instruction, so    * the setjmp won't affect the optimization of    * eval_instruction    */ - static int o_catch(unsigned char *pc) + static int o_catch(PIKE_OPCODE_T *pc)   {    JMP_BUF tmp;    struct svalue *expendible=Pike_fp->expendible;    int flags=Pike_fp->flags;       debug_malloc_touch(Pike_fp);    if(SETJMP(tmp))    {    *Pike_sp=throw_value;    throw_value.type=T_INT;