summaryrefslogtreecommitdiffstats
path: root/eval.c
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
commitc9c7cf1cb20558b28c76147e02453a17576ab2a9 (patch)
treeb7a9595e8de3520c338efcd7d38062b89cf513c1 /eval.c
parent0938b17f51f97337ed3fe635dba4cb1ee60fcde2 (diff)
downloadtxr-c9c7cf1cb20558b28c76147e02453a17576ab2a9.tar.gz
txr-c9c7cf1cb20558b28c76147e02453a17576ab2a9.tar.bz2
txr-c9c7cf1cb20558b28c76147e02453a17576ab2a9.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.
Diffstat (limited to 'eval.c')
-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;
}