Hi,
Never mind, obviously the lambda will be called from inside itself, when it's a loop.
Von meinem iPhone gesendet
Am 06 Nov 2015 um 18:19 schrieb Alex Silva asandroq@gmail.com:
Hallo,
On 11/06/2015 05:54 PM, Marc Feeley wrote:
It isn’t clear how to fix this to avoid the need for the programmer to change the inlining limit. The simple approach of not beta-reducing the body of the function before it is inlined doesn’t work well when the body is actually made smaller by the beta-reduction.
But when the lambda is inside a letrec, does not escape and is called only once the beta reduction will never increase code size (provided that you do not emit the lambda). I have done something similar in my toy compiler:
https://github.com/asandroq/sly/blob/cps/src/compiler.scm#L758
Cheers, -alex