|
From: | Elf |
Subject: | [Chicken-janitors] Re: [Chicken-bugs] #356: inline recursion |
Date: | Mon, 19 Nov 2007 19:02:38 -0800 (PST) |
On Mon, 19 Nov 2007, Chicken Scheme wrote:
#356: inline recursion -------------------+-------------------------------------------------------- Reporter: elf | Owner: Type: defect | Status: closed Priority: major | Component: compiler Version: 2.7 | Resolution: wontfix Keywords: | -------------------+-------------------------------------------------------- Changes (by felix): * status: reopened => closed * resolution: => wontfix Comment: That "fix" of mine was bogus. I don't think this can be solved at and loops for the same reason why self recursive macro expansions loop. The only sort of solution would be to abort of a fixed set of expansions, which is rather crude.
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? -elf
[Prev in Thread] | Current Thread | [Next in Thread] |