pike.git / src / interpret.h

version» Context lines:

pike.git/src/interpret.h: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.   \*/      /* -  * $Id: interpret.h,v 1.84 2001/05/16 23:35:52 hubbe Exp $ +  * $Id: interpret.h,v 1.85 2001/05/24 22:39:00 hubbe Exp $    */   #ifndef INTERPRET_H   #define INTERPRET_H      #include "global.h"   #include "program.h"   #include "pike_error.h"      struct Pike_interpreter {    /* Swapped variables */
pike.git/src/interpret.h:228:    Pike_fp->next=0; \    } \    Pike_fp=tmp_; \    }while(0)         enum apply_type   {    APPLY_STACK, /* The function is the first argument */    APPLY_SVALUE, /* arg1 points to an svalue containing the function */ +  APPLY_SVALUE_STRICT, /* Like APPLY_SVALUE, but does not return values for void functions */    APPLY_LOW /* arg1 is the object pointer,(int)arg2 the function */   };      #define APPLY_MASTER(FUN,ARGS) \   do{ \    static int fun_, master_cnt=0; \    struct object *master_ob=master(); \    if(master_cnt != master_ob->prog->id) \    { \    fun_=find_identifier(FUN,master_ob->prog); \
pike.git/src/interpret.h:316:    * to avoid implicit declaration of mega_apply().    */   #ifdef __ECL   static inline void apply_low(struct object *o, ptrdiff_t fun, INT32 args)   {    mega_apply(APPLY_LOW, args, (void*)o, (void*)fun);   }      static inline void strict_apply_svalue(struct svalue *sval, INT32 args)   { -  mega_apply(APPLY_SVALUE, args, (void*)sval, 0); +  mega_apply(APPLY_SVALUE_STRICT, args, (void*)sval, 0);   }   #else /* !__ECL */   #define apply_low(O,FUN,ARGS) \    mega_apply(APPLY_LOW, (ARGS), (void*)(O),(void*)(ptrdiff_t)(FUN))      #define strict_apply_svalue(SVAL,ARGS) \    mega_apply(APPLY_SVALUE, (ARGS), (void*)(SVAL),0)   #endif /* __ECL */      PMOD_EXPORT extern int d_flag; /* really in main.c */
pike.git/src/interpret.h:364: Inside #if undefined(NO_PIKE_SHORTHAND)
     /* Shouldn't this be in Pike_interpreter? - Hubbe */   #define sp Pike_sp   #define fp Pike_fp   #define mark_sp Pike_mark_sp      #endif /* !NO_PIKE_SHORTHAND */      #define CURRENT_STORAGE (dmalloc_touch(struct pike_frame *,Pike_fp)->current_storage)    +  + #define PIKE_STACK_MMAPPED +  + struct Pike_stack + { +  struct svalue *top; +  int flags; +  struct Pike_stack *previous; +  struct svalue *save_ptr; +  struct svalue stack[1]; + }; +  +  + #define PIKE_STACK_REQUIRE_BEGIN(num, base) do { \ +  struct Pike_stack *old; \ +  if(Pike_interpreter.current_stack->top - Pike_sp < num) \ +  { \ +  old=Pike_interpreter.current_stack; \ +  old->save_ptr=Pike_sp; \ +  Pike_interpreter.current_stack=allocate_array(MAXIMUM(num, 8192)); \ +  while(old_sp > base) *(Pike_sp++) = *--old->save_ptr; \ +  } +  + #define PIKE_STACK_REQUIRE_END() \ +  while(Pike_sp > Pike_interpreter.current_stack->stack) \ +  *(old->save_ptr++) = *--Pike_sp; \ +  Pike_interpreter.current_stack=Pike_interpreter.current_stack->previous; \ + }while(0) +    #endif