tail recursion elimination

Mario Wolczko Mario.Wolczko at Eng.Sun.COM
Wed Aug 30 20:14:26 UTC 1995


Date: Wed, 30 Aug 1995 21:34:01 +0200
From: rainer at physik3.gwdg.de (Rainer Blome)
To: self-interest at self.sunlabs.com
In-Reply-To: <9508301651.AA23068 at obj.Eng.Sun.COM> (Mario.Wolczko at eng.sun.com)
Subject: tail recursion elimination


jecel wrote:
> While this optimization is invisible in a normal execution [during
> debugging] you will find that a large chunk of your stack is missing.

yes, the self group had written that in some place, i had forgotten.

how about deoptimization then?  with tre you can't really do that
dynamically, you might have to rerun a huge amount of code, it might not even
work at all.

so it should be a user- (programmer-) selectable optimization.  the
debugger will have to explain that and why the frames are missing.


i was just looking at the implementation of the looping behavior in traits
block - it boils down to the _Restart primitive which is even better
visible than missing stack frame in the debugger.

btw, i tried to understand what the loopExit[Value]Continue methods do, but
failed.  they might have sth to do with this discussion, do they?  there
seem to be no senders of these messages, why are they there?

rainer




More information about the Self-interest mailing list