chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] Re: [Chicken-bugs] #356: inline recursion


From: Elf
Subject: Re: [Chicken-janitors] Re: [Chicken-bugs] #356: inline recursion
Date: Wed, 21 Nov 2007 01:32:27 -0800 (PST)

On Tue, 20 Nov 2007, felix winkelmann wrote:

On Nov 20, 2007 4:02 AM, Elf <address@hidden> wrote:

i think it can be solved fairly trivially: add a pass to go over the inlined
procedures, keeping a stack of inlined names.  drop elements off the stack once
the top-level ex-continuation returns.  check any new names against the stack.
if a name is encountered again, add a named let wrapper around the entire
procedure which binds the same arguments, and call that looper instead.
is there a reason this shouldnt work as expected?


That still won't terminate. What do you mean by "call the looper"? At
compile-time or at run-time? Can you give me an example? (Sorry,
I'm a bit thick in the moment).


cheers,
felix


are you feeling oke, felix?

heres some mostly-not-pseudocode to explain what i meant.  i make no promises
about whether this will work as currently coded, nor that i havent made stupid
errors, nor that this is optimal, nor ... you get the idea.  i threw it together
in a few hours, but it should work as an explanation.

-elf

Attachment: inline.scm
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]