> Thanks for the pointer. > If I understand correctly, tailcall information will be emitted by the > compiler > for the sole purpose of being sure that HotSpot will actually perform the > optimization (and raise an exception if not). > > While ensuring that the optimization is actually performed is very important, > it seems to be a novelty in the JVM: to the best of my knowledge, there is no > other way to guarantee that any optimization will actually occur. > Is this correct ?
What I can say is just based from trying to follow the various discussions here. This "optimization" allows you to have repeated tail calls without blowing out your stack. Without this "optimization", you have a serious (and unpredictable) hard limit on how deep you can recurse. With the optimization, you don't (all else being equal). So the issue here is that language designers/implementors and programmers know they can use tail calls without running into a wall. This is different from other "optimizations" we usually talk about in the JVM. And it's not just HotSpot, though the current patch is a HotSpot patch. The idea would be to make the bytecode, and its interpretation, a standard feature of any compliant JVM. -- 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.
