Ola,
  here are some of the papers i "refound":

http://citeseer.ist.psu.edu/schinz01tail.html
This gets into tail-call elimination using exceptions.  If you are
going to use the java stack then this will be necessary.

http://www.cs.brown.edu/~sk/Publications/Papers/Published/pcmkf-cont-from-gen-stack-insp/
Section 4.2 gets into implementing delimited continuations on msil
(not using any special instructions).  There is another paper that got
more into Administrative Normal Form and using exceptions to capture
the current continuation but I can't find it anywhere.

http://citeseer.ist.psu.edu/flanagan-essence.html
Paper on compiling with continuations.  Defines ANF and there is some
scheme code at the end for performing the transformation.

The last two have a lot of proofs etc... and are a little dense but
the example code is useful.

Kelly

On Dec 29, 2007 4:55 PM, Ola Bini <[EMAIL PROTECTED]> wrote:
>
> Kelly Nawrocke wrote:
> > Ola,
> >   I had some papers on A-Normal form and trampolining on the JVM (to
> > allow for proper tail call optimization for scheme and ml impls though
> > accessing the current continuation in the user code is possible) but
> > they seem to be lost.  The one paper compared using return sleds
> > (special Class instance that would be returned to the trampoline loop
> > capturing the frames all the way down) and exceptions (similar to the
> > return sled except used try/catch blocks instead).  They found that
> > returning to the trampoline loop every N frames (~40 was optimal at
> > the time) was the most efficient.  The code needed to be transformed
> > into A-Normal form to allow for proper capture of the current
> > continuation (what would be passed to the trampoline loop to unwind
> > the stack).  I am going to keep on searching for them and will post
> > the links on this thread.
> >
> > Kelly
> >
> Thank you! That would be very helpful. Since the current approach needs
> some careful transformation too, transforming to A-Normal shouldn't be
> much harder. I've considering using versions of trampolining too, of
> course.
>
>
> Cheers
>
> --
>  Ola Bini (http://ola-bini.blogspot.com)
>  JRuby Core Developer
>  Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
>  Practical JRuby on Rails (http://apress.com/book/view/9781590598818)
>
>  "Yields falsehood when quined" yields falsehood when quined.
>
>
>
> >
>



-- 
Like the fella says, in Italy for 30 years under the Borgias they had
warfare, terror, murder, and bloodshed, but they produced
Michelangelo, Leonardo da Vinci, and the Renaissance. In Switzerland
they had brotherly love - they had 500 years of democracy and peace,
and what did that produce? The cuckoo clock.
-- Orson Welles

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to