From 1f7c9cbb96d6e67c5497986ad3eae8d5b68be87d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 7 Jul 2019 21:07:01 -0700 Subject: 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). --- share/txr/stdlib/compiler.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)))))))))) -- cgit v1.2.3