|Request for more info on trampolines firstname.lastname@example.org (1993-07-07)|
|Re: Request for more info on trampolines email@example.com (1993-07-07)|
|Re: Request for more info on trampolines firstname.lastname@example.org (1993-07-08)|
|Re: Request for more info on trampolines email@example.com (1993-07-08)|
|Re: Request for more info on trampolines firstname.lastname@example.org (1993-07-09)|
|Re: Request for more info on trampolines email@example.com (1993-07-10)|
|Re: Request for more info on trampolines chased@rbbb.Eng.Sun.COM (1993-07-16)|
|Re: Request for more info on trampolines firstname.lastname@example.org (1993-07-18)|
|From:||email@example.com (Max Hailperin)|
|Organization:||Gustavus Adolphus College, St. Peter, MN|
|Date:||Thu, 8 Jul 1993 16:52:47 GMT|
firstname.lastname@example.org (Eric Benson) writes:
[discussion of trampolines] ...
Non-C-based systems, e.g. those whose standard system programming language
is something more Pascal-like, often represent function parameters as two
words, a pointer to code and a pointer to "state", the latter of which
could be used for a display. It is of course much easier to represent a
function without state as one with state than the other way around!
One additional point is that even in some systems where procedures are in
general closures and which needn't stay compatable with C calling
conventions, it is still advantageous to use the trampoline representation
rather than the pair of pointers representation. This happens because
empirical analysis shows that many procedures in langauges with closures
in fact don't have any free non-global variables -- that is, the only
variables they use are from the innermost and outermost scopes. Since
global variables can be handled specially, these procedures don't actually
need a closure at all -- they can be treated just like normal C
procedures. If these procedures dominate, then performance is improved by
tailering the representation to them and using trampolines for the rare
procedures that actually need access to intermediate scopes.
Return to the
Search the comp.compilers archives again.