refactoring BMH

John Rose john.r.rose at oracle.com
Tue Jul 18 02:12:27 UTC 2017


I have felt for some time that the BoundMethodHandle code
is not easy to work with, and I have wanted to refactor it
for a long time to separate out the specialization logic
from the BMH logic proper.

Here is an experimental refactoring that accomplishes this:

https://bugs.openjdk.java.net/browse/JDK-8184777
http://cr.openjdk.java.net/~jrose/jdk/8184777/webrev.0

I'd like to commit it to JDK10 first as a cleanup,
but the motivation for it comes from Valhalla and Amber.

If you work on java.lang.invoke code, please take a look
and tell me what you think.

Caveat:  It basically passes smoke tests only, but it
does pass its own regression test (which builds a toy
specialization schema, including nominal types the
could be replaced by value types).

— John


More information about the valhalla-dev mailing list