Hi all,

since I am experimenting a bit with MethodHandles and invokedynamic these days on java7b125 I stumbled on some things...

(1) How does the signature of the bootstrap method has too look like?
So far I found (Class,String,MethodType):CallSite and (Lookup,String,MethodType):CallSite, that both work. But what I could not get working was a version that takes an Object[] for the presented arguments. Simply attaching an Object[] or Object... taking parameter in the signature above did not work. When looking at Remi's named argument example in http://weblogs.java.net/blog/forax/archive/2011/01/21/jsr-292-goodness-named-parameters then I see a bootstrap method that is not usable for me in java7b125.

(2) Since Linkage#registerBootstrapMethod should not be used anymore I am currently not fully sure as of how to replace it. The documentation says something but an annotation, which I cannot use, since I generate the class myself... it talks about marking the method... ok.. but how actually? From a users perspective I find there a lot of information that does help me. A simple example would be so much better. Is anyone able to give me one that then works for b125?

(3) MH#invokeExact as well as MH#invokeGeneric do cause trouble to me in java7b125. Maybe it is because the program that uses the handles is the eclipse compiler, but I was not aware that for these we have compiler magic on work. Anyway, what I get is the handle complaining about the Object[] produced to store the arguments of the invokeExact and invokeGeneric. The only version I could get to work in that setup is MH#withArguments. is that supposed to be like this?

Thanks for the help

bye Jochen

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead
http://blackdragsview.blogspot.com/
For Groovy programming sources visit http://groovy.codehaus.org

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