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.281 2002/11/23 15:11:04 mast Exp $ + || $Id: interpret.c,v 1.282 2002/11/24 18:20:50 grubba Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.281 2002/11/23 15:11:04 mast Exp $"); + RCSID("$Id: interpret.c,v 1.282 2002/11/24 18:20:50 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:918:   #define OPCODE1_ALIAS(O,N,F,C)   #define OPCODE2_ALIAS(O,N,F,C)      #undef HAVE_COMPUTED_GOTO      #ifdef __GNUC__      /* Define the program counter if necessary. */   DEF_PROG_COUNTER;    - static int eval_instruction(PIKE_OPCODE_T *pc) - { -  if(pc == NULL) { + #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 */    -  if(do_inter_return_label != NULL) -  Pike_fatal("eval_instruction called with NULL (twice).\n"); -  -  do_inter_return_label = && inter_return_label; -  do_escape_catch_label = && inter_escape_catch_label; -  -  /* Trick optimizer */ -  if(!dummy_label) -  return 0; -  } -  + static int eval_instruction(PIKE_OPCODE_T *pc)   #ifdef PIKE_DEBUG -  if (t_flag) { + { +  if (t_flag && 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 */    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]);    }    } -  +  return eval_instruction_low(pc); + } +  + 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"); +  +  do_inter_return_label = && inter_return_label; +  do_escape_catch_label = && inter_escape_catch_label; +  +  /* Trick optimizer */ +  if(!dummy_label) +  return 0; +  } +     CALL_MACHINE_CODE(pc);       /* This code is never reached, but will    * prevent gcc from optimizing the labels below too much    */       fprintf(stderr,"We have reached the end of the world!\n");    goto *dummy_label;       /* %%esp will be slightly buggered after