[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2000-12-08 (08:55) |
From: | STARYNKEVITCH Basile <Basile.Starynkevitch@c...> |
Subject: | callcc/cps-style programming |
>>>>> "Joe" == Joe Lisp <joelisp@yahoo.com> writes: Joe> Is anyone working on callcc for OCaml? I am not working on it (although I would like to...) However, adding explicit continuations to Ocaml is an important task: the naive approach -a la Appel 1989, like SML/NJ0.93- would be to reify all continuations, ie to replace call frames by explicit continuation closures. This means drastically changing both the runtime (garbage collector) and the compiler system. Also, this would slow down every OCaml application (probably by at least 10%) - but call/cc would be rather fast (since in constant time) another approach is to segment the call stack, and to copy the call stack on each call/cc. This also require a GC change and probably some (easier) compiler change. However, each call/cc would take a time proportional to the call stack depth (which is copied). Calling a continuation obtained by call/cc would also require copying a stack segment. What I am missing more is the ability to dynamically load some compiled functions (at least the Dynlink package implemented in the native code ocamlopt, with ability to dynamically load native machine code generated by ocamlopt; ideally I would even like to generate garbage collected code on the fly and be able to call and marshall it) Regards. N.B. Any opinions expressed here are only mine, and not of my organization. N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA. --------------------------------------------------------------------- Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique DTA/LETI/DEIN/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX * France phone: 1,69.08.60.55; fax: 1.69.08.83.95 home: 1,46.65.45.53 email: Basile point Starynkevitch at cea point fr web perso: http://perso.wanadoo.fr/starynkevitch/basile/