|Compiling with Continuations/Andrew Appel firstname.lastname@example.org (1992-01-23)|
|Re: Compiling with Continuations/Andrew Appel email@example.com (1992-01-27)|
|Re: Compiling with Continuations/Andrew Appel firstname.lastname@example.org (1992-01-27)|
|Re: Compiling with Continuations/Andrew Appel email@example.com (1992-01-27)|
|Re: Compiling with Continuations/Andrew Appel firstname.lastname@example.org (Vincent Delacour) (1992-01-28)|
|Re: Compiling with Continuations/Andrew Appel email@example.com (1992-01-29)|
|Re: Compiling with Continuations/Andrew Appel firstname.lastname@example.org (1992-01-29)|
|Re: Compiling with Continuations/Andrew Appel email@example.com (1992-01-29)|
|Re: Compiling with Continuations/Andrew Appel firstname.lastname@example.org (1992-01-30)|
|From:||email@example.com (Norman Adams)|
|Keywords:||books, ML, storage|
|Date:||Mon, 27 Jan 1992 15:48:46 PST|
> Compiling with Continuations
> Andrew Appel
> Cambridge University Press 1992
> ISBN 0-521-41695-7
firstname.lastname@example.org (Jonathan Eifrig) responds:
> There are good reasons why the methods described may not be a good
> model of compilation for all languages. The continuation-style
> method basically converts the source language into executable code
> for a machine model _with_a_heap_. While this is OK if the
> language you are compiling will need a heap anyways (such as Lisp
> or ML, or any other language where functions are first-class
> objects), it may not be appropriate for simpler languages, like C
> or Algol, for which a simple run-time stack is sufficient.
A GC'd heap is not a requirement for a language implemention where the
compiler uses continations as the intermediate representation.
See "Compilation by Program Transformation" by Richard Kelsey (his PhD
thesis -- YALEU/CDD/RR #702, May 1989 ). He presents a `continuation
passing' compiler with Pascal, Basic, and Scheme front-ends.
If you language includes first class procedures, or if you decide to
represent your control stack with closures (as I believe SML of NJ does),
then you need a heap.
Even when a language needs a heap, the compiler can chose a runtime stack
as the appropriate represention for continuations. The T compiler does
this. A little bit of information on the T compiler is available in
"Orbit: An Optimizing Compiler for Scheme" by David Kranz et al, in
Proceedings of the SIGPLAN '86 Symposium on Compiler Construction. pp
219-233. Published as SIGPLAN Notices 21(7), July 1986.
There is more in Kranz's thesis, a Yale CS tech report --
YALEU/DCS/RR-632, Feb 1988. (Though, I have had no luck in getting tech
reports from Yale.)
Return to the
Search the comp.compilers archives again.