diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-05-09 20:24:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-05-09 20:24:52 -0700 |
commit | 14fddd89cbb63cd6ee99810b6730992a3c8be475 (patch) | |
tree | 7947290d288f82cc5b592e1753622692879432d9 /autoload.c | |
parent | cc69832ceecf915971cbd09295e5bb4d39fc5de0 (diff) | |
download | txr-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; } |