1998-02-27
1998-02-27 08:41:45 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
9649497b52f75540e9de252427fa8596918bf19b
(12 lines)
(+11/-1)
[
Show
| Annotate
]
Branch: 7.9
lots of changes
Rev: src/acconfig.h:1.16
Rev: src/array.c:1.30
Rev: src/array.h:1.11
Rev: src/builtin_functions.c:1.74
Rev: src/compilation.h:1.7
Rev: src/configure.in:1.160
Rev: src/dynamic_load.c:1.24
Rev: src/interpret.c:1.69
Rev: src/interpret.h:1.19
Rev: src/language.yacc:1.61
Rev: src/las.c:1.53
Rev: src/main.c:1.42
Rev: src/modules/Makefile.in:1.15
Rev: src/modules/dynamic_module_makefile.in:1.31
Rev: src/modules/spider/dumudp.c:1.34
Rev: src/modules/static_module_makefile.in:1.25
Rev: src/modules/system/system.c:1.42
Rev: src/program.c:1.64
Rev: src/program.h:1.33
28: Inside #if defined(DEBUG)
#ifdef DEBUG
#define debug_check_stack() do{if(sp<evaluator_stack)fatal("Stack error.\n");}while(0)
+ #define check__positive(X,Y) if((X)<0) fatal(Y)
+ #include "error.h"
#else
-
+ #define check__positive(X,Y)
#define debug_check_stack()
#endif
#define pop_stack() do{ free_svalue(--sp); debug_check_stack(); }while(0)
-
+ #define pop_n_elems(X) \
+ do { int x_=(X); if(x_) { \
+ check__positive(x_,"Popping negative number of args....\n"); \
+ sp-=x_; debug_check_stack(); \
+ free_svalues(sp,x_,BIT_MIXED); \
+ } } while (0)
+
#define push_program(P) do{ struct program *_=(P); debug_malloc_touch(_); sp->u.program=_; sp++->type=T_PROGRAM; }while(0)
#define push_int(I) do{ INT32 _=(I); sp->u.integer=_;sp->type=T_INT;sp++->subtype=NUMBER_NUMBER; }while(0)
#define push_mapping(M) do{ struct mapping *_=(M); debug_malloc_touch(_); sp->u.mapping=_; sp++->type=T_MAPPING; }while(0)
117:
void assign_lvalue(struct svalue *lval,struct svalue *from);
union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t);
void print_return_value(void);
- void pop_n_elems(INT32 x);
+
void reset_evaluator(void);
struct backlog;
void dump_backlog(void);