diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-02-08 20:34:34 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-02-08 20:34:34 -0800 |
commit | 5ab33195fb46c27a1b374532a2e30a5a9cf5314b (patch) | |
tree | ead36810f728ba9a7c666fec22003751a537f069 /eval.c | |
parent | c22d38f6d943ef0e925390dfd4f0b165fd0a693e (diff) | |
download | txr-5ab33195fb46c27a1b374532a2e30a5a9cf5314b.tar.gz txr-5ab33195fb46c27a1b374532a2e30a5a9cf5314b.tar.bz2 txr-5ab33195fb46c27a1b374532a2e30a5a9cf5314b.zip |
compiler: inlined chain: simplify variadic lambdas.
The opip syntax often generates lambdas that have a trailing
parameter and use [sys:apply ...]. This is wasteful in the
second and subsequent argument positions of a chain, because we
know that only a single value is coming from the previous
function. We can pattern match these lambdas and convert
the trailing argument to a single fixed parameter.
* stdlib/compiler.tl (simplify-variadic-lambda): New function.
(inline-chain-rec): Try to simplify every function through
simplify-variadic-lambda. The leftmost function is treated in
inline-chain, so these are all second and subsequent
functions.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions