RFR (S): [MVT] Support lambda form customization in LambdaFormBuilder
vladimir.x.ivanov at oracle.com
Wed Jul 19 18:40:12 UTC 2017
On 7/19/17 9:05 PM, Maurizio Cimadamore wrote:
> Is there any value in having the 'assert', given that the method
> 'checkActualReceiver' always returns true? Taking thing further - do you
checkActualReceiver() inserts a check on bytecode into compiled lambda.
It is deliberately guarded by an assert to generate that only in testing
> need a method at all? Do you expect this to be used in other places?
No, it's not required and shouldn't be used anywhere else. But it's
easier to guard the check using assert than Class.desiredAssertionStatus().
> On 19/07/17 18:40, Vladimir Ivanov wrote:
>> Implement lambda form customization in LambdaFormBuilder. (Duplicated
>> logic from InvokerBytecodeGenerator.)
>> LF customization is crucial for performant MH.invoke() and
>> MH.invokeExact() on non-constant method handles. It enables
>> JIT-compilers to generate a single nmethod for the whole method handle
>> Otherwise, the method handle chain scatters into numerous nmethods
>> (one for each method handle) which severely affects performance
>> (especially for MVT where Q-typed lambda forms can't be compiled as a
>> Testing: jdk/test/valhalla/mvt/
>> Best regards,
>> Vladimir Ivanov
More information about the valhalla-dev