home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / acorn / tech / 42 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.5 KB

  1. Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!aukuni.ac.nz!cs18.cs.aukuni.ac.nz!jwil1
  2. Newsgroups: comp.sys.acorn.tech
  3. Subject: Re: New Language/Compiler (ideas wanted)
  4. Message-ID: <1992Aug13.205528.15434@cs.aukuni.ac.nz>
  5. From: jwil1@cs.aukuni.ac.nz (TMOTA)
  6. Date: Thu, 13 Aug 1992 20:55:28 GMT
  7. Sender: jwil1@cs.aukuni.ac.nz (TMOTA)
  8. References: <1195@grun.is> <1992Aug13.130618.18871@odin.diku.dk>
  9. Organization: Computer Science Dept. University of Auckland
  10. Keywords: Compiler/Language
  11. Lines: 21
  12.  
  13. torbenm@diku.dk (Torben AEgidius Mogensen) writes:
  14.  
  15. >Afeature I have sorely missed in compilers for C etc. is a cheap
  16. >tail-call: if the last thing you do in a procedure or function is to
  17. >call a procedure or function, this can be implemented as a goto rather
  18. >than a general procedure/function call. Also, the local variables of
  19.  
  20. What do you mean? What if the tail-called function then tries to call
  21. another function or (even worse) recurses? This could only work if
  22. the tail-called function expected to recieve *exactly* the stack frame
  23. that the tail-caller has had set up when it was called.
  24.  
  25. And remember that Acorn's C compiler (the ARM proc. call std.?) is clever
  26. enough to notice when you call a function that does not call another (a
  27. leaf function), and does not bother with most of the context-storing
  28. operations involved in normal function calls.
  29.  
  30. -- 
  31. _________________  "I'd like to answer this question in two ways:
  32.   /____ _ _/_ __       First in my normal voice, and then
  33.  // / //_//_ /_/       in a silly, high-pitched whine." (Monty Python)
  34.