Trampolines are strange things... :-)

- Are nested functions part of the C standard or a GCC extension?
  I believe the answer is a GCC extension. I have seen evidence,
  but no proof to this effect.
- AFAICT, the cris target is saving the value of the
  static chain register in the trampoline. How can that work
  with recursive functions? Does the cris target PASS or FAIL
  gcc.dg/trampoline-1.c?
- Lately e.g. the AMD CPU has added support for making it impossible
  to execute code on the stack. The town isn't big enough for
  both stack based trampolines and stack code execution protection. 
  What happens now? 
- Are trampolines used for anything else but nested functions
  in C? I believe they are used by Ada.
- Many backends do not support trampolines. Are trampolines 
  something that is ultimately being added to the backends?
- Do (theoretical?) alternatives to trampolines exist? I.e. something
  that does not generate code runtime.

My personal uninformed opinion is that trampolines cause more trouble
than they are worth.


-- 
Øyvind Harboe
http://www.zylin.com

Reply via email to