summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-09 06:09:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-09 06:09:34 -0700
commite5459a644be8f64a54c07e70675c5b5637ff2992 (patch)
treeec01374f84285aec3aa8dc47c55da29cbc48aa9f
parent1d74a797e17b2c315ec85b4752ea6bfa3cd00226 (diff)
downloadtxr-e5459a644be8f64a54c07e70675c5b5637ff2992.tar.gz
txr-e5459a644be8f64a54c07e70675c5b5637ff2992.tar.bz2
txr-e5459a644be8f64a54c07e70675c5b5637ff2992.zip
awk macro: better code for rng with placelet.
* share/txr/stdlib/awk.tl (sys:awk-let): Use our wonderful placelet macro instead of symacrolet for binding the flag alias to the flag place. This removes the duplicate evaluations of the slot access.
-rw-r--r--share/txr/stdlib/awk.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/awk.tl b/share/txr/stdlib/awk.tl
index a2d03361..4c40494a 100644
--- a/share/txr/stdlib/awk.tl
+++ b/share/txr/stdlib/awk.tl
@@ -145,7 +145,7 @@
(from-expr-ex (sys:expand from-expr e))
(to-expr-ex (sys:expand to-expr e)))
(push rng-temp (qref ,awc rng-expr-temps))
- (push ^(symacrolet ((flag (vecref (qref ,',aws-sym rng-vec) ,ix)))
+ (push ^(placelet ((flag (vecref (qref ,',aws-sym rng-vec) ,ix)))
(cond
(,from-expr-ex (set flag t))
(,to-expr-ex (zap flag) t)