summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-04 19:53:27 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-11-04 19:53:27 -0700
commit58e71895434760890e55a483a61b40ed57390b93 (patch)
treeb3061e5d1123d9a43eeca571b671a7a1db07b9a4
parent47f573090ad0b52200ef0359282410977e789761 (diff)
downloadtxr-58e71895434760890e55a483a61b40ed57390b93.tar.gz
txr-58e71895434760890e55a483a61b40ed57390b93.tar.bz2
txr-58e71895434760890e55a483a61b40ed57390b93.zip
No need to track origin of entire macrolet.
* eval.c (expand_macrolet): Do not call set_origin to establish a macro ancestry link between the output of the expansion and the original macrolet block. This is not necessary. What is useful and important that the individual expansions of the actual macrolets have their origins tracked to the respective subforms of the original macrolet form. That's already taken care of by expand_macro.
-rw-r--r--eval.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index a1c8c631..0016630e 100644
--- a/eval.c
+++ b/eval.c
@@ -1735,12 +1735,10 @@ static void builtin_reject_test(val op, val sym, val form)
static val expand_macrolet(val form, val menv)
{
- uses_or2;
val op = car(form);
val body = cdr(form);
val macs = pop(&body);
val new_env = make_env(nil, nil, menv);
- val form_origin = lookup_origin(form);
for (; macs; macs = cdr(macs)) {
val macro = car(macs);
@@ -1759,8 +1757,7 @@ static val expand_macrolet(val form, val menv)
cons(nil, cons(params, cons(block, nil)))), block);
}
- return set_origin(rlcp_tree(maybe_progn(expand_forms(body, new_env)), body),
- or2(form_origin, form));
+ return rlcp_tree(maybe_progn(expand_forms(body, new_env)), body);
}
static val expand_symacrolet(val form, val menv)