summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-18 07:17:46 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-18 07:17:46 -0800
commit824729d5105c38bed57311b6349e0690ec123435 (patch)
treefa51e773ba25c798668c1ed5b66104eb60bd45b1 /share
parent9e48dd8f5265d5ea0dd683da6721b58fafcd8422 (diff)
downloadtxr-824729d5105c38bed57311b6349e0690ec123435.tar.gz
txr-824729d5105c38bed57311b6349e0690ec123435.tar.bz2
txr-824729d5105c38bed57311b6349e0690ec123435.zip
compiler: reduce (list* x) to x.
* share/txr/stdlib/compiler.tl (reduce-lisp): Add one more reduction case. There is a "hit" for this somewhere, because even though this adds code, overall 200 bytes are saved over the entire library.
Diffstat (limited to 'share')
-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 d406c6bc..8652948f 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -1470,7 +1470,7 @@
form (match-case form
((append (list . @largs) . @aargs)
^(list* ,*largs (append ,*aargs)))
- ((append @arg) arg)
+ ((@(or append list*) @arg) arg)
(@(require (list* . @(listp @args))
(equal '(nil) (last args)))
^(list ,*(butlastn 1 args)))