[Sablevm-user] About closures...
Brought to you by:
egagnon
From: Etienne M. G. <eg...@j-...> - 2000-07-17 21:52:40
|
Hi Brent. If memory serves me right, in fact what you want is to be able to "save" a snapshot of the stack, then, at a later time, be able to resume computation starting with this snapshot. Do you really need to open the access to the internal VM representation to implement this? I mean: would simply providing two new bytecodes, say NewClosure/UseClosure, be enough? As I said before, I am not very knowledgeable about FP runtime systems. e.g. I do not know tha answer to questions like: Does the closure only include the current thread's stack, or does it need a full copy of the overall VM state? How do you resume a closure: on a new thread? If not, what happens with the current stack? etc. I think that, in general, providing new bytecodes, for extended functionality, is better than opening up the internal state, in that it helps shielding away applications from any specific VM implementation. Just some thoughts;-) Etienne -- ---------------------------------------------------------------------- Etienne M. Gagnon, M.Sc. e-mail: eg...@j-... Author of SableVM: http://www.sablevm.org/ ---------------------------------------------------------------------- |