home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!walter!gizmo!mo
- From: mo@gizmo.bellcore.com (Michael O'Dell)
- Subject: Re: No Last Call Optimization on Sparc and DECstation
- Message-ID: <1993Jan2.144518.20826@walter.bellcore.com>
- Followup-To: comp.compilers
- Keywords:
-
- Sender: news@walter.bellcore.com
- Nntp-Posting-Host: gizmo.bellcore.com
- Reply-To: mo@bellcore.com
- Organization: Center for Chaotic Repeatabilty
- References: <1992Dec30.094352.4243@cucs5.cs.cuhk.hk> <38249@cbmvax.commodore.com>
- Date: Sat, 2 Jan 93 14:45:18 GMT
- Lines: 18
-
- this is also known as "tail recursion folding" (or conversion or some
- such) and is practised routinely (ouch!) by LISP compilers on RISC
- machines. There are a number of challenges to exploiting the technique
- in C compilers (having to do with exception handling, setjmp/longjmp,
- etc). the other issue is "how big is the win?" for languages like
- Lisp and Prolog the frequency of the construct may well be rather
- different than in C code, making the effort less interesting.
-
- but as I said, as least in LISP compilers, tail recursion is indeed
- handled on modern RISC machines - several language definitions
- *require* tail-recursion folding, so they gotta do it.
-
- further discussions should probably move to comp.compilers, however.
-
- -Mike
-
- Bellcore?? Bellcore ain't allowed to have opinions - these be mine.
-
-