summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-27 21:38:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-27 21:38:06 -0700
commit7e2689debbaf40c77ae572849b73e3821efb25da (patch)
treeedcc5739dae9d0a53235265e38af01b8a3c2863a
parent679295d6bae2576555ebab444e44994a1f2befbd (diff)
downloadtxr-7e2689debbaf40c77ae572849b73e3821efb25da.tar.gz
txr-7e2689debbaf40c77ae572849b73e3821efb25da.tar.bz2
txr-7e2689debbaf40c77ae572849b73e3821efb25da.zip
compiler: don't wastefully enter into dreg table.
* share/txr/stdlib/compiler.tl (compiler get-dreg): If the input atom is nil, return the t0 register that always holds nil.
-rw-r--r--share/txr/stdlib/compiler.tl1
1 files changed, 1 insertions, 0 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index d77c4cd1..6a778ed7 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -122,6 +122,7 @@
(defmeth compiler get-dreg (me atom)
(condlet
+ ((((null atom))) '(t 0))
(((dreg [me.dreg atom])) dreg)
((((< me.dreg-cntr 256)))
(let* ((dreg ^(d ,(pinc me.dreg-cntr))))