From 6b27c09924a57ad361ecd42d0891d6882f8803dd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 29 Nov 2019 22:05:12 -0800 Subject: load: bug: source loc gathered for .tlo files. Contrary to the belief expressed in the commit message of June 2018's 6b456fd35c9a917a0a7116094c9c441b4d1400d1, source location info is being recorded during the loading of compiled files. The reason is that the function used for processing the forms, lisp_parse_impl, overrides it. * parser.c (read_file_common): Use lisp_parse_impl directly, rather than lisp_parse. Specify that function's rlcp_p argument as false when processing compiled code. --- parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 60d98df3..312c5476 100644 --- a/parser.c +++ b/parser.c @@ -720,6 +720,7 @@ static val read_file_common(val self, val stream, val error_stream, val compiled val first = t; val big_endian = nil; val parser = ensure_parser(stream, name); + val not_compiled = null(compiled); if (compiled) { parser_t *pi = parser_get_impl(self, parser); @@ -727,7 +728,8 @@ static val read_file_common(val self, val stream, val error_stream, val compiled } for (;;) { - val form = lisp_parse(stream, error_stream, error_val, name, colon_k); + val form = lisp_parse_impl(self, nil, not_compiled, stream, + error_stream, error_val, name, colon_k); if (form == error_val) { if (parser_errors(parser) != zero) -- cgit v1.2.3