Topic: Nested functions and trampolines
Author: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Date: Sat, 12 Dec 1992 18:12:29 GMT Raw View
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!
Author: ark@alice.att.com (Andrew Koenig)
Date: 12 Dec 92 19:57:31 GMT Raw View
In article <9234805.9274@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
> But that block may be entered multiple times, recursively, in which case
> you need more than one trampoline for a single nested function.
But each function binds a different context, so it should be
considered a different function anyway -- just like local variables.
--
--Andrew Koenig
ark@europa.att.com