From 14fddd89cbb63cd6ee99810b6730992a3c8be475 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 9 May 2025 20:24:52 -0700 Subject: 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. --- autoload.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'autoload.c') 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; } -- cgit v1.2.3