summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f57c07)
Failing this leads to broken formals chains
Signed-off-by: Keith Packard <keithp@keithp.com>
static int stack_depth;
#define DBG_INDENT() do { int _s; for(_s = 0; _s < stack_depth; _s++) printf(" "); } while(0)
#define DBG_IN() (++stack_depth)
static int stack_depth;
#define DBG_INDENT() do { int _s; for(_s = 0; _s < stack_depth; _s++) printf(" "); } while(0)
#define DBG_IN() (++stack_depth)
for (;;) {
ao_lisp_poly_mark(stack->actuals);
ao_lisp_poly_mark(stack->formals);
for (;;) {
ao_lisp_poly_mark(stack->actuals);
ao_lisp_poly_mark(stack->formals);
+ /* no need to mark formals_tail */
ao_lisp_poly_mark(stack->frame);
stack = ao_lisp_poly_stack(stack->prev);
if (ao_lisp_mark_memory(stack, sizeof (struct ao_lisp_stack)))
ao_lisp_poly_mark(stack->frame);
stack = ao_lisp_poly_stack(stack->prev);
if (ao_lisp_mark_memory(stack, sizeof (struct ao_lisp_stack)))
int ret;
(void) ao_lisp_poly_move(&stack->actuals);
(void) ao_lisp_poly_move(&stack->formals);
int ret;
(void) ao_lisp_poly_move(&stack->actuals);
(void) ao_lisp_poly_move(&stack->formals);
+ (void) ao_lisp_poly_move(&stack->formals_tail);
(void) ao_lisp_poly_move(&stack->frame);
prev = ao_lisp_poly_stack(stack->prev);
ret = ao_lisp_move(&ao_lisp_stack_type, &prev);
(void) ao_lisp_poly_move(&stack->frame);
prev = ao_lisp_poly_stack(stack->prev);
ret = ao_lisp_move(&ao_lisp_stack_type, &prev);
if (args_wanted != args_provided)
return ao_lisp_error(AO_LISP_INVALID, "need %d args, not %d", args_wanted, args_provided);
next_frame = ao_lisp_frame_new(args_wanted);
if (args_wanted != args_provided)
return ao_lisp_error(AO_LISP_INVALID, "need %d args, not %d", args_wanted, args_provided);
next_frame = ao_lisp_frame_new(args_wanted);
- DBGI("new frame %d\n", OFFSET(next_frame));
+// DBGI("new frame %d\n", OFFSET(next_frame));
switch (type) {
case _ao_lisp_atom_lambda: {
int f;
switch (type) {
case _ao_lisp_atom_lambda: {
int f;
+#if 0
+#define DBG_DUMP 0
#define DBG_OFFSET(a) ((int) ((uint8_t *) (a) - ao_lisp_pool))
#define DBG(...) printf(__VA_ARGS__)
#define DBG_DO(a) a
#define DBG_OFFSET(a) ((int) ((uint8_t *) (a) - ao_lisp_pool))
#define DBG(...) printf(__VA_ARGS__)
#define DBG_DO(a) a
DBG_MOVE("move done\n");
}
DBG_MOVE("move done\n");
}
static void
dump_busy(void)
{
static void
dump_busy(void)
{