From 46480c25e62f60c761088c561d90b0f2f5a3143f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 21 Jun 2018 06:54:06 -0700 Subject: load: do not record source location for compiled files. * parser.c (read_file_common): When reading a compiled file, turn off the rec_source_loc flag in the parser, since the forms are just data, and not source code for which we need error reporting. --- parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'parser.c') diff --git a/parser.c b/parser.c index ca9fd3bc..a6285b75 100644 --- a/parser.c +++ b/parser.c @@ -616,10 +616,15 @@ static val read_file_common(val stream, val error_stream, val compiled) val name = stream_get_prop(stream, name_k); val first = t; val big_endian = nil; + val parser = ensure_parser(stream); + + if (compiled) { + parser_t *pi = get_parser_impl(parser); + pi->rec_source_loc = 0; + } for (;;) { val form = lisp_parse(stream, error_stream, error_val, name, colon_k); - val parser = get_parser(stream); if (form == error_val) { if (parser_errors(parser) != zero) -- cgit v1.2.3