summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-23 21:40:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-23 21:40:54 -0700
commitef932cc32411a4fd962ea0363f023c1564101add (patch)
tree02690298121a5e43e1e33240772a70a4313803ef
parentdbc319f348c17a56c92caa30b1a3f755ca059f69 (diff)
downloadtxr-ef932cc32411a4fd962ea0363f023c1564101add.tar.gz
txr-ef932cc32411a4fd962ea0363f023c1564101add.tar.bz2
txr-ef932cc32411a4fd962ea0363f023c1564101add.zip
tree-bind et al: don't retain full form for errors.
* share/txr/stdlib/compiler.tl (expand-bind-mac-params): We don't need the full form for error reporting, because only the leading symbol is reported in diagnostics. We do need the full form if the :form parameter is used. If :form is not used, then a compiled function need not carry the entire form in its data table.
-rw-r--r--share/txr/stdlib/compiler.tl5
1 files changed, 3 insertions, 2 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index c0e16c67..5f997d0d 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -808,9 +808,10 @@
(defun expand-bind-mac-params (ctx-form params menv-var
obj-var strict err-block body)
- (let (vars gen-stk (plen (gensym)))
+ (let (vars gen-stk (plen (gensym))
+ (err-form (rlcp ^(,(car ctx-form)) ctx-form)))
(macrolet ((berr (too-few-p)
- ^^(sys:bind-mac-error ',ctx-form ',params
+ ^^(sys:bind-mac-error ',err-form ',params
,obj-var ,',too-few-p)))
(labels ((get-gen ()
(or (pop gen-stk) (gensym)))