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.181 2010/03/24 20:47:54 mast Exp $ + || $Id$   */      #ifndef INTERPRET_H   #define INTERPRET_H      #include "global.h"   #include "program.h"   #include "pike_error.h"   #include "object.h"   #include "pike_rusage.h"
pike.git/src/interpret.h:194:    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 */    + #ifdef __CHECKER__ + #define IF_CHECKER(X) X + #else + #define IF_CHECKER(X) + #endif +    #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[];
pike.git/src/interpret.h:260:    struct svalue *_=(X); \    free_svalue(_); \    stack_pop_to_no_free(_); \    }while(0)      #define push_program(P) do{ \    struct program *_=(P); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    _sp_->u.program=_; \ -  _sp_++->type=PIKE_T_PROGRAM; \ +  _sp_->type=PIKE_T_PROGRAM; \ +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_int(I) do{ \    INT_TYPE _=(I); \    struct svalue *_sp_ = Pike_sp++; \    _sp_->u.integer=_; \    _sp_->type=PIKE_T_INT; \    _sp_->subtype=NUMBER_NUMBER; \    }while(0)   
pike.git/src/interpret.h:283:    _sp_->u.integer=0; \    _sp_->type=PIKE_T_INT; \    _sp_->subtype=NUMBER_UNDEFINED; \    }while(0)      #define push_obj_index(I) do{ \    int _=(I); \    struct svalue *_sp_ = Pike_sp++; \    _sp_->u.identifier=_; \    _sp_->type=T_OBJ_INDEX; \ +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_mapping(M) do{ \    struct mapping *_=(M); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    _sp_->u.mapping=_; \    _sp_->type=PIKE_T_MAPPING; \ -  +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_array(A) do{ \    struct array *_=(A); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    _sp_->u.array=_ ; \    _sp_->type=PIKE_T_ARRAY; \ -  +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_empty_array() ref_push_array(&empty_array)      #define push_multiset(L) do{ \    struct multiset *_=(L); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    _sp_->u.multiset=_; \    _sp_->type=PIKE_T_MULTISET; \ -  +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_string(S) do { \    struct pike_string *_=(S); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    DO_IF_DEBUG(if(_->size_shift & ~3) { \    Pike_fatal("Pushing string with bad shift: %d\n", \    _->size_shift); \    }); \
pike.git/src/interpret.h:332:    }while(0)      #define push_empty_string() ref_push_string(empty_pike_string)      #define push_type_value(S) do{ \    struct pike_type *_=(S); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    _sp_->u.type=_; \    _sp_->type=PIKE_T_TYPE; \ +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_object(O) do { \    struct object *_=(O); \    struct svalue *_sp_ = Pike_sp++; \    debug_malloc_touch(_); \    _sp_->u.object=_; \    _sp_->type=PIKE_T_OBJECT; \    _sp_->subtype = 0; \    }while(0)
pike.git/src/interpret.h:358:    _sp_->u.object = _; \    _sp_->type = PIKE_T_OBJECT; \    _sp_->subtype = _inh_; \    }while(0)      #define push_float(F) do{ \    FLOAT_TYPE _=(F); \    struct svalue *_sp_ = Pike_sp++; \    _sp_->u.float_number=_; \    _sp_->type=PIKE_T_FLOAT; \ +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define push_text(T) do { \    const char *_ = (T); \    struct svalue *_sp_ = Pike_sp++; \    _sp_->subtype=0; \    _sp_->u.string=make_shared_binary_string(_,strlen(_)); \    debug_malloc_touch(_sp_->u.string); \    _sp_->type=PIKE_T_STRING; \    }while(0)
pike.git/src/interpret.h:397:    _sp_->subtype=(FUN); \    _sp_->type=PIKE_T_FUNCTION; \    } while (0)      #define ref_push_program(P) do{ \    struct program *_=(P); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \    _sp_->u.program=_; \    _sp_->type=PIKE_T_PROGRAM; \ +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define ref_push_mapping(M) do{ \    struct mapping *_=(M); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \    _sp_->u.mapping=_; \    _sp_->type=PIKE_T_MAPPING; \ -  +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define ref_push_array(A) do{ \    struct array *_=(A); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \    _sp_->u.array=_ ; \    _sp_->type=PIKE_T_ARRAY; \ -  +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define ref_push_multiset(L) do{ \    struct multiset *_=(L); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \    _sp_->u.multiset=_; \    _sp_->type=PIKE_T_MULTISET; \ -  +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define ref_push_string(S) do{ \    struct pike_string *_=(S); \    struct svalue *_sp_ = Pike_sp++; \    DO_IF_DEBUG(if(_->size_shift & ~3) { \    Pike_fatal("Pushing string with bad shift: %d\n", \    _->size_shift); \    }); \    add_ref(_); \
pike.git/src/interpret.h:442:    _sp_->u.string=_; \    _sp_->type=PIKE_T_STRING; \    }while(0)      #define ref_push_type_value(S) do{ \    struct pike_type *_=(S); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \    _sp_->u.type=_; \    _sp_->type=PIKE_T_TYPE; \ +  IF_CHECKER(_sp_->subtype=0); \    }while(0)      #define ref_push_object(O) do{ \    struct object *_=(O); \    struct svalue *_sp_ = Pike_sp++; \    add_ref(_); \    _sp_->u.object=_; \    _sp_->type=PIKE_T_OBJECT; \    _sp_->subtype = 0; \    }while(0)