sexp_bytecode_source should always be taken from the lambda

This is taken from the read source of the lambda form itself.
Previously it was getting the source of the expanded first expression,
which more often than not was the let definition in init-7.scm
This commit is contained in:
Alex Shinn 2021-04-08 10:09:58 +09:00
parent f7b546769c
commit d69ffce3f2

2
vm.c
View file

@ -678,9 +678,7 @@ static void generate_lambda (sexp ctx, sexp name, sexp loc, sexp lam, sexp lambd
sexp_context_exception(ctx) = bc; sexp_context_exception(ctx) = bc;
} else { } else {
sexp_bytecode_name(bc) = sexp_lambda_name(lambda); sexp_bytecode_name(bc) = sexp_lambda_name(lambda);
#if ! SEXP_USE_FULL_SOURCE_INFO
sexp_bytecode_source(bc) = sexp_lambda_source(lambda); sexp_bytecode_source(bc) = sexp_lambda_source(lambda);
#endif
if (sexp_nullp(fv)) { if (sexp_nullp(fv)) {
/* shortcut, no free vars */ /* shortcut, no free vars */
tmp = sexp_make_vector(ctx2, SEXP_ZERO, SEXP_VOID); tmp = sexp_make_vector(ctx2, SEXP_ZERO, SEXP_VOID);