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.270 2002/10/11 01:39:32 nilsson Exp $ + || $Id: interpret.c,v 1.271 2002/10/16 13:56:52 marcus Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.270 2002/10/11 01:39:32 nilsson Exp $"); + RCSID("$Id: interpret.c,v 1.271 2002/10/16 13:56:52 marcus 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:232: Inside #if defined(PIKE_DEBUG)
   dmalloc_accept_leak(spcb);    }    }   #endif   #ifdef PROFILING   #ifdef HAVE_GETHRTIME    Pike_interpreter.time_base = gethrtime();    Pike_interpreter.accounted_time =0;   #endif   #endif - #ifdef HAVE_COMPUTED_GOTO -  /* Initialize the fcode_to_opcode table. */ + #if defined(HAVE_COMPUTED_GOTO) || defined(PIKE_USE_MACHINE_CODE) +  /* Initialize the fcode_to_opcode table / jump labels. */    eval_instruction(NULL); - #endif /* HAVE_COMPUTED_GOTO */ + #endif /* HAVE_COMPUTED_GOTO || PIKE_USE_MACHINE_CODE */   #if defined(PIKE_USE_MACHINE_CODE) && !defined(PIKE_DEBUG)    /* Simple operator opcodes... */   #define SET_INSTR_ADDRESS(X, Y) (instrs[(X)-F_OFFSET].address = (void *)Y)    SET_INSTR_ADDRESS(F_COMPL, o_compl);    SET_INSTR_ADDRESS(F_LSH, o_lsh);    SET_INSTR_ADDRESS(F_RSH, o_rsh);    SET_INSTR_ADDRESS(F_SUBTRACT, o_subtract);    SET_INSTR_ADDRESS(F_AND, o_and);    SET_INSTR_ADDRESS(F_OR, o_or);    SET_INSTR_ADDRESS(F_XOR, o_xor);
pike.git/src/interpret.c:776:    "Probable cause: F_ESCAPE_CATCH outside catch block.\n")   #else   #define EVAL_INSTR_RET_CHECK(x)   #endif         #ifdef PIKE_USE_MACHINE_CODE      /* Labels to jump to to cause eval_instruction to return */   /* FIXME: Replace these with assembler lables */ - void *do_inter_return_label; + void *do_inter_return_label = NULL;   void *do_escape_catch_label;   void *dummy_label;      #ifndef DEF_PROG_COUNTER   #define DEF_PROG_COUNTER   #endif /* !DEF_PROG_COUNTER */      #ifndef CALL_MACHINE_CODE   #define CALL_MACHINE_CODE(pc) \    do { \
pike.git/src/interpret.c:845:      #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) { +  +  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;    -  +  return 0; +  } +    #ifdef PIKE_DEBUG    if (t_flag) {    int i;    fprintf(stderr, "Calling code at 0x%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) {