Hi all, now that Clojure is compatible with java 8, it can use invokedynamic where it makes sense, i.e. when the compiler has no information to generate directly the call in bytecode, instead of using the reflection API.
In fact, it's a little more complex than that, - you can not fully replace all calls to the reflective API to use invokedynamic instead, because you have restriction on the methods you can call (you can not call a method annotated with @CallerSensitive for security reason) and - using the method handle API doesn't necessary means that the calls will be faster than using the reflection API if the JIT is not able to inline the calls. So the idea of the patch is to always generate invokedynamic at compile time but at runtime to use the methodhandle API if there is a good chance that the call will be inlined and fallback to call the Reflector API otherwise. Obviously, i've not read how to contribute before writing the patch, so the patch is currently available on github https://github.com/clojure/clojure/pull/85 So now that i've read how to contribute, i think the first question to ask is: does it make sense to allow the Clojure to use invokedynamic ? regards, Rémi -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/8bcc5167-0978-422c-8b50-fa51c1d027b4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.