Related articles |
---|
[Q:] tail calls and parameter passing reig@dcs.gla.ac.uk (Fermin Reig) (1998-11-19) |
Re: [Q:] tail calls and parameter passing gary@wheel.tiac.net (1998-11-21) |
Re: [Q:] tail calls and parameter passing ramsdell@linus.mitre.org (John D. Ramsdell) (1998-11-21) |
Re: [Q:] tail calls and parameter passing monnier+comp/compilers/news/@tequila.cs.yale.edu (Stefan Monnier) (1998-11-24) |
Re: [Q:] tail calls and parameter passing bijuthom@ibm.net (Biju Thomas) (1998-11-24) |
From: | gary@wheel.tiac.net (Gary D. Duzan) |
Newsgroups: | comp.compilers |
Date: | 21 Nov 1998 12:05:02 -0500 |
Organization: | Brain Dead Innovations |
References: | 98-11-090 |
Keywords: | optimize |
Fermin Reig <reig@dcs.gla.ac.uk> wrote:
=>[ how can one handle a tail call from a routine without memory
=> parameters to one with memory parameters? ]
The easiest thing is probably to just not optimize tail calls
with memory arguments. Beyond that, it probably depends on your
calling conventions. The one I've looked into a bit, namely the
AIX/RS6K C calling convention, allocates a fairly large fixed sized
stack frame for any function which calls another one, so there
should be space there in any case. So the tail call code in G could
write any memory args to F's frame, drop its own, and call H. Other
conventions may be less friendly (though probably a lot less
stack-hungry, as well.)
Gary D. Duzan
Humble Practitioner of the Computing Arts
Return to the
comp.compilers page.
Search the
comp.compilers archives again.