Hi,

following-up on JDK-8141678[1]. So, it appears we want to avoid the fragility of keeping local copies of Byte/Short/Integer in Wrapper, and instead get the boxed zeroes lazily, when we actually need them.

It turns out simply fixing Wrapper.zero() would then regress things back a bit, since java.lang.invoke.LambdaForm itself eagerly generates a number of LambdaForms and NamedFunctions that touch a couple of Wrapper.zeros. By making the initialization of these lazy as well we not only avoid regression compared to JDK-8141678, but further remove another 9 LambdaForms from jigsaw startup (down from 74 to 65; down to 37 together with JDK-8142334[2]). An unneeded function (void zero_V) was removed in the process.

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

Thanks!

/Claes

[1] https://bugs.openjdk.java.net/browse/JDK-8141678
[2] https://bugs.openjdk.java.net/browse/JDK-8142334 - review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-November/036428.html

Reply via email to