Branch: Tag:

2002-10-16

2002-10-16 13:56:52 by Marcus Comstedt <marcus@mc.pp.se>

More efficient and robust F_ESCAPE_CATCH.

Rev: src/code/ppc32.c:1.24
Rev: src/interpret.c:1.271

2:   || 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"
239: Inside #if defined(PROFILING)
   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)
783: Inside #if defined(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;   
852: Inside #if defined(__GNUC__)
     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;