2001-05-24
2001-05-24 22:39:01 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
24c37f4ed09a9d7fc9ed1394a2db6dff6b34b601
(35 lines)
(+33/-2)
[
Show
| Annotate
]
Branch: 7.9
bugfix for stack errors
Rev: src/interpret.c:1.200
Rev: src/interpret.h:1.85
Rev: src/interpret_functions.h:1.55
Rev: src/testsuite.in:1.416
5:
\*/
/*
- * $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
235:
{
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 */
};
323: Inside #if defined(__ECL)
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) \
371:
#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