JDK-8274028 : Integration of JEP 417: Vector API (Third Incubator)
  • Type: CSR
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 18
  • Submitted: 2021-09-20
  • Updated: 2021-11-11
  • Resolved: 2021-11-11
Related Reports
CSR :  
Description
Summary and Problem
-------

The method `jdk.incubator.vector.VectorMask.laneIsSet` does not specify that an exception is thrown if the given lane index is out of bounds.

Solution
--------

Update `VectorMask.laneIsSet` to specify `IndexOutOfBoundsException` is thrown if a given lane index is out of bounds.

Specification
-------------

`VectorMask.laneIsSet` is updated to:

    /**
     * Tests if the lane at index {@code i} is set
     * @param i the lane index
     *
     * @return true if the lane at index {@code i} is set, otherwise false
     * @throws IndexOutOfBoundsException if the index is out of range
     * ({@code < 0 || >= length()})
     */
    public abstract boolean laneIsSet(int i);

The changes are:

          * @param i the lane index
          *
          * @return true if the lane at index {@code i} is set, otherwise false
    +     * @throws IndexOutOfBoundsException if the index is out of range
    +     * ({@code < 0 || >= length()})
          */
         public abstract boolean laneIsSet(int i);


Comments
Moving the point update in this CSR to Approved, reserving the right to send additional comments on the overall API later.
11-11-2021

Ok, that's the only change so far. Nothing else has changed from second incubation. For any other changes that might arise, e.g. new API points or other fixes we opportunistically identify, my plan was to file separate CSRs to keep focused and make it easier to review. Hence, I think the JDK 17 Java doc will suffice right now for an API sweep: https://docs.oracle.com/en/java/javase/17/docs/api/jdk.incubator.vector/jdk/incubator/vector/package-summary.html
04-10-2021

Moving to Provisional, not Approved. I'd like to take another pass of the whole API for the third incubation.
04-10-2021

There is a small typo ("is is") in the following line: @throws IndexOutOfBoundsException if the index is is out of range
30-09-2021