Re: Tail call hacks with gcc (Anton Ertl)
7 Dec 1999 00:34:31 -0500

          From comp.compilers

Related articles
Tail call hacks with gcc danwang@vista.CS.Princeton.EDU (Daniel Wang) (1999-11-19)
Re: Tail call hacks with gcc (Ceri Storey) (1999-12-04)
Re: Tail call hacks with gcc (1999-12-07)
| List of all articles for this month |

From: (Anton Ertl)
Newsgroups: comp.compilers
Date: 7 Dec 1999 00:34:31 -0500
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 99-11-108
Keywords: GCC, code, optimize

  Daniel Wang <danwang@vista.CS.Princeton.EDU> writes:
>I'm using gcc as a backend, for a higher level language, and I really
>like a clean hack to get proper tail recusion to work.

The only reliable approach I know is to put everything in one
function, and program the calls explicitly using goto and use
labels-as-values for the unavoidable returns. The resulting program
should be decent enough performancewise, but the compiler may have
difficulties compiling the resulting huge function. Daniel Diaz'
wamcc system uses an approach like this.

- anton
M. Anton Ertl Some things have to be seen to be believed Most things have to be believed to be seen

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.