diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-23 21:40:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-23 21:40:54 -0700 |
commit | 19eb7cd0248775b847daaa6e69949f82661167b6 (patch) | |
tree | 02690298121a5e43e1e33240772a70a4313803ef | |
parent | 2da907a6e1c4cd83d7109b9805394484e43b6216 (diff) | |
download | txr-19eb7cd0248775b847daaa6e69949f82661167b6.tar.gz txr-19eb7cd0248775b847daaa6e69949f82661167b6.tar.bz2 txr-19eb7cd0248775b847daaa6e69949f82661167b6.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.tl | 5 |
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))) |