Continuations, here I come
Emmanuel Castro
emmanuel.castro at laposte.net
Sat Aug 8 14:49:45 PDT 2009
I am currently working on an interpreter for a functional toy language. When
the evaluation of an argument is suspended (using a continuation), the
execution is resumed to the next argument, and so on. (A toy prototype will
be available before Autumn)
In my case, it is not realistic to create a DelimitedRunnable for each
function application because most of the time it the continuation is not
needed.
I note the following. It might be a good idea to have two methods to make
delimited continuations:
- One when the capturing of the delimited continuation is most likely,
using something like DelimitedRunnable;
- One when the capturing of the delimited continuation is exceptional,
with something like diff-ing two continuations.
2009/7/31 Lukas Stadler <lukas.stadler at jku.at>
> For performance reasons there is one restriction: The delimited
> continuation should not be cut within a stackframe. This might not seem
> like a problem but remember that inline can collapse multiple java
> stackframes into a single native one.
>
Isn't it possible to deoptimize the inlined stackframes? I've often heard
about Deoptimization, especially in work about Tail Call Optimization by
Arnold Schwaighofer.
I understand that deoptimization can be expensive, but in the second case -
when capturing is exceptional - I think it's worth it.
- Emmanuel Castro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20090808/37518764/attachment.html
More information about the mlvm-dev
mailing list