pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.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: interpret.c,v 1.373 2006/03/11 08:22:40 mast Exp $ + || $Id: interpret.c,v 1.374 2006/03/15 09:03:38 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"
pike.git/src/interpret.c:1373: Inside #if defined(PIKE_USE_MACHINE_CODE)
  #ifdef PIKE_USE_MACHINE_CODE      #ifdef PIKE_DEBUG   /* Note: The debug code is extracted, to keep the frame size constant. */   static int eval_instruction_low(PIKE_OPCODE_T *pc);   #endif /* PIKE_DEBUG */      static int eval_instruction(PIKE_OPCODE_T *pc)   #ifdef PIKE_DEBUG   { +  int x;    if (Pike_interpreter.trace_level > 5 && pc) {    int i;    fprintf(stderr, "Calling code at %p:\n", pc);   #ifdef PIKE_OPCODE_ALIGN    if (((INT32)pc) % PIKE_OPCODE_ALIGN) {    Pike_fatal("Odd offset!\n");    }   #endif /* PIKE_OPCODE_ALIGN */   #ifdef DISASSEMBLE_CODE    DISASSEMBLE_CODE(pc, 16*4);
pike.git/src/interpret.c:1394: Inside #if defined(PIKE_USE_MACHINE_CODE) and #if defined(PIKE_DEBUG)
   for (i=0; i < 16; i+=4) {    fprintf(stderr,    " 0x%08x 0x%08x 0x%08x 0x%08x\n",    ((int *)pc)[i],    ((int *)pc)[i+1],    ((int *)pc)[i+2],    ((int *)pc)[i+3]);    }   #endif /* DISASSEMBLE_CODE */    } -  return eval_instruction_low(pc); +  x = eval_instruction_low(pc); +  pike_trace(3, "- eval_instruction(%p) ==> %d\n", pc, x); +  return x;   }      static int eval_instruction_low(PIKE_OPCODE_T *pc)   #endif /* PIKE_DEBUG */   {    if(pc == NULL) {       if(do_inter_return_label != NULL)    Pike_fatal("eval_instruction called with NULL (twice).\n");   
pike.git/src/interpret.c:1464: Inside #if 0
  #if 0    if (dummy_label) {    inter_escape_catch_label:    EXIT_MACHINE_CODE();    return -2;    }   #endif       inter_return_label:    EXIT_MACHINE_CODE(); + #ifdef PIKE_DEBUG +  pike_trace(3, "- Inter return\n"); + #endif    return -1;   }      #else /* PIKE_USE_MACHINE_CODE */         #ifndef SET_PROG_COUNTER   #define SET_PROG_COUNTER(X) (PROG_COUNTER=(X))   #endif /* SET_PROG_COUNTER */   
pike.git/src/interpret.c:2190:   {    LOW_JMP_BUF jmpbuf;   #ifdef PIKE_DEBUG    if (Pike_interpreter.catching_eval_jmpbuf)    Pike_fatal ("catching_eval_jmpbuf already active.\n");   #endif    Pike_interpreter.catching_eval_jmpbuf = &jmpbuf;    if (LOW_SETJMP (jmpbuf))    {    Pike_interpreter.catching_eval_jmpbuf = NULL; + #ifdef PIKE_DEBUG +  pike_trace(3, "- catching_eval_instruction(%p) caught error ==> -3\n", +  pc); + #endif    return -3;    }else{    int x = eval_instruction(pc);    Pike_interpreter.catching_eval_jmpbuf = NULL; -  + #ifdef PIKE_DEBUG +  pike_trace(3, "- catching_eval_instruction(%p) ==> %d\n", pc, x); + #endif    return x;    }   }      /*! @decl mixed `()(function fun, mixed ... args)    *! @decl mixed call_function(function fun, mixed ... args)    *!    *! Call a function.    *!    *! Calls the function @[fun] with the arguments specified by @[args].