diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-12-11 19:41:51 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-12-11 19:41:51 -0800 |
commit | 8dbc34dc612fe1501ddb79da19094b6051798d07 (patch) | |
tree | d1f3202bbccf9579cee17732c55ec44008411dd0 /tests/002/query-1.expected | |
parent | 17f11d14178db6e8367ba598bc2e4a1f0fae4d59 (diff) | |
download | txr-8dbc34dc612fe1501ddb79da19094b6051798d07.tar.gz txr-8dbc34dc612fe1501ddb79da19094b6051798d07.tar.bz2 txr-8dbc34dc612fe1501ddb79da19094b6051798d07.zip |
compiler: handle non-locally-exiting top-level forms.
* stdlib/compiler.tl (compile-file-conditionally): When evaluation
of a compiled top-level form is not suppressed, there is a risk
that it can terminate non-locally, via throwing an exception or
performing a block return. The compilation of the file is then
aborted. We can do better: using an unwind-protect, we can catch
all non-local control transfers out of the form and just ignore
them. The motivation for this is that it lets us compile files
which call (return-from load ...), without requiring that it be
written as (compile-only (return-from load ...)). Other things will
work, like compiling a (load "foo") where foo doesn't exist or
aborts due to errors.
Diffstat (limited to 'tests/002/query-1.expected')
0 files changed, 0 insertions, 0 deletions