summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-07-07 21:07:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-07-07 21:07:01 -0700
commit1f7c9cbb96d6e67c5497986ad3eae8d5b68be87d (patch)
tree51b547baca1a6b18d553cb4c6579fd9e7cf1550e
parentf1e0138c8c67ec046b994985741d800bbd86520e (diff)
downloadtxr-1f7c9cbb96d6e67c5497986ad3eae8d5b68be87d.tar.gz
txr-1f7c9cbb96d6e67c5497986ad3eae8d5b68be87d.tar.bz2
txr-1f7c9cbb96d6e67c5497986ad3eae8d5b68be87d.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.tl2
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))))))))))