Skip to main content

invokedynamic now lives in JDK7

Posted by forax on April 25, 2009 at 7:11 AM PDT

invokedynamic (at least the main parts) now lives in JDK 7 !

You haven't perhaps notice it but John pushes the first patches from the Da Vinci Machine project to the hotspot workspace.

Method Handle support (meth):
Invokedynamic support (indy):


For early adopters, on Linux you can build the source of the VM by cloning the hotspot workspace, on MacOs X (Intel CPU), Atilla Szegedi gently provides an already built binary.

Related Topics >>


I wonder if MethodHandle Dynamic and all other related java classes will be included into jdk 7. Because what is added under provided by you links is a vm suport for these features.

@4bugzilla, you're right the API isn't currently integrated because it isn't already freezed. If you are curious, the MethodHandle part of the doc is available here : Just remember that this is a work in progress API :) Rémi

@forax Actually at you can see only -- VM support for non-Java languages (InvokeDynamic) -- VM support does not mean that there would be a pubic java api for this. As you can see at there is proposal to include necessary java classes but there is no any concrete plans yet.

@4bugzilla, it will. see @opinali, I have already a patch for speedup reflection (bug 6824466) but it's based on part of the JSR292 API that aren't already implemented. I don't see how to change dynamic proxies generation without modifying its API but it will benefit from reflection speedup. About the bug category, yes it's wrong it's an umbrella bug, thus not only related to c2. By the way, I am a static-typing bigot but I am pragmatic too :)

Oh, never mind, I hadn't clicked the very first link of the post :)

By which java api is this exposed? (or there is none yet?)

Great news. I'm not a dynamic language user myself, but the new runtime support can only make Java better. I suppose invokedynamic and method handles can also be used for more mundane Java programs and APIs, e.g. to optimize dynamic proxies and reflection in general. Don't leave us static-typing bigots out of the party. ;-) I noticed that JDK 7 build 56 fixes bug 6655638: dynamic languages need method handles, related to the first patch. The bugtrack mentions HotSpot Server only (compiler2), is this wrong?