New version of dynamic linker

Attila Szegedi szegedia at gmail.com
Thu Feb 10 19:17:35 PST 2011


Hi folks,

I just updated my dynamic linker framework to work with the latest API version of the java.dyn package. It is tested against Stephen Bannach's 2011-01-31 JDK, and the only test failures are due to known issues in the JDK itself (basically, problems with MethodHandle.asCollector() implementation). 

I also cleared up the build process; it no longer needs Ivy, and will download all dependencies (including the OpenJDK) itself into a private copy in its build directory.

It doesn't work with Rémi's backport at the moment, because the backport seems outdated (i.e it doesn't provide MethodHandle.asCollector and some others).

We also seem to have lost the ability to measure the code coverage of tests - I used EMMA, and that tool was last updated about five years ago, and it unfortunately corrupts Java 7 formatted classes. I'm not sure there's anything to do about that, unfortunately. Do you guys have a recommendation for a more up-to-date, preferrably open-source code coverage tool?

As for future plans, I have a roadmap here <https://github.com/szegedi/dynalink/wiki/Roadmap>. Basically, I now applied the minimal code changes required to work with the latest API. The next step is to actually take advantages of some API facilities that became available since last April, most notably the ClassValue. Once all that's done, it should be prepared for the package rename to java.lang.invoke, once that's ready.

I think it speaks to the strength of the library that I didn't have to change any single one of its public APIs - if you adopted it earlier, it shielded you from all of the moving ground that is java.dyn.* API. Well, except for the fact that Linkage went away and now you need to put bootstrap method specifications into every invokedynamic instruction you emit into your classfiles; there's no library-level help for that…

Code is here: <https://github.com/szegedi/dynalink>

Attila.


More information about the mlvm-dev mailing list