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.80 2001/04/28 19:39:20 mast Exp $ +  * $Id: interpret.h,v 1.81 2001/05/10 22:14:37 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:48:   #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; -  INT16 malloced_locals; +  unsigned INT16 flags;    struct pike_frame *next;    struct pike_frame *scope;    unsigned char *pc;    struct svalue *locals; -  +  +  /* 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 +  */    struct svalue *expendible; -  +  struct svalue **save_mark_sp; +  struct svalue **mark_sp_base;    struct object *current_object; -  +  + #if defined(PROFILING) && defined(HAVE_GETHRTIME) +  long long children_base; +  long long start_time; +  INT32 self_time_base; + #endif    struct inherit context;    char *current_storage;   };    -  + #define PIKE_FRAME_RETURN_INTERNAL 1 + #define PIKE_FRAME_RETURN_POP 2 + #define PIKE_FRAME_MALLOCED_LOCALS 0x8000 +    struct external_variable_context   {    struct object *o;    struct inherit *inherit;    int parent_identifier;   };      #ifdef PIKE_DEBUG   #define debug_check_stack() do{if(Pike_sp<Pike_interpreter.evaluator_stack)fatal("Stack error.\n");}while(0)   #define check__positive(X,Y) if((X)<0) fatal Y
pike.git/src/interpret.h:189:    really_free_pike_frame(Pike_fp); \    }else{ \    DO_IF_DEBUG(if( Pike_fp->locals + Pike_fp->num_locals > Pike_sp || Pike_sp < Pike_fp->expendible) fatal("Stack failure in POP_PIKE_FRAME %p+%d=%p %p %p!\n",Pike_fp->locals,Pike_fp->num_locals,Pike_fp->locals+Pike_fp->num_locals,Pike_sp,Pike_fp->expendible)); \    debug_malloc_touch(Pike_fp); \    if(Pike_fp->num_locals) \    { \    struct svalue *s=(struct svalue *)xalloc(sizeof(struct svalue)* \    Pike_fp->num_locals); \    assign_svalues_no_free(s,Pike_fp->locals,Pike_fp->num_locals,BIT_MIXED); \    Pike_fp->locals=s; \ -  Pike_fp->malloced_locals=1; \ +  Pike_fp->flags|=PIKE_FRAME_MALLOCED_LOCALS; \    }else{ \    Pike_fp->locals=0; \    } \    Pike_fp->next=0; \    } \    Pike_fp=tmp_; \    }while(0)         enum apply_type
pike.git/src/interpret.h:258:   PMOD_EXPORT void assign_lvalue(struct svalue *lval,struct svalue *from);   PMOD_EXPORT union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t);   void print_return_value(void);   void reset_evaluator(void);   struct backlog;   void dump_backlog(void);   BLOCK_ALLOC(pike_frame,128)      PMOD_EXPORT void find_external_context(struct external_variable_context *loc,    int arg2); - PMOD_EXPORT void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2); + int low_mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2); + void low_return(void); + void unlink_previous_frame(void); + void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2);   PMOD_EXPORT void f_call_function(INT32 args);   PMOD_EXPORT void call_handle_error(void);   PMOD_EXPORT int apply_low_safe_and_stupid(struct object *o, INT32 offset);   PMOD_EXPORT void safe_apply_low(struct object *o,int fun,int args);   PMOD_EXPORT void safe_apply(struct object *o, char *fun ,INT32 args);   PMOD_EXPORT void apply_lfun(struct object *o, int fun, int args);   PMOD_EXPORT void apply_shared(struct object *o,    struct pike_string *fun,    int args);   PMOD_EXPORT void apply(struct object *o, char *fun, int args);