From c438b72ccc3dcb7a86153de22a92119de4e236df Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 22 Mar 2023 18:54:54 -0700 Subject: compiler: dohash: source location propagation * stdlib/compiler.tl (expand-dohash): Add missing rlcp. --- stdlib/compiler.tl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'stdlib') 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 -- cgit v1.2.3