summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-13 22:18:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-13 22:18:17 -0700
commitc710369fb7965510425f5577315aa62fa3d07af7 (patch)
treeb7a9595e8de3520c338efcd7d38062b89cf513c1
parentce4ed4d4a749707bf2780fd3770e6080d1f3e9b7 (diff)
downloadtxr-c710369fb7965510425f5577315aa62fa3d07af7.tar.gz
txr-c710369fb7965510425f5577315aa62fa3d07af7.tar.bz2
txr-c710369fb7965510425f5577315aa62fa3d07af7.zip
bugfix: line number of unbound vars not reported.
* eval.c (expand): Do not create expansion debug frames for atomic forms, only for compound forms.
-rw-r--r--eval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index f5546b35..af3bea23 100644
--- a/eval.c
+++ b/eval.c
@@ -4903,8 +4903,10 @@ val expand(val form, val menv)
{
val ret = nil;
#if CONFIG_DEBUG_SUPPORT
+ val is_cons = consp(form);
uw_frame_t expand_fr;
- uw_push_expand(&expand_fr, form, menv);
+ if (is_cons)
+ uw_push_expand(&expand_fr, form, menv);
#endif
ret = do_expand(form, menv);
@@ -4913,7 +4915,8 @@ val expand(val form, val menv)
set_origin(ret, form);
#if CONFIG_DEBUG_SUPPORT
- uw_pop_frame(&expand_fr);
+ if (is_cons)
+ uw_pop_frame(&expand_fr);
#endif
return ret;
}