From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b1f4420d01b2c4eb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!oleane.net!oleane!nerim.net!news.tiscali.fr!proxad.net!feeder1-2.proxad.net!cleanfeed4-b.proxad.net!nnrp15-2.free.fr!not-for-mail Return-Path: X-Virus-Scanned: amavisd-new at ada-france.org From: Duncan Sands To: comp.lang.ada@ada-france.org Subject: Re: LLVM--Low Level Virtual Machine--and Ada Date: Tue, 24 Jul 2007 21:36:10 +0200 User-Agent: KMail/1.9.7 References: <1184730995.862147.208590@g12g2000prg.googlegroups.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Randy Brukardt X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.9rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 24 Jul 2007 21:40:02 MEST NNTP-Posting-Host: 88.191.14.223 X-Trace: 1185306002 news-1.free.fr 22777 88.191.14.223:56655 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:1134 Date: 2007-07-24T21:40:02+02:00 Hi Randy, > > how do these thunks work? > > Generally, the compiler passes the address of the thunk to wherever it is > needed, and it is called indirectly. The thunks themselves adjust the > parameters as needed and call the real routine. presumably pointers to nested functions are "fat pointers" containing both the identity of the nested function (equivalently, the identity of a "thunk" that knows about the nested function) and also some kind of pointer into the stack of the parent of the nested function. Is that right? Thanks, Duncan.