skipping over calls to reserve on tail jumps

This commit is contained in:
Alex Shinn 2011-07-04 22:27:48 +09:00
parent 60c304cbb8
commit 463400fc7e

4
vm.c
View file

@ -385,7 +385,9 @@ static void generate_tail_jump (sexp ctx, sexp name, sexp loc, sexp lam, sexp ap
/* jump */
emit(ctx, SEXP_OP_JUMP);
emit_word(ctx, (sexp_uint_t)-sexp_context_pos(ctx)-1);
emit_word(ctx, (sexp_uint_t) (-sexp_context_pos(ctx) - 1 +
(sexp_pairp(sexp_lambda_locals(lam))
? 1 + sizeof(sexp) : 0)));
sexp_context_tailp(ctx) = 1;
sexp_gc_release3(ctx);