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.384 2008/01/13 19:08:30 grubba Exp $ + || $Id: interpret.c,v 1.385 2008/01/26 22:34:20 mast 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:2271:      PMOD_EXPORT void call_handle_error(void)   {    dmalloc_touch_svalue(&throw_value);       if (Pike_interpreter.svalue_stack_margin > LOW_SVALUE_STACK_MARGIN) {    int old_t_flag = Pike_interpreter.trace_level;    Pike_interpreter.trace_level = 0;    Pike_interpreter.svalue_stack_margin = LOW_SVALUE_STACK_MARGIN;    Pike_interpreter.c_stack_margin = LOW_C_STACK_MARGIN; -  *(Pike_sp++) = throw_value; -  dmalloc_touch_svalue(Pike_sp-1); -  throw_value.type=T_INT; +  move_svalue (Pike_sp++, &throw_value); +  mark_free_svalue (&throw_value);       if (get_master()) { /* May return NULL at odd times. */    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    APPLY_MASTER("handle_error", 1);    UNSET_ONERROR(tmp);    }    else {    dynamic_buffer save_buf;    char *s;
pike.git/src/interpret.c:2313:    }       pop_stack();    Pike_interpreter.svalue_stack_margin = SVALUE_STACK_MARGIN;    Pike_interpreter.c_stack_margin = C_STACK_MARGIN;    Pike_interpreter.trace_level = old_t_flag;    }       else {    free_svalue(&throw_value); -  throw_value.type=T_INT; +  mark_free_svalue (&throw_value);    }   }      /* NOTE: This function may only be called from the compiler! */   PMOD_EXPORT int apply_low_safe_and_stupid(struct object *o, INT32 offset)   {    JMP_BUF tmp;    struct pike_frame *new_frame=alloc_pike_frame();    int ret;    int use_dummy_reference = !o->prog->num_identifier_references;
pike.git/src/interpret.c:2406:       return ret;   }      PMOD_EXPORT void safe_apply_low2(struct object *o, int fun, int args,    const char *fun_name)   {    JMP_BUF recovery;       free_svalue(& throw_value); -  throw_value.type=T_INT; +  mark_free_svalue (&throw_value);    if(SETJMP_SP(recovery, args))    {    if(fun_name) call_handle_error();    push_int(0);    }else{    if (fun >= 0) {    apply_low(o,fun,args);    } else if (fun_name) {    Pike_error("Cannot call unknown function \"%s\".\n", fun_name);    } else {
pike.git/src/interpret.c:2514:    int ret;       STACK_LEVEL_START(args);      #if 0    fprintf(stderr, "safe_apply_handler(\"%s\", 0x%08p, 0x%08p, %d)\n",    fun, handler, compat, args);   #endif /* 0 */       free_svalue(& throw_value); -  throw_value.type=T_INT; +  mark_free_svalue (&throw_value);       if (SETJMP_SP(recovery, args)) {    ret = 0;    } else {    if (low_unsafe_apply_handler (fun, handler, compat, args) &&    rettypes && !((1 << Pike_sp[-1].type) & rettypes)) {    if ((rettypes & BIT_ZERO) && SAFE_IS_ZERO (Pike_sp - 1)) {    pop_stack();    push_int(0);    }
pike.git/src/interpret.c:2603: Inside #if defined(PIKE_DEBUG)
   if(Pike_sp < (expected_stack + Pike_interpreter.evaluator_stack))    Pike_fatal("Stack underflow!\n");   #endif    }   }      PMOD_EXPORT void safe_apply_svalue(struct svalue *s, int args, int handle_errors)   {    JMP_BUF recovery;    free_svalue(& throw_value); -  throw_value.type=T_INT; +  mark_free_svalue (&throw_value);    if(SETJMP_SP(recovery, args))    {    if(handle_errors) call_handle_error();    push_int(0);    }else{    apply_svalue (s, args);    }    UNSETJMP(recovery);   }