From ab4ae665f48656f9d2f0fc5d32197097f1624a70 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 14 Mar 2018 06:58:53 -0700 Subject: push can safely use alet rather than rlet. push doesn't unconditionally require a temporary location for operational correctness; a temporary is used only for evaluation order. Therefore it is safe to use alet to eliminate the temporary when (after all expansion) the item is a trivial symbolic expression. * share/txr/stdlib/place.tl (push): Use alet to bind the temp which holds the new item. --- share/txr/stdlib/place.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl index 8f7f4aa1..5168b22c 100644 --- a/share/txr/stdlib/place.tl +++ b/share/txr/stdlib/place.tl @@ -271,7 +271,7 @@ (defmacro push (new-item place :env env) (with-gensyms (new-sym) - ^(rlet ((,new-sym ,new-item)) + ^(alet ((,new-sym ,new-item)) ,(with-update-expander (getter setter) place env ^(,setter (cons ,new-sym (,getter))))))) -- cgit v1.2.3