On 6/12/05, Curtis Rawls <[EMAIL PROTECTED]> wrote: > > [snip] > It might also be helpful to take a look at other systems that also > implement continuations: > -Stackless Python (http://www.stackless.com/spcpaper.htm) > -Standard ML (http://www.smlnj.org/doc/features.html) > -Formalizing Implementation Strategies > (http://citeseer.ist.psu.edu/danvy00formalizing.html) > -Others (http://c2.com/cgi/wiki?ContinuationImplementation) > > -Curtis Rawls >
I found this link helpful when trying to understand continuations. The code they use is not secure. It is basically using buffer overflow attacks as a programming technique? Well, you'll have to read to understand what I mean. http://homepage.mac.com/sigfpe/Computing/continuations.html The part that I understand about continuations, is that they wreak havoc in the control flow graph, as Chip initially said: > Therefore, register allocation must allow for implicit flow of control > from *every* function call to *every* function return ... or, more > precisely, to where *every* continuation is taken, including function > return continuations. Although I think that is actually sugar coating it a bit. Continuations can be taken from within any sub, and possibly even when appending to a list, if you're using lazy list eval. This, I found out when my changes to reg_alloc.c broke the continuations tests. The changes were not the problem, as Leo confirmed, it was the way the allocator and the continuations interacted. There are also some issue about changing variables through continuations, like you can only change PMC integers, which point to some fixed location, containing the int, i.e. you can only use references. These parts make less sense to me, but the issue is basically, some registers are restored, and some are kept safe? Well, that issue hasn't been quite resolved either. If I thought the register allocator had a chance of working, I would probably find the time to start working on it again. But probably there are plenty of people who would be happy to do so, if this issue could be resolved. -- -Bill Coffman