summaryrefslogtreecommitdiffstats
path: root/autoload.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-05-09 20:24:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-05-09 20:24:52 -0700
commit14fddd89cbb63cd6ee99810b6730992a3c8be475 (patch)
tree7947290d288f82cc5b592e1753622692879432d9 /autoload.c
parentcc69832ceecf915971cbd09295e5bb4d39fc5de0 (diff)
downloadtxr-14fddd89cbb63cd6ee99810b6730992a3c8be475.tar.gz
txr-14fddd89cbb63cd6ee99810b6730992a3c8be475.tar.bz2
txr-14fddd89cbb63cd6ee99810b6730992a3c8be475.zip
trace: new parameter macro :trace for simple static tracing
Just add :trace to the head of the parameter list, and the function is traced. No dynamic turning on and off though. * autoload.c (trace_set_entries): Trigger autoload on :trace keyword. * stdlib/trace.tl (:trace): New parameter list expander. * txr.1: Documented.
Diffstat (limited to 'autoload.c')
-rw-r--r--autoload.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload.c b/autoload.c
index 86770c8a..84376173 100644
--- a/autoload.c
+++ b/autoload.c
@@ -405,9 +405,13 @@ static val trace_set_entries(val fun)
val name[] = {
lit("trace"), lit("untrace"), nil
};
+ val kname[] = {
+ lit("trace"), nil
+ };
autoload_sys_set(al_fun, sys_name, fun);
autoload_set(al_var, vname, fun);
autoload_set(al_fun, name, fun);
+ autoload_key_set(al_key, kname, fun);
return nil;
}