John Rose schrieb:
> On Sep 9, 2008, at 12:32 PM, Jochen Theodorou wrote:
> 
>> I wonder how invokedynamic would behave here... does invokedynamic add 
>>
>> stack frames? if not, then there is a chance that Class.forName would 
>>
>> work again. If its adding stack frames, then I see no chance.
> 
> Invokedynamic does not visibly add stack frames for linked calls, but 
> when a call is not linked it redirects to the bootstrap method, which 
> therefore appears on the stack.

right... forgot about that... too bad, because of course it is not 
linked the first time and then it fails and is not called again.

> What you want to fix that is an explicit (guaranteed) tailcall.

the call to Class.forName is not a tailcall if I see it right... support 
layer that is calling Class.forName is of course also doing a tailcall.. 
So this would help if VM would remove all the stack frames for the tail 
calls here. hmm... interesting... but tailcall optimizations are not yet 
part of invokedynamic, are they?

bye Jochen

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
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