cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: FYI: Using Java to define Cocoon Flow
Date Fri, 16 May 2003 09:53:18 GMT
Actually, it's very easy if the scripting language doesn't rely on the 
Java call stack to implement function calls. Instead, it must create its 
own call-frames and push them on its own stack. The continuation of the 
current function invocation is simply the stack itself. To instantate a 
continuation object, you  make a copy of the stack and store it in the 
continuation object. To implement tail-call elimination, you overwrite 
the call-frame at the top of the stack with the tail function 
invocation. To implement continuations, you replace the _entire_ stack 
with the one stored in the continuation. Other than optimizing the 
stack-copying, that's it.


Nicola Ken Barozzi wrote:

>
> Christopher Oliver wrote, On 16/05/2003 11.30:
> ...
>
>> I don't have an interest in modifying BeanShell, but if you do I can 
>> point you in the right direction.
>
>
> I'm interested in hearing your say about how to add continuations to a 
> scripting language...
>



Mime
View raw message