On Wednesday 23 April 2008 14:59:13 Steven Shaw wrote:
> Aren't you guys ignoring the case where the StopIteration exception is
> thrown by a method called in a loop. It may not be possible to inline
> it. I imagine that JVM cannot optimise that to a goto and CLR's
> tailcalls cannot help in that case...

Actually that is exactly a case handled by tail calls: the method is 
parameterized over the continuations that it will call. This is very common 
in functional programming and is called continuation passing style (CPS). 
Some functional compilers (e.g. SML/NJ) automatically do this to all code.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e

--~--~---------~--~----~------------~-------~--~----~
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