RFR: 8377438: [VectorAPI] Add new carrier type to LaneType class [v2]

Jatin Bhateja jbhateja at openjdk.org
Tue Feb 24 05:06:16 UTC 2026


On Tue, 24 Feb 2026 01:09:43 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>> 
>>  - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8377438
>>  - 8377438: [VectorAPI] Add new carrier type to LaneType class
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LaneType.java line 70:
> 
>> 68:         this.typeChar = genericElementType.getSimpleName().charAt(0);
>> 69:         this.carrierType = carrierType;
>> 70:         assert("FDBSIL".indexOf(typeChar) == ordinal()) : this;
> 
> Can you move this assert statement to be directly after where `typeChar` is assigned? Then after the assignment of `carrierType` you can `assert(carrierType.isPrimitive())`, which while not full-proof does express the intent.

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29629#discussion_r2844518113


More information about the core-libs-dev mailing list