summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-02-07 22:36:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-02-07 22:36:37 -0800
commitc22d38f6d943ef0e925390dfd4f0b165fd0a693e (patch)
treef2a551e685ebc5a83b3683119d4ffddeb9cf57b2 /eval.c
parentf723f6f44bcbd2b1a0b083fbd7a0db23cd42257d (diff)
downloadtxr-c22d38f6d943ef0e925390dfd4f0b165fd0a693e.tar.gz
txr-c22d38f6d943ef0e925390dfd4f0b165fd0a693e.tar.bz2
txr-c22d38f6d943ef0e925390dfd4f0b165fd0a693e.zip
compiler: implement inlining for chain expressions.
The opip syntax and its variants transforms into chain expressions. Currently, we emit actual chain function calls, and so all the chain arguments that are lambda expressions have become closures. In this commit, an inlining optimization is introduced which turns some chain function calls into chained expressions. The lambdas are then immediately called, and so succumb to the lambda-eliminating optimization. * stdlib/compiler.tl (compiler comp-fun-form): Handle chain forms. At optimization level 6 or higher, if the form is eligible for the transform, perform it. (inline-chain-rec, can-inline-chain, inline-chain): New functions. * txr.1: Mention that *opt-level* 6 does this chain optimization.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions