Posts Tagged ‘jvm’
The JSR 292 — invokedynamic
Written by Jevgeni Kabanov on May 20, 2008 – 8:21 amI read through the first draft of JSR 292 this morning and had several questions that I’m not 100% sure the current specification addresses:
- Can I rebind the
CallSiteafter I have set theMethodHandle? - Can I keep a reference to
CallSites at all? - Is the
setMethodHanldemethod implied to be thread-safe?
The reason I’m asking is that the only way to rebind a method as seen in spec is lazily, by invalidating all the call sites in the class (or everywhere) and rebinding methods when called. It may sometimes be necessary or easier to do that eagerly and it looks like the current API does allow that. It should either be forbidden explicitly or allowed explicitly.
I’ll send a link to the JSR-292-COMMENTS list as well, but perhaps someone knows the answer already?
Tags: java, jvm
Posted in cool | 3 Comments »