Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Continuation-passing in C? Message-ID: <11566@dog.ee.lbl.gov> Date: 28 Mar 91 17:58:41 GMT References: <1991Mar28.070649.1667@visix.com> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 15 X-Local-Date: Thu, 28 Mar 91 09:58:42 PST In article <1991Mar28.070649.1667@visix.com> adam@visix.com writes: >How can I (efficiently) program in a continuation-passing style in C? > >This breaks down into two basic questions: > >(1) How do I explicitly jump across functions >(2) How do I keep things in registers across functions The answers are (1) use assembly language, and (2) use assembly language. If you want this level of control over the machine, C is not the place to look. Compilers capable of this sort of optimization are rare. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov