From ea817f07f716a712f239152a0a10813c8aa4788e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 16 Jul 2018 06:08:10 -0700 Subject: op: convert to Lisp trivial macros related to op. The op macro is no longer written in C, but the trivial macros ap, ip, ado, ido, ret and aret are still C. It's silly to have macros written in C, baked into the TXR executable, which just produce syntax for a complicated macro written in Lisp that must be autoloaded when that code is used. * eval.c (ap_s, apf_s, ipf_s, ret_s, aret_s): Variables removed. (me_ap, me_ip, me_ado, me_ido, me_ret_aret): Functions removed. (eval_init): Do not initialize removed variables. Remove registration for macros ap, ip, ado, ido, ret and aret. Intern the apf and ipf symbols in the same expression which registers these functions. * lisplib.c (op_set_entries): Add autoload entries for ap, ip, ado, ido, ret and aret. * share/txr/stdlib/op.tl (ap, ip, ado, ido, ret, aret): New macros. * protsym.c: Regenerated. --- lisplib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisplib.c') diff --git a/lisplib.c b/lisplib.c index b168552c..0e1b72bf 100644 --- a/lisplib.c +++ b/lisplib.c @@ -718,7 +718,8 @@ static val compiler_set_entries(val dlt, val fun) static val op_set_entries(val dlt, val fun) { val name[] = { - lit("op"), lit("do"), lit("lop"), + lit("op"), lit("do"), lit("lop"), lit("ap"), lit("ip"), + lit("ado"), lit("ido"), lit("ret"), lit("aret"), nil }; set_dlt_entries(dlt, name, fun); -- cgit v1.2.3