diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-05-12 07:24:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-05-12 07:24:26 -0700 |
commit | ea4b65ff500e829bc411a2dc666f9f0f85d3a2fd (patch) | |
tree | 67a98d68437e7b6afbfc8c19b578e03b68e69e31 /parser.c | |
parent | e84cd63507d64586a7bf4ed6b1769ffd8e311a35 (diff) | |
download | txr-ea4b65ff500e829bc411a2dc666f9f0f85d3a2fd.tar.gz txr-ea4b65ff500e829bc411a2dc666f9f0f85d3a2fd.tar.bz2 txr-ea4b65ff500e829bc411a2dc666f9f0f85d3a2fd.zip |
DWIM places must use Lisp-1 semantics.
This really only affects code which does something like
(set [f x] y) and f resolves as a function. (The TXR Program
bent over backwards to install a mutable object into a function
binding.) In this situation, we need to update the function binding
f, rather than some variable f.
* eval.c (op_lisp1_setq, op_lisp1_value): New static functions.
(eval_init): Register sys:lisp1-setq and sys:lisp1-value
special forms.
* place.tl (sys:*lisp1*): New special variable.
(sys:sym-place-update-expander, sys:sym-place-clobber-expander):
React to sys:*lisp1* variable by doing symbol access using Lisp-1
semantics, with help of newly introduced special forms.
(dwim): Bind sys:*lisp1* to true, if main argument is a symbolic place,
so that the update is done using Lisp-1 semantics. Use the
sys:lisp1-value operator when evaluating arguments.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions