diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-07 21:07:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-07 21:07:01 -0700 |
commit | 9c74d6687da25b2a538e5223968f6c7bea95ace0 (patch) | |
tree | 51b547baca1a6b18d553cb4c6579fd9e7cf1550e | |
parent | fa79fdda6284c3fcc1322f2db8c06dc324adb312 (diff) | |
download | txr-9c74d6687da25b2a538e5223968f6c7bea95ace0.tar.gz txr-9c74d6687da25b2a538e5223968f6c7bea95ace0.tar.bz2 txr-9c74d6687da25b2a538e5223968f6c7bea95ace0.zip |
compile-file: elide top-level atoms.
* share/txr/stdlib/compiler.tl (usr:compile-file): If a
top-level form is compiled that is an atom, don't emit the
translation, since it has no effect (beyond interning the
symbol).
-rw-r--r-- | share/txr/stdlib/compiler.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index f3acbc52..cb3ca9de 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -1686,7 +1686,7 @@ (sys:vm-execute-toplevel vm-desc) (when (or (neq pa *package-alist*)) (set fence t)))) - (when *emit* + (when (and *emit* (consp form)) out.(add flat-vd) (when fence out.(add :fence)))))))))) |