mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
don't generate a tail-jump with mis-matched param lengths
This commit is contained in:
parent
fad9db31ae
commit
bb7b66b5ba
1 changed files with 3 additions and 1 deletions
4
vm.c
4
vm.c
|
@ -416,7 +416,9 @@ static void generate_app (sexp ctx, sexp name, sexp loc, sexp lam, sexp app) {
|
||||||
#if SEXP_USE_TAIL_JUMPS
|
#if SEXP_USE_TAIL_JUMPS
|
||||||
else if (sexp_context_tailp(ctx) && sexp_refp(sexp_car(app))
|
else if (sexp_context_tailp(ctx) && sexp_refp(sexp_car(app))
|
||||||
&& name == sexp_ref_name(sexp_car(app))
|
&& name == sexp_ref_name(sexp_car(app))
|
||||||
&& loc == sexp_ref_loc(sexp_car(app)))
|
&& loc == sexp_ref_loc(sexp_car(app))
|
||||||
|
&& (sexp_length(ctx, sexp_cdr(app))
|
||||||
|
== sexp_length(ctx, sexp_lambda_params(lam))))
|
||||||
generate_tail_jump(ctx, name, loc, lam, app);
|
generate_tail_jump(ctx, name, loc, lam, app);
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue