diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-03-22 18:54:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-03-22 18:54:54 -0700 |
commit | b813534bd7a862e524c989604ac5903fef5e7a73 (patch) | |
tree | e5e457d4b6d152149c68f885df3cb2dce48abe83 /stdlib/compiler.tl | |
parent | e9fb136ada07cc6bb5b56fa524dd1725e8b0c349 (diff) | |
download | txr-b813534bd7a862e524c989604ac5903fef5e7a73.tar.gz txr-b813534bd7a862e524c989604ac5903fef5e7a73.tar.bz2 txr-b813534bd7a862e524c989604ac5903fef5e7a73.zip |
compiler: dohash: source location propagation
* stdlib/compiler.tl (expand-dohash): Add missing rlcp.
Diffstat (limited to 'stdlib/compiler.tl')
-rw-r--r-- | stdlib/compiler.tl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl index 3b0e34e1..b27a0a82 100644 --- a/stdlib/compiler.tl +++ b/stdlib/compiler.tl @@ -1906,14 +1906,16 @@ (defun expand-dohash (form) (mac-param-bind form (t (key-var val-var hash-form : res-form) . body) form (with-gensyms (iter-var cell-var) - ^(let (,key-var ,val-var (,iter-var (hash-begin ,hash-form)) ,cell-var) - (block nil - (sys:for-op ((sys:setq ,cell-var (hash-next ,iter-var))) - (,cell-var ,res-form) - ((sys:setq ,cell-var (hash-next ,iter-var))) - (sys:setq ,key-var (car ,cell-var)) - (sys:setq ,val-var (cdr ,cell-var)) - ,*body)))))) + (rlcp + ^(let (,key-var ,val-var (,iter-var (hash-begin ,hash-form)) ,cell-var) + (block nil + (sys:for-op ((sys:setq ,cell-var (hash-next ,iter-var))) + (,cell-var ,res-form) + ((sys:setq ,cell-var (hash-next ,iter-var))) + (sys:setq ,key-var (car ,cell-var)) + (sys:setq ,val-var (cdr ,cell-var)) + ,*body))) + form)))) (defun expand-each (form env) (mac-param-bind form (t each-type vars . body) form |