summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-12-29 21:04:11 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-12-29 21:04:11 -0800
commit955bf2b707a424dd7db884362089ee7299908b2e (patch)
tree6d17bd0945c6beabb9d602540e6f75264c74130a
parentf74d59318a3af5af6a7902fd9501098da400719e (diff)
downloadtxr-955bf2b707a424dd7db884362089ee7299908b2e.tar.gz
txr-955bf2b707a424dd7db884362089ee7299908b2e.tar.bz2
txr-955bf2b707a424dd7db884362089ee7299908b2e.zip
last_form_evaled must track argument evaluation.
* eval.c (do_eval): Set last_form_evaled to form before evaluating the arguments, so that any errors which are not attributed to their own sub forms (such as unbound symbols) are attributed to this form.
-rw-r--r--eval.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index 290ab085..2b1a3ac1 100644
--- a/eval.c
+++ b/eval.c
@@ -1138,16 +1138,15 @@ static val do_eval(val form, val env, val ctx,
val ret, lfe_save = last_form_evaled;
args_decl(args, argc);
- do_eval_args(rest(form), env, form, &lookup_var, args);
-
last_form_evaled = form;
+ do_eval_args(rest(form), env, form, &lookup_var, args);
debug_frame(oper, args, nil, env, nil, nil, nil);
-
ret = generic_funcall(cdr(fbinding), args);
+ debug_end;
last_form_evaled = lfe_save;
- debug_end;
+
debug_return (ret);
}
}