summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-03-03 08:03:00 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-03-03 08:03:00 -0800
commit87ad7742d1fb7dd757f37dbf922eb30872e1b8ed (patch)
treebfe3536e8315e4bb718603e64fc2ff891aacd958
parentd6e7978be1b7f3c4ab81db87b6f15f3f26ac25ab (diff)
downloadtxr-87ad7742d1fb7dd757f37dbf922eb30872e1b8ed.tar.gz
txr-87ad7742d1fb7dd757f37dbf922eb30872e1b8ed.tar.bz2
txr-87ad7742d1fb7dd757f37dbf922eb30872e1b8ed.zip
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.
-rw-r--r--share/txr/stdlib/compiler.tl2
1 files changed, 1 insertions, 1 deletions
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))