diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-06-21 06:54:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-06-21 06:54:06 -0700 |
commit | 46480c25e62f60c761088c561d90b0f2f5a3143f (patch) | |
tree | 547012b297380d608a332b6a22770df877387e27 /parser.c | |
parent | 9290352b823d5f03f712ba873b4ba4d5c4067095 (diff) | |
download | txr-46480c25e62f60c761088c561d90b0f2f5a3143f.tar.gz txr-46480c25e62f60c761088c561d90b0f2f5a3143f.tar.bz2 txr-46480c25e62f60c761088c561d90b0f2f5a3143f.zip |
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.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |