[vector] RFR (M): Ensure intrinsics are parameterized with non-capturing lambdas

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Feb 21 01:26:48 UTC 2019


Thanks, John.

It turned out to be surprisingly easy to capture something from the 
context :-) So, after a couple of such surprises I decided to automate it.

Maybe with the arrival of java compiler intrinsics [1], there'll be a 
way to express that constraint in a more disciplined manner.

Best regards,
Vladimir Ivanov

[1] https://openjdk.java.net/jeps/348

On 20/02/2019 15:13, John Rose wrote:
> Reviewed, with pleasure.
> 
> "Save months of performance debugging with this one weird trick!"
> 
> — John
> 
> On Feb 20, 2019, at 2:32 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>>
>> http://cr.openjdk.java.net/~vlivanov/panama/vector/intrin.non_capturing/webrev.00/
>>
>> Default implementations are implemented as lambdas and capturing introduces problems for EA and even if intrinsification happens may leave unused objects behind.
>>
>> The patch:
>>
>> * introduces an adhoc check (VectorIntrinsics.isNonCapturingLambda()) and asserts all default implementations satisfy it;
>>
>> * instruments existing tests to run with assertions enabled;
>>
>> * fixes all occurrences of capturing lambdas in the code (so test results are clean).
>>
>> Best regards,
>> Vladimir Ivanov
> 


More information about the panama-dev mailing list