RFR: 8142334: Improve lazy initialization of java.lang.invoke

Claes Redestad claes.redestad at oracle.com
Thu Nov 12 19:11:10 UTC 2015

On 2015-11-12 19:53, Peter Levart wrote:
>> Do you think this would work correctly w.r.t visibility:
>>         FUNCTIONS[idx] = function;
>>         function.resolve();
>>         UNSAFE.storeFence();
> This does not do anything useful.
> What happens if you simply omit function.resolve() call. If lazy 
> resolving works and tests pass, then perhaps it's all ok.
> Peter

Actually, I simply tried backing out the DirectMethodHandle changes 
entirely, and measured how much we'd lose by leaving that particular 
case alone: almost nothing, as it turns out (same number of LFs are 
generated etc). I think the safest option is to leave DirectMethodHandle 



More information about the core-libs-dev mailing list