mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
top-level isn't a tail-call
This commit is contained in:
parent
d33c766823
commit
b207ef5604
1 changed files with 2 additions and 1 deletions
3
eval.c
3
eval.c
|
@ -241,7 +241,7 @@ static sexp sexp_make_context(sexp *stack, sexp env) {
|
|||
sexp_context_depth(res) = 0;
|
||||
sexp_context_pos(res) = 0;
|
||||
sexp_context_top(res) = 0;
|
||||
sexp_context_tailp(res) = 1;
|
||||
sexp_context_tailp(res) = 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -788,6 +788,7 @@ static void generate_lambda (sexp lambda, sexp context) {
|
|||
emit(OP_DROP, ctx);
|
||||
}
|
||||
}
|
||||
sexp_context_tailp(ctx) = 1;
|
||||
generate(sexp_lambda_body(lambda), ctx);
|
||||
flags = sexp_make_integer((sexp_listp(sexp_lambda_params(lambda))==SEXP_FALSE)
|
||||
? 1 : 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue