Branch: Tag:

2002-11-23

2002-11-23 14:41:56 by Martin Stjernholm <mast@lysator.liu.se>

Added SETJMP_SP macro to be able to control the pike stack level at unwind
in a more obvious way.

Rev: src/error.c:1.93
Rev: src/pike_error.h:1.22

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: error.c,v 1.92 2002/10/11 01:39:31 nilsson Exp $ + || $Id: error.c,v 1.93 2002/11/23 14:41:56 mast Exp $   */      #define NO_PIKE_SHORTHAND
23:   #include "threads.h"   #include "gc.h"    - RCSID("$Id: error.c,v 1.92 2002/10/11 01:39:31 nilsson Exp $"); + RCSID("$Id: error.c,v 1.93 2002/11/23 14:41:56 mast Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)
90:   {   }    - PMOD_EXPORT JMP_BUF *init_recovery(JMP_BUF *r DEBUG_LINE_ARGS) + PMOD_EXPORT JMP_BUF *init_recovery(JMP_BUF *r, size_t stack_pop_levels DEBUG_LINE_ARGS)   {    check_recovery_context();   #ifdef PIKE_DEBUG
98:    OED_FPRINTF((stderr, "init_recovery(%p) %s\n", r, location));   #endif    r->frame_pointer=Pike_fp; -  r->stack_pointer=Pike_sp-Pike_interpreter.evaluator_stack; +  r->stack_pointer=Pike_sp - stack_pop_levels - Pike_interpreter.evaluator_stack;    r->mark_sp=Pike_mark_sp - Pike_interpreter.mark_stack;    r->previous=Pike_interpreter.recoveries;    r->onerror=0;