diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-01-22 19:47:45 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-01-22 19:47:45 -0800 |
commit | 959c41f90a86a3327e586806bb9b46a9a76e8b05 (patch) | |
tree | 0bb741d8d870eadd5dfa94220f6b6941236d1c82 /arith.h | |
parent | e121e2a143925a2ca79e974f131ec2da762a52dc (diff) | |
download | txr-959c41f90a86a3327e586806bb9b46a9a76e8b05.tar.gz txr-959c41f90a86a3327e586806bb9b46a9a76e8b05.tar.bz2 txr-959c41f90a86a3327e586806bb9b46a9a76e8b05.zip |
bugfix: expansion order in face of param macros.
We are following an incorrect expansion order for parameters
and bodies in the face of parameter macros. We are expanding
the body first, using the raw, untransformed parameters,
which is wrong. Secondly, we then neglect to expand the
body which emerges from param expansion. The fix is to pass
the unexpanded body to expand_params. Then expand the body
which emerges.
This also fixes another bug: the macro env passed to param
expanders is documented as excluding the parameters. This
is now actually true.
* eval.c (expand_macrolet, expand_tree_cases,
expand_catch_clause): Rearrange expansion logic surrounding
call to expand_params.
(do_expand): Likewise, and also introduce expansion for the
sys:with-dyn-rebinds operator. This is now needed because
under the new order, with-dyn-rebinds is now introduced into
unexpanded code. If it isn't expanded, then it then wrongly
protects its enclosed forms from expansion.
Diffstat (limited to 'arith.h')
0 files changed, 0 insertions, 0 deletions