summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-06-28 06:30:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-06-28 06:30:08 -0700
commit20cff2e9c0fe22120114624ef7eff40b343d0b91 (patch)
treedb952992e725260b3b7f8cd3eb532e98c98d6ee1 /share
parentea16bdd15f75830ea9e2bebd2ea1aaa3f9bfecf6 (diff)
downloadtxr-20cff2e9c0fe22120114624ef7eff40b343d0b91.tar.gz
txr-20cff2e9c0fe22120114624ef7eff40b343d0b91.tar.bz2
txr-20cff2e9c0fe22120114624ef7eff40b343d0b91.zip
awk: bugfix: block optimized away by compiler.
This breaks the (next) awk macro, breaking awk expressions which want to short-circuit to the next record. * share/txr/stdlib/awk.tl (sys:awk-state loop): The :awk-rec block is being optimized away by the compiler because it doesn't contain any direct function calls to functions that are not in the standard library. We must use block*, which isn't subject to this optimization.
Diffstat (limited to 'share')
-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 a0e2a39e..b4f6c8c8 100644
--- a/share/txr/stdlib/awk.tl
+++ b/share/txr/stdlib/awk.tl
@@ -175,7 +175,7 @@
(set aws.rec rec aws.orig-rec rec)
(inc aws.rec-num)
(inc aws.file-rec-num)
- (while* (eq :awk-again (block :awk-rec [func aws]))
+ (while* (eq :awk-again (block* :awk-rec [func aws]))
aws.(rec-to-f)))
(when end-file-func
[end-file-func aws])))))))