< prev index next >
test/jdk/valhalla/valuetypes/ValueArray.java
Print this page
rev 55117 : 8223350: [lworld] Use inline classes instead of value classes
*** 21,31 ****
* questions.
*/
/*
* @test
! * @summary Basic test for Array::get, Array::set, Arrays::setAll on value array
* @compile -XDallowWithFieldOperator Point.java NonFlattenValue.java
* @compile -XDallowWithFieldOperator ValueArray.java
* @run testng/othervm -XX:+EnableValhalla -XX:ValueArrayElemMaxFlatSize=-1 ValueArray
* @run testng/othervm -XX:+EnableValhalla -XX:ValueArrayElemMaxFlatSize=0 ValueArray
*/
--- 21,31 ----
* questions.
*/
/*
* @test
! * @summary Basic test for Array::get, Array::set, Arrays::setAll on inline class array
* @compile -XDallowWithFieldOperator Point.java NonFlattenValue.java
* @compile -XDallowWithFieldOperator ValueArray.java
* @run testng/othervm -XX:+EnableValhalla -XX:ValueArrayElemMaxFlatSize=-1 ValueArray
* @run testng/othervm -XX:+EnableValhalla -XX:ValueArrayElemMaxFlatSize=0 ValueArray
*/
*** 133,143 ****
throw new AssertionError("NPE not thrown");
} catch (NullPointerException e) {}
}
}
! static value class PointArray {
public Point?[] points;
PointArray() {
points = new Point?[0];
}
public static PointArray makeArray(Point... points) {
--- 133,143 ----
throw new AssertionError("NPE not thrown");
} catch (NullPointerException e) {}
}
}
! static inline class PointArray {
public Point?[] points;
PointArray() {
points = new Point?[0];
}
public static PointArray makeArray(Point... points) {
< prev index next >