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.104 2001/11/08 23:34:29 nilsson Exp $ +  * $Id: interpret.h,v 1.105 2001/11/10 19:43:52 mast Exp $    */   #ifndef INTERPRET_H   #define INTERPRET_H      #include "global.h"   #include "program.h"   #include "pike_error.h"   #include "bignum.h"      struct Pike_interpreter {
pike.git/src/interpret.h:101: Inside #if defined(HAVE_COMPUTED_GOTO)
     #ifdef HAVE_COMPUTED_GOTO   extern PIKE_OPCODE_T *fcode_to_opcode;   extern struct op_2_f {    PIKE_OPCODE_T opcode;    INT32 fcode;   } *opcode_to_fcode;   #endif /* HAVE_COMPUTED_GOTO */      #ifdef PIKE_DEBUG - #define debug_check_stack() do{if(Pike_sp<Pike_interpreter.evaluator_stack)fatal("Stack error.\n");}while(0) + PMOD_EXPORT extern const char msg_stack_error[]; + #define debug_check_stack() do{if(Pike_sp<Pike_interpreter.evaluator_stack)fatal(msg_stack_error);}while(0)   #define check__positive(X,Y) if((X)<0) fatal Y   #include "pike_error.h"   #else   #define check__positive(X,Y)   #define debug_check_stack()   #endif      #define low_stack_check(X) \    (Pike_sp - Pike_interpreter.evaluator_stack + \    Pike_interpreter.svalue_stack_margin + (X) >= Pike_stack_size)    - extern const char *Pike_check_stack_errmsg; + PMOD_EXPORT extern const char Pike_check_stack_errmsg[];      #define check_stack(X) do { \    if(low_stack_check(X)) \    ((void (*)(const char *, ...))Pike_error)( \    Pike_check_stack_errmsg, \    PTRDIFF_T_TO_LONG(Pike_sp - Pike_interpreter.evaluator_stack), \    PTRDIFF_T_TO_LONG(Pike_stack_size), \    PTRDIFF_T_TO_LONG(X)); \    }while(0)    - extern const char *Pike_check_mark_stack_errmsg; + PMOD_EXPORT extern const char Pike_check_mark_stack_errmsg[];      #define check_mark_stack(X) do { \    if(Pike_mark_sp - Pike_interpreter.mark_stack + (X) >= Pike_stack_size) \    ((void (*)(const char*, ...))Pike_error)(Pike_check_mark_stack_errmsg); \    }while(0)    - extern const char *Pike_check_c_stack_errmsg; + PMOD_EXPORT extern const char Pike_check_c_stack_errmsg[];      #define check_c_stack(X) do { \    ptrdiff_t x_= ((char *)&x_) + \    STACK_DIRECTION * (Pike_interpreter.c_stack_margin + (X)) - \    Pike_interpreter.stack_top ; \    x_*=STACK_DIRECTION; \    if(x_>0) \    ((void (*)(const char*, ...))low_error)(Pike_check_c_stack_errmsg); \    }while(0)   
pike.git/src/interpret.h:161:      #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[];   #define pop_n_elems(X) \    do { ptrdiff_t x_=(X); if(x_) { \ -  check__positive(x_, ("Popping negative number of args.... (%ld) \n", \ -  MAYBE_CAST_TO_LONG(x_))); \ +  check__positive(x_, (msg_pop_neg, x_)); \    Pike_sp -= x_; debug_check_stack(); \    free_mixed_svalues(Pike_sp, x_); \    } } 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)