Related articles |
---|
Request for more info on trampolines holmer@rose.eecs.nwu.edu (1993-07-07) |
Re: Request for more info on trampolines eb@kaleida.com (1993-07-07) |
Re: Request for more info on trampolines max@nic.gac.edu (1993-07-08) |
Re: Request for more info on trampolines pardo@cs.washington.edu (1993-07-08) |
Re: Request for more info on trampolines eb@kaleida.com (1993-07-09) |
Re: Request for more info on trampolines pardo@cs.washington.edu (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 jfc@athena.mit.edu (1993-07-18) |
Newsgroups: | comp.compilers |
From: | max@nic.gac.edu (Max Hailperin) |
Keywords: | code, optimize |
Organization: | Gustavus Adolphus College, St. Peter, MN |
References: | 93-07-026 93-07-030 |
Date: | Thu, 8 Jul 1993 16:52:47 GMT |
eb@kaleida.com (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
comp.compilers page.
Search the
comp.compilers archives again.