🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1219

Nested functions and trampolines

#1219
From: Fergus James HENDERSON
Date: Sat, 12 Dec 1992 18:12
25 lines
1567 bytes
ark@alice.att.com (Andrew Koenig) writes:

>jimad@microsoft.com (Jim Adcock) writes:
>
>> So that taking the address of a nested function in different scopes
>> causes differing trampolines to be created, and differing pointers returned?

Yes.

>It shouldn't need to do that.  At most one trampoline is ever necessary
>for a given nested function during its lifetime, namely the one that
>binds the lexically surrounding context that was current when the
>block containing the definition of that function was entered.

But that block may be entered multiple times, recursively, in which case
you need more than one trampoline for a single nested function.

(Jim's article still hasn't arrived here yet, so perhaps I am missing some
important context?)

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Technical Details
Message-ID: <9234805.9274@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
References: <9234423.15066@mulga.cs.mu.OZ.AU> <1992Dec10.121200.18889@ucc.su.OZ.AU> <9234601.10277@mulga.cs.mu.OZ.AU> <1992Dec11.231131.10956@microsoft.com> <24392@alice.att.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Nested functions and trampolines
Message-ID: <9234805.9274@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <9234423.15066@mulga.cs.mu.OZ.AU> <1992Dec10.121200.18889@ucc.su.OZ.AU> <9234601.10277@mulga.cs.mu.OZ.AU> <1992Dec11.231131.10956@microsoft.com> <24392@alice.att.com>
Date: Sat, 12 Dec 1992 18:12:29 GMT
Lines: 25