On Wed, 18 Dec 2024 17:44:02 GMT, Paul Sandoz <[email protected]> wrote:
>> Hi,
>>
>> This patch adds the missing null checks to the shuffle arguments of the
>> various `rearrangeTemplate` method. For all other API points, we null check
>> arguments by calling `check` on them. As `rearrange` implementations cast
>> the argument to the concrete type, there is no need for species check, but
>> we still need the null check. This allows the intrinsics to know that the
>> argument is not `null`, as nullable argument makes the method
>> non-intrinsifiable.
>>
>> Please take a look, thanks a lot.
>
> Looks good, thanks for fixing.
>
> This is really a bug rather than an enhancement. In the package JavaDoc we
> state:
>> * For every class in this package,
>> * unless specified otherwise, any method arguments of reference
>> * type must not be null, and any null argument will elicit a
>> * {@code NullPointerException}. This fact is not individually
>> * documented for methods of this API.
>
> We should also backport to 24. From the main issue create a backport issue
> (from the `More` drop down menu). Then from the main PR type `/backport
> :jdk24`, that will create a PR for the `jdk24` branch from which i can review
> and then you can integrate.
@PaulSandoz Not really, nullable argument will inhibit intrinsification, and
the fall back implementation will throw `NullPointerException`. So the only
thing we miss here is the intrinsification of `VectorSupport::rearrange`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22816#issuecomment-2551932669