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.178 2000/12/05 21:08:18 per Exp $"); + RCSID("$Id: interpret.c,v 1.179 2001/01/10 19:56:37 mast 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:748:    DO_NOT_WARN((long)backlog[e].stack),    DO_NOT_WARN((long)backlog[e].mark_stack));    }    }while(e!=backlogp);   }      #endif   static int o_catch(unsigned char *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 +  + #ifdef PIKE_DEBUG   #define eval_instruction eval_instruction_with_debug   #include "interpreter.h"      #undef eval_instruction   #define eval_instruction eval_instruction_without_debug   #undef PIKE_DEBUG   #define print_return_value()   #include "interpreter.h"   #undef print_return_value   #define PIKE_DEBUG
pike.git/src/interpret.c:1291:    fatal("Wrong number of arguments or locals in function def.\n");   #endif    new_frame->num_locals=num_locals;    new_frame->num_args=num_args;       check_threads_etc();       {    struct svalue **save_mark_sp=Pike_mark_sp;    tailrecurse=eval_instruction(pc); +  EVAL_INSTR_RET_CHECK(tailrecurse);    Pike_mark_sp=save_mark_sp;   #ifdef PIKE_DEBUG    if(Pike_mark_sp < save_mark_sp)    fatal("Popped below save_mark_sp!\n");   #endif    }   #ifdef PIKE_DEBUG    if(Pike_sp<Pike_interpreter.evaluator_stack)    fatal("Stack error (also simple).\n");   #endif
pike.git/src/interpret.c:1430:    struct svalue **save_mark_sp=Pike_mark_sp;    int x;    Pike_fp->expendible=Pike_fp->locals + Pike_fp->num_locals;    x=eval_instruction(pc);   #ifdef PIKE_DEBUG    if(Pike_mark_sp < save_mark_sp)    fatal("mark Pike_sp underflow in catch.\n");   #endif    Pike_mark_sp=save_mark_sp;    Pike_fp->expendible=expendible; -  if(x!=-1) mega_apply(APPLY_STACK, x, 0,0); +  if(x>=0) mega_apply(APPLY_STACK, x, 0,0);    UNSETJMP(tmp); -  return 1; +  return x == -2 ? 2 : 1;    }   }      PMOD_EXPORT void f_call_function(INT32 args)   {    mega_apply(APPLY_STACK,args,0,0);   }      PMOD_EXPORT void call_handle_error(void)   {
pike.git/src/interpret.c:1489:       add_ref(new_frame->current_object);    add_ref(new_frame->context.prog);       if(SETJMP(tmp))    {    ret=1;    }else{    struct svalue **save_mark_sp=Pike_mark_sp;    int tmp=eval_instruction(o->prog->program + offset); +  EVAL_INSTR_RET_CHECK(tmp);    Pike_mark_sp=save_mark_sp; -  if(tmp!=-1) mega_apply(APPLY_STACK, tmp, 0,0); +  if(tmp>=0) mega_apply(APPLY_STACK, tmp, 0,0);      #ifdef PIKE_DEBUG    if(Pike_sp<Pike_interpreter.evaluator_stack)    fatal("Stack error (simple).\n");   #endif    ret=0;    }    UNSETJMP(tmp);       POP_PIKE_FRAME();