By john.rose on Apr 04, 2011
java.lang.invoke. Up until recently, the package has been
java.dyn, but we changed the name just before the JSR 292 Public Review.
To minimize test failures, we are using a multi-phase process for the API changes:
b130: 7017414 in langtools: Release javac which supports both
java.lang.invoke. This allows us to compile either version of JDK code for JSR 292.
b135: 6839872, 7012648 in JVM: Release JVM which supports both
java.lang.invoke. This allows us to run either version of JDK code for JSR 292.
b136: 6839872, 7012648 in JDK: Release JDK which supports only
java.lang.invoke. This is the JDK code for JSR 292. Here is a preview from mlvm.
- b137 (approx): 6817525 in JVM: Turn on JSR 292 functionality by default. This will allow the JVM to support JSR 292 “out of the box.”
b137 (approx): 6981791 in JVM: Release cleaned-up JVM, purging all
java.dynreferences. Will also include rename support for
b137 (approx): 7028405 in langtools: Release cleaned-up javac, purging all
As the API slowly adjusts under the Public Review, there will be a few additional changes. Here are the ones which are planned or at least under consideration:
MethodHandle.invoke(the EG has decided on this one)
rename or remove the wrapper method
MethodHandles.asInstance(possible rename is
Possible finality of some classes and methods (to inhibit subclassing and overrides). Might affect
ConstantCallSite, other call sites,
ConstantCallSitesubclasses to self-bind (i.e., construct with an implicit
Add non-varargs overloadings to some varargs methods (for efficiency on simple systems). (Could affect
There have been very good discussions about JSR 292 on the mlvm-dev and jvm-languages mailing lists, as well as numerous comments from other sources. Since the Public Review, I have updated the working draft in the OpenJDK sources. You can see the current javadoc for JSR 292 via the JDK 7 download page. Here are the components to the JDK7 documentation:
http://download.java.net/jdk7/docs/api/java/lang/invoke/package-summary.html — the
http://download.java.net/jdk7/docs/api/java/lang/ClassValue.html — the
ClassValueclass (a distant cousin to
http://download.java.net/jdk7/docs/api/java/lang/BootstrapMethodError.html — the
- http://download.java.net/jdk7/docs/technotes/guides/vm/multiple-language-support.html — a simple introduction to the JSR 292 API
We will continue to update the documentation during and shortly after the Public Review period. Please continue to experiment with the APIs and to share your experiences.
(Note to JDK7 port users: The link to the preview JAR for b136, in the first list above, allows you to run the current JSR 292 under the b135 JVM. This is a spin from the mlvm patch repository of just the JSR 292 classes. If you put it on your boot class path on a b135 JVM, and if you are daring and lucky, you can preview the b136 functionality. This may be useful if you have a b135-level JVM in one of the porting projects, such as the BSD port.)