On Tue, 17 Mar 2026 00:36:42 GMT, Sandhya Viswanathan 
<[email protected]> wrote:

>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java 
>> line 2039:
>> 
>>> 2037:             break;
>>> 2038:         default:
>>> 2039:             throw wrongPartForSlice(part);
>> 
>> Did we "optimize away" the out of bounds check in this patch?
>> I think after this patch `wrongPartForSlice` is dead code.
>> I'm going to fix it with https://github.com/openjdk/jdk/pull/30113, and add 
>> some tests too.
>
> There is a call to Objects.checkIndex() in sliceTemplate() which does out of 
> bounds check (e.g. ByteVector.java).

I think you are referring to part number, thanks for taking care of that.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/3804#discussion_r2943803148

Reply via email to