home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1762 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
  3. From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
  4. Subject: Nested functions and trampolines
  5. Message-ID: <9234805.9274@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. 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>
  9. Date: Sat, 12 Dec 1992 18:12:29 GMT
  10. Lines: 25
  11.  
  12. ark@alice.att.com (Andrew Koenig) writes:
  13.  
  14. >jimad@microsoft.com (Jim Adcock) writes:
  15. >
  16. >> So that taking the address of a nested function in different scopes
  17. >> causes differing trampolines to be created, and differing pointers returned?
  18.  
  19. Yes.
  20.  
  21. >It shouldn't need to do that.  At most one trampoline is ever necessary
  22. >for a given nested function during its lifetime, namely the one that
  23. >binds the lexically surrounding context that was current when the
  24. >block containing the definition of that function was entered.
  25.  
  26. But that block may be entered multiple times, recursively, in which case
  27. you need more than one trampoline for a single nested function.
  28.  
  29. (Jim's article still hasn't arrived here yet, so perhaps I am missing some
  30. important context?)
  31.  
  32. -- 
  33. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  34. This .signature virus is a self-referential statement that is true - but 
  35. you will only be able to consistently believe it if you copy it to your own
  36. .signature file!
  37.