Article View: comp.sys.acorn.tech
Article #134Re: New Language/Compiler (ideas wanted)
From: Harry Meekings
Date: Fri, 14 Aug 1992 15:46
Date: Fri, 14 Aug 1992 15:46
25 lines
1643 bytes
1643 bytes
In article <1992Aug13.130618.18871@odin.diku.dk> torbenm@diku.dk (Torben AEgidius Mogensen) writes: >Afeature I have sorely missed in compilers for C etc. is a cheap >tail-call: if the last thing you do in a procedure or function is to >call a procedure or function, this can be implemented as a goto rather >than a general procedure/function call. Also, the local variables of >the calling procedure need not be saved before the call, as they will >never be used again. Note that this is not a laguage feature, but a >compiler feature. This requires a callee-saves-registers strategy, but >that is often the simplest anyway. > It's curious that this should be posted in an Acorn newgroup, since the Acorn C compiler does indeed do (indeed, has always done) conversion of tail-calls branches, except when the calling function contains a call to setjmp or the calling function takes the address of an argument or when compilation is using the -g flag (to avoid confusing the poor user). It's true that lots of compilers don't do this but, bearing in mind the background of the compiler's original authors in functional programming, it's unsurprising that the Aconr compiler does. Harry Meekings
Technical Details
Message-ID:
<5322@armltd.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!armltd!hmeekingsReferences:
<1992Aug13.130618.18871@odin.diku.dk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!armltd!hmeekings From: hmeekings@armltd.co.uk (Harry Meekings) Newsgroups: comp.sys.acorn.tech Subject: Re: New Language/Compiler (ideas wanted) Message-ID: <5322@armltd.uucp> Date: 14 Aug 92 15:46:11 GMT References: <1992Aug13.130618.18871@odin.diku.dk> Sender: hmeeking@armltd.uucp Distribution: comp Organization: A.R.M. Ltd, Swaffham Bulbeck, Cambs, UK Lines: 25