Hi all,

I started implementing an invokedynamic port of Groovy, but I have two "complex" questions early on:

(1) Groovy method selection depends on runtime types. This seems to mean that I need a two step approach for my methods. On the first step I let the bootstrap return a method handle, that will do the method selection. In the second step I will replace the target in the call site, with the now selected method. The result is that only on the second invocation the real target method will be called directly and on the first invocation this will happen through the selector. Is that right? Does this also mean that if my target is for example Class.forName, that it may use a different class loader on the next invocation? (first time the one of the class containing my method selector method, second time the class doing the method call originally)

(2) for convenience I currently use MethodHandle#asType a lot... is that good practice or better to be avoided?

bye blackdrag

--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.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