pike.git / src / interpret.h

version» Context lines:

pike.git/src/interpret.h: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.h,v 1.113 2002/10/11 01:39:32 nilsson Exp $ + || $Id: interpret.h,v 1.114 2002/10/12 11:53:47 grubba Exp $   */      #ifndef INTERPRET_H   #define INTERPRET_H      #include "global.h"   #include "program.h"   #include "pike_error.h"   #include "bignum.h"   
pike.git/src/interpret.h:151:   #define fatal_check_c_stack(X) do { \    ptrdiff_t x_= \    ((char *)&x_) + STACK_DIRECTION * (X) - Pike_interpreter.stack_top ; \    x_*=STACK_DIRECTION; \    if(x_>0) { \    ((void (*)(const char*, ...))Pike_fatal)(Pike_check_c_stack_errmsg); \    } \    }while(0)       + #ifdef PIKE_DEBUG + #define STACK_LEVEL_START(depth) \ +  do { \ +  struct svalue *save_stack_level = Pike_sp - (depth); +  + #define STACK_LEVEL_DONE(depth) \ +  STACK_LEVEL_CHECK(depth); \ +  } while(0) +  + #define STACK_LEVEL_CHECK(depth) \ +  do { \ +  if (Pike_sp != save_stack_level + (depth)) { \ +  Pike_fatal("Unexpected stack level! " \ +  "Actual: %d, expected: %d\n", \ +  DO_NOT_WARN((int)(Pike_sp - save_stack_level)), \ +  (depth)); \ +  } \ +  } while(0) + #else /* !PIKE_DEBUG */ + #define STACK_LEVEL_START(depth) do { + #define STACK_LEVEL_DONE(depth) } while(0) + #define STACK_LEVEL_CHECK(depth) + #endif /* PIKE_DEBUG */ +    #define pop_stack() do{ free_svalue(--Pike_sp); debug_check_stack(); }while(0)   #define pop_2_elems() do { pop_stack(); pop_stack(); }while(0)      #ifdef __ECL   #define MAYBE_CAST_TO_LONG(X) (X)   #else /* !__ECL */   #define MAYBE_CAST_TO_LONG(X) ((long)(X))   #endif /* __ECL */      PMOD_EXPORT extern const char msg_pop_neg[];