Article View: comp.std.c
Article #4117Re: Nested functions (was: Re: GOTO single exit point)
From: Wil Evers
Date: Tue, 26 Sep 1995 11:26
Date: Tue, 26 Sep 1995 11:26
30 lines
1551 bytes
1551 bytes
In article <KANZE.95Sep25162631@slsvhdt.lts.sel.alcatel.de> kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) writes: [Discussion over the pros, cons and howtos of nested functions accessing the local variables of enclosing functions...] > For the rest: I disagree with the term > ``different execution models''. The compiler must, however generate > different code; I presume that this is what you are talking about. Yes. I wasn't aware `execution model' had another, more formal, meaning. I'm sorry. [snip] > I believe that trampolines have also been used to overcome this > problem. When the address of a nested function is taken, a small > initialization program is generated on the fly, to set up the extra > pointers, and then jump to the actual function. The pointer to > function points to this program. Now you've gotten me curious. I thought the extra information passed to the called function depended on the nesting level at the point from which it is called, not on the nesting level at the point where its address is taken. If that's true, then how can the trampoline set up this information? [snip] - Wil
Technical Details
Message-ID:
<1995Sep26.112649.1576@ittpub>Path:
arc1-ca.pugleaf.net!news.nic.surfnet.nl!sun4nl!ittpub!ittpub!nntpReferences:
<KANZE.95Sep25162631@slsvhdt.lts.sel.alcatel.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.nic.surfnet.nl!sun4nl!ittpub!ittpub!nntp Newsgroups: comp.std.c Subject: Re: Nested functions (was: Re: GOTO single exit point) Message-ID: <1995Sep26.112649.1576@ittpub> From: wil@ittpub.nl (Wil Evers) Date: 26 Sep 95 11:26:49 WET References: <KANZE.95Sep25162631@slsvhdt.lts.sel.alcatel.de> Distribution: world Nntp-Posting-Host: beelzebub