diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-03-03 08:03:00 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-03-03 08:03:00 -0800 |
commit | 48a21afcd452521bc5133854058f5922f67522e1 (patch) | |
tree | bfe3536e8315e4bb718603e64fc2ff891aacd958 | |
parent | ac937a6633505d6ec1ac4869e1c63523d0b9f109 (diff) | |
download | txr-48a21afcd452521bc5133854058f5922f67522e1.tar.gz txr-48a21afcd452521bc5133854058f5922f67522e1.tar.bz2 txr-48a21afcd452521bc5133854058f5922f67522e1.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.tl | 2 |
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)) |