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: | eb@kaleida.com (Eric Benson) |
Keywords: | code, optimize, architecture, comment |
Organization: | Kaleida Labs, Inc., Mountain View, CA |
References: | 93-07-026 93-07-035 |
Date: | Fri, 9 Jul 1993 17:41:35 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.
max@nic.gac.edu (Max Hailperin) writes:
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 [becase in many cases
you can optimize away the state pointer and only need the trampoline for
the routines where you can't].
Yes, it's almost certainly true that most functions in most applications
do not have state. The major problem arises on machines with instruction
caches, or worse, those with separate instruction and data spaces. It can
be catastrophically expensive to create a trampoline on such systems.
Eric Benson
Kaleida Labs, Inc.
eb@kaleida.com
[The paper mentioned in article 93-07-037 suggests a way to handle runtime
trampolines on such systems. Basically you have a a stack of statically
created trampoline routines each of which indirects through values in an
entry in a parallel stack of data pointers which can be patched at runtime.
-John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.