Related articles |
---|
[22 earlier articles] |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26) |
Re: Caller/Callee saved Registers anton@mips.complang.tuwien.ac.at (1994-03-28) |
Re: Caller/Callee saved Registers zsh@cs.princeton.edu (1994-03-27) |
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-28) |
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-29) |
Re: Caller/Callee saved Registers bart@cs.uoregon.edu (1994-03-29) |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-29) |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-29) |
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-31) |
Re: Caller/Callee saved Registers conway@munta.cs.mu.OZ.AU (1994-04-02) |
Re: Caller/Callee saved Registers nandu@cs.clemson.edu (1994-04-21) |
Re: Caller/Callee saved Registers preston@noel.cs.rice.edu (1994-04-22) |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-04-23) |
[1 later articles] |
Newsgroups: | comp.compilers |
From: | hbaker@netcom.com (Henry G. Baker) |
Keywords: | registers, optimize |
Organization: | nil |
References: | 94-03-054 94-03-159 |
Date: | Tue, 29 Mar 1994 16:50:04 GMT |
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>So this is not the problem with tail call optimization in C. So what
>is? Why isn't it done?
If you allocate any local storage in the 'tail-recursive' routine and keep
pointers to it, you lose. Since some C programs do this, and testing for
it is kinda hard, I can understand why it isn't the default behavior. I
believe that this thread discussed this very issue about 2 months ago. A
reference to an article about the problems with C tail recursion was
posted, but I didn't write it down.
Since getting C to do this routinely is difficult, I have 'gone with the
flow' and suggested utilizing this behavior to incoporate 'tail recursion'
and a first-level generational GC in the same mechanism. My paper is
called 'Cheney on the MTA', and I'll be happy to send a copy to anyone who
wants it. I also have a version of the Boyer Benchmark using this style
of C coding, which I'll also be happy to send. Perhaps these should be
stored in some ftp directory? Any volunteers?
John McClain <pdp8@ai.mit.edu> wrote:
|> > The lack of tail-call optimization really hurts if you want
|> > to use a continuation passing style of programming.
The 'Cheney on the MTA' technique gives you O(1) continuation captures
'for free'.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.