Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: mps@dent.uchicago.edu (Michael Spertus)
Subject: Re: ANDF - some (mis)information
Date: Thu, 16 Dec 1993 14:36:15 GMT	[thread overview]
Message-ID: <1993Dec16.143615.6064@midway.uchicago.edu> (raw)
In-Reply-To: 2enk32$oi7@news.parc.xerox.com

From uchinews!ncar!gatech!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!decwrl!parc!boehm Thu Dec 16 08:31:25 CST 1993
Article: 9856 of comp.lang.misc
Xref: uchinews comp.lang.misc:9856 comp.lang.c++:54108 comp.arch:30194 comp.unix.osf.misc:835
Path: uchinews!ncar!gatech!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!decwrl!parc!boehm
From: boehm@parc.xerox.com (Hans Boehm)
Newsgroups: comp.lang.misc,comp.lang.c++,comp.arch,comp.unix.osf.misc
Subject: Re: ANDF - some (mis)information
Date: 15 Dec 1993 18:12:50 GMT
Organization: Xerox Palo Alto Research Center
Lines: 36
Message-ID: <2enk32$oi7@news.parc.xerox.com>
References: <rfgCHpqEE.GtD@netcom.com> <2el49dINN638@network.ucsd.edu> <1993Dec15.121017.16629@odin.diku.dk>
NNTP-Posting-Host: siria.parc.xerox.com

[I suggest we move this discussion to just comp.lang.misc]

torbenm@diku.dk (Torben AEgidius Mogensen) writes:

>>Two things that I (and others) have missed in C as an intermediate
>>language for implementation of functional languages are tail-call
>>optimization and indirect jumps.

>>Tail-call optimization means that you are guarateed that if the last
>>thing you do in a procedure or function is to call another procedure
>>or function, then all the stack space that the calling function uses
>>is removed from the stack before the called function uses any stack
>>space. This ensures constant stack usage of tail-recursive (mutually)
>>recursive functions.

>This is not safe in C, since pointers into the callers activation
>record may still be around.  I've never managed to understand what
>the corresponding "guarantee" in scheme meant, either.  Parts of
>the callers environment may also escape there.  In scheme, environment
>growth in response to a tail call somehow doesn't count.

There is a safe implementation. Simply replace the parms in the
current stack frame with those that would have been pushed by the
call and jump back to the top. This only becomes trouble where the
address of something in the current frame is passed to the next
frame. There can be a warning about that.




  reply	other threads:[~1993-12-16 14:36 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-12-01 10:24 ANDF - some information John Maccallum
1993-12-01 14:17 ` Rick Richardson
1993-12-02  7:22   ` Harro Kremer
1993-12-02 13:01     ` John Maccallum
1993-12-02 13:48     ` Donald Lewine
1993-12-02 15:49       ` Robert Dewar
1993-12-02 21:24         ` Simon Patience
1993-12-06  7:58           ` Dave Yost
1993-12-07 16:38             ` Stavros Macrakis
1993-12-07 22:24               ` Robert Dewar
1993-12-08  4:35                 ` Ed McClanahan
1993-12-08 10:15                   ` Richard Kenner
1993-12-08 15:47                 ` Piercarlo Grandi
1993-12-09  3:57                   ` Mark H. Johnson
1993-12-09  9:41                     ` Todd P. Whitesel
1993-12-09 14:23                       ` Robert Dewar
1993-12-09 16:09                         ` Thatcher Ulrich
1993-12-10 18:02                       ` Jan Vorbrueggen
1993-12-12 10:57                       ` Todd P. Whitesel
1993-12-13 15:09                         ` Bill Kindel
1993-12-16  5:20                       ` translation of x86 binary to native Dave Yost
1993-12-16 14:58                         ` yoder
1993-12-16 17:46                           ` Arthur Chance
1993-12-17 14:07                             ` yoder
1993-12-16 21:45                           ` Leo Broukhis
1993-12-16 16:59                         ` John R Levine
1993-12-09 17:11                     ` ANDF - some information Piercarlo Grandi
1993-12-08 16:03                 ` John R Levine
1993-12-08 23:24                   ` Robert Dewar
1993-12-09  8:41               ` Rick Richardson
1993-12-10 13:09                 ` Stefan Monnier
1993-12-10 14:08                   ` James Larus
1993-12-10 15:55                     ` Bruce Stephens
1993-12-10 20:08                   ` Hans Boehm
1993-12-12 19:38                     ` Lawrence G. Mayka
1993-12-13 20:01                       ` ANDF - some information (GC really) Hans Boehm
1993-12-11 16:44                   ` ANDF - some information Robert Dewar
1993-12-13 19:16                     ` Hans Boehm
1993-12-08 20:48             ` Matt Kennel
1993-12-09 12:24               ` Torben AEgidius Mogensen
1993-12-10  1:23                 ` Larry Meadows
1993-12-10 11:42                   ` Bruce Stephens
1993-12-08 11:23           ` Ronald F. Guilmette
1993-12-08 17:05             ` Simon Patience
1993-12-09 12:33               ` John Krueger
1993-12-08 10:56         ` ANDF - some (mis)information Ronald F. Guilmette
1993-12-08 19:43           ` Donald Lindsay
1993-12-09 19:20             ` Hans Boehm
1993-12-08 20:56           ` Steven Correll
1993-12-09  2:32             ` John R. Mashey
1993-12-10  2:43               ` Keith Smith
1993-12-10 16:23                 ` Torben AEgidius Mogensen
1993-12-10 20:20             ` peter da silva
1993-12-15 15:46               ` Mathew Lodge
1993-12-21 16:30                 ` <ui.h> wanted Jeff Wang
1993-12-14 19:30           ` ANDF - some (mis)information Matt Kennel
1993-12-14 20:11             ` Dave Griffith
1993-12-14 22:38               ` Hans Boehm
1993-12-15 12:10             ` Torben AEgidius Mogensen
1993-12-15 18:12               ` Hans Boehm
1993-12-16 14:36                 ` Michael Spertus [this message]
1993-12-21 23:46             ` Michael R Castle
1993-12-02 16:47       ` ANDF - some information Rodger Lea
1993-12-02 21:27         ` Simon Patience
1993-12-06  8:03 ` Dave Yost
1993-12-08 10:45 ` Ronald F. Guilmette
1993-12-10 16:49   ` peter da silva
1993-12-12  3:11     ` Dave Griffith
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox