RFR: 8164044: Generate corresponding simple DelegatingMethodHandles when generating a DirectMethodHandle

Claes Redestad claes.redestad at oracle.com
Wed Aug 17 21:33:22 UTC 2016


Hi,

please review this change which adds pre-generation of simple 
DelegatingMethodHandles corresponding to the DirectMethodHandles we 
already pre-generate during linking.

webrev: http://cr.openjdk.java.net/~redestad/8164044/webrev.02/
bug: https://bugs.openjdk.java.net/browse/JDK-8164044

This also includes some cleanup suggested by Vladimir during internal 
review, such as:

- adding an enum to control this behavior, which allows removing the 
special version of LF.compileToBytecode introduced by JDK-8163369
- refactored resolution of pregenerated code to the InvokerBytecodeGenerator
- removing reliance on the LF.debugName (which we have some loose ideas 
to remove from LF and tuck away in a map we only create and initialize 
when actually debugging).

This patch removes 11 out of the 39 classes generated on first use of 
the StringConcatFactory in a simple test, amounting to a ~10ms speedup 
on my machine.

Thanks!

/Claes


More information about the core-libs-dev mailing list