From 7e2689debbaf40c77ae572849b73e3821efb25da Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 27 Mar 2018 21:38:06 -0700 Subject: 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. --- share/txr/stdlib/compiler.tl | 1 + 1 file changed, 1 insertion(+) 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)))) -- cgit v1.2.3