From 48a21afcd452521bc5133854058f5922f67522e1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 3 Mar 2021 08:03:00 -0800 Subject: compiler: lift uslot and umethod forms too. The uslot and umethod functions produce functions; and should be lifted to load-time, if possible. For instance, the .foo expression [mapcar .foo list] translates to a (uslot 'foo) function call. This references no variables, and so is liftable to load-time. The umethod function is an extension of uslot that allows partially applied method arguments to be carried. If those arguments are all functional, the umethod call is liftable. * share/txr/stdlib/compiler.tl (%functional-funs%): Include umethod and uslot. --- share/txr/stdlib/compiler.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index 5182fda0..d3b1a44e 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -296,7 +296,7 @@ (defvarl %functional-funs% '(chain chand juxt andf orf notf iff iffi dup flipargs if or and - progn prog1 prog2 retf apf ipf callf mapf tf nilf)) + progn prog1 prog2 retf apf ipf callf mapf tf nilf umethod uslot)) (defvarl %functional% (hash-list %functional-funs% :eq-based)) -- cgit v1.2.3