I just started looking into this myself, so I may be off-base, but it seems the 
difficulty is that at compile time, your optimization options are limited when 
it comes to non-final classes and jumps to functions other than itself.  Word 
on the street has it, JVM has a much better shot at collapsing calls like that 
at runtime.

 Alexey
2001 Honda CBR600F4i (CCS)
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net





________________________________
From: Joshua Marinacci <jos...@gmail.com>
To: javaposse@googlegroups.com
Sent: Wednesday, June 17, 2009 12:23:34 PM
Subject: [The Java Posse] Re: 'Posse BoF 2009 -- the video

okay. so this roughly corresponds with my dim memories. It's a way of doing 
deep recursive calls without having to fill up your stack five billion levels.  
So... back to the big question. If the JVM is essentially an 8bit stack based 
CPU with dynamic optimizations underneath, why can't you do a straight jump 
call, even if Java-the-language doesn't support this?

- Josh



On Jun 17, 2009, at 12:29 AM, Viktor Klang wrote:


>
>
>On Wed, Jun 17, 2009 at 9:22 AM, Joshua Marinacci <jos...@gmail.com> wrote:
>
>
>>>No Josh, not tail recursion, ->tail calls<- :)
>>>
>>
>>
>>then I guess I don't understand. My last interaction with this stuff was a 
>>LISP class about 15 years ago. :)
>
>:)
>
>"Tail-call optimization (or tail-call merging or tail-call elimination) is a 
>generalization of TailRecursion: If the last thing a routine does before it 
>returns is call another routine, rather than doing a jump-and-add-stack-frame 
>immediately followed by a pop-stack-frame-and-return-to-caller, it should be 
>safe to simply jumpto the start of the second routine, letting it re-use the 
>first routine's stack frame (environment)." 
>-http://c2.com/cgi/wiki?TailCallOptimization
>
> Here's a lispy source to get the memory flowing back :) => 
> http://www.lispworks.com/documentation/lcl50/aug/aug-51.html
>
>
>>
>>
>
>
>-- 
>Viktor Klang
>Scala Loudmouth
>
>
>



      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to