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.116 2002/11/23 14:43:12 mast Exp $ + || $Id: interpret.h,v 1.117 2002/11/23 16:38:54 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:44:    int t_flag;   #endif /* THREAD_TRACE */   };      #ifndef STRUCT_FRAME_DECLARED   #define STRUCT_FRAME_DECLARED   #endif   struct pike_frame   {    INT32 refs; /* must be first */ -  INT32 args; -  unsigned INT16 fun; -  INT16 num_locals; -  INT16 num_args; -  unsigned INT16 flags; +  INT32 args; /* Actual number of arguments. */ +  unsigned INT16 fun; /* Function number. */ +  INT16 num_locals; /* Number of local variables. */ +  INT16 num_args; /* Number of argument variables. */ +  unsigned INT16 flags; /* PIKE_FRAME_* */    INT16 ident;    struct pike_frame *next;    struct pike_frame *scope; -  PIKE_OPCODE_T *pc; -  struct svalue *locals; +  PIKE_OPCODE_T *pc; /* Program counter of last/next opcode. */ +  struct svalue *locals; /* Start of local variables. */       /* This is <= locals, and this is where the    * return value should go.    */    struct svalue *save_sp;       /* This tells us the current level of    * svalues on the stack that can be discarded once the    * current function is done with them    */
pike.git/src/interpret.h:175:    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_stack() do{ free_svalue(--Pike_sp); debug_check_stack(); PIKE_MEM_WO(Pike_sp, sizeof(*Pike_sp)); }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[];   #define pop_n_elems(X) \    do { ptrdiff_t x_=(X); if(x_) { \    check__positive(x_, (msg_pop_neg, x_)); \    Pike_sp -= x_; debug_check_stack(); \    free_mixed_svalues(Pike_sp, x_); \ -  +  PIKE_MEM_WO(Pike_sp, x_*sizeof(*Pike_sp)); \    } } while (0)      #define stack_pop_n_elems_keep_top(X) \    do { struct svalue s=Pike_sp[-1]; Pike_sp[-1]=Pike_sp[-1-(X)]; Pike_sp[-1-(X)]=s; \    pop_n_elems(X); } while (0)      #define push_program(P) do{ struct program *_=(P); debug_malloc_touch(_); Pike_sp->u.program=_; Pike_sp++->type=PIKE_T_PROGRAM; }while(0)   #define push_int(I) do{ INT_TYPE _=(I); Pike_sp->u.integer=_;Pike_sp->type=PIKE_T_INT;Pike_sp++->subtype=NUMBER_NUMBER; }while(0)   #define push_undefined() do{ Pike_sp->u.integer=0; Pike_sp->type=PIKE_T_INT; Pike_sp++->subtype=NUMBER_UNDEFINED; }while(0)   #define push_mapping(M) do{ struct mapping *_=(M); debug_malloc_touch(_); Pike_sp->u.mapping=_; Pike_sp++->type=PIKE_T_MAPPING; }while(0)
pike.git/src/interpret.h:246:    ptrdiff_t num_= (N); \    for(;num_-- > 0;s_++) \    { \    s_->type=PIKE_T_INT; \    s_->subtype=NUMBER_UNDEFINED; \    s_->u.integer=0; \    } \    Pike_sp=s_; \   }while(0)    - #define stack_pop_to_no_free(X) (*(X)=*--Pike_sp) + #define stack_pop_to_no_free(X) do { *(X)=*--Pike_sp; PIKE_MEM_WO(Pike_sp, sizeof(*Pike_sp)); } while(0)   #define stack_pop_to(X) do { struct svalue *_=(X); free_svalue(_); stack_pop_to_no_free(_); }while(0)      /* This pops a number of arguments from the stack but keeps the top    * element on top. Used for popping the arguments while keeping the    * return value.    */   #define stack_unlink(X) do { if(X) { free_svalue(Pike_sp-(X)-1); Pike_sp[-(X)-1]=Pike_sp[-1]; Pike_sp--; pop_n_elems(X-1); } }while(0)      #define free_pike_frame(F) do{ struct pike_frame *f_=(F); debug_malloc_touch(f_); if(!--f_->refs) really_free_pike_frame(f_); }while(0)