This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Better support for tailcalls
- To: pizka at in dot tum dot de
- Subject: Re: Better support for tailcalls
- From: David Starner <dvdeug at x8b4e53cd dot dhcp dot okstate dot edu>
- Date: Sun, 6 Feb 2000 12:58:14 -0600
- Cc: gcc at gcc dot gnu dot org
- References: <3899FB60.6DB664C6@biretta.cam.uk.eu.microsoft.com>
- Reply-To: dstarner98 at aasaa dot ofe dot org
On Thu, Feb 03, 2000 at 10:04:16PM +0000, Markus Pizka wrote:
> Hello,
>
> to support the implementation of new front ends for gcc (especially
> functional languages) I am highly
> interested in integrating a fully general tailcall feature into gcc.
Cool. Considering my grant proposal for adding a Scheme frontend to
GCC, this could come in very useful.
> I wonder, has anyone succeeded, yet or is there a partial implementation
> that could be used as a starting point?
fgrep -ir recursive gcc-cvs | fgrep -i tail | wc
10 97 766
Look in flow.c and stmt.c.
> As a first step, I think it would be sufficient if the gcc back end
> would not automatically detect
> tailcalls but only provide a mechanism to transform a tail call
> specified by the front end
> (e.g. with a TREE_TAILCALL flag added to CALL_EXPR trees) into
> a jump 'with argument passing'.
Why? Personally, I was planning on doing it (if I had to) in tree,
as that should have all the information necessary. I don't see
what you'd gain by having each frontend try to interpret it.
--
David Starner - dstarner98@aasaa.ofe.org
Only a nerd would worry about wrong parentheses with
square brackets. But that's what mathematicians are.
-- Dr. Burchard, math professor at OSU