diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-05-09 01:14:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-05-09 01:14:13 -0700 |
commit | cc69832ceecf915971cbd09295e5bb4d39fc5de0 (patch) | |
tree | 13ff70a0c2b0c255e83b350622561c421037d51b | |
parent | 8263cb7dbaf8f9238ff1573c2836e869f4811488 (diff) | |
download | txr-cc69832ceecf915971cbd09295e5bb4d39fc5de0.tar.gz txr-cc69832ceecf915971cbd09295e5bb4d39fc5de0.tar.bz2 txr-cc69832ceecf915971cbd09295e5bb4d39fc5de0.zip |
flet/labels: generate macro ancestor form,
* eval.c (me_flet_labels): Create a synthetic
macro ancestor form which is (labels <name>)
or (flet <name>) so the function name, location
and type of binding can be traced from the
lambda expression. This will be useful to the
:trace parameter macro that is coming.
-rw-r--r-- | eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4247,8 +4247,12 @@ static val me_flet_labels(val form, val menv) val func = car(funcs); val name = pop(&func); val params = pop(&func); + val orig = cons(sym, cons(name, nil)); val lambda = cons(lambda_s, cons(params, func)); + set_origin(lambda, orig); + rlcp(orig, form); + ptail = list_collect (ptail, cons(name, cons(lambda, nil))); } |