< prev index next >
test/jdk/valhalla/valuetypes/ObjectMethods.java
Print this page
rev 55117 : 8223350: [lworld] Use inline classes instead of value classes
*** 22,32 ****
*/
/*
* @test
! * @summary test Object methods on value types
* @compile -XDallowWithFieldOperator ObjectMethods.java
* @run testng/othervm -XX:+EnableValhalla -Dvalue.bsm.salt=1 ObjectMethods
* @run testng/othervm -XX:+EnableValhalla -Dvalue.bsm.salt=1 -XX:ValueFieldMaxFlatSize=0 ObjectMethods
*/
--- 22,32 ----
*/
/*
* @test
! * @summary test Object methods on inline types
* @compile -XDallowWithFieldOperator ObjectMethods.java
* @run testng/othervm -XX:+EnableValhalla -Dvalue.bsm.salt=1 ObjectMethods
* @run testng/othervm -XX:+EnableValhalla -Dvalue.bsm.salt=1 -XX:ValueFieldMaxFlatSize=0 ObjectMethods
*/
*** 76,86 ****
.setLong(4L)
.setPoint(Point.makePoint(200, 200))
.setNumber(Value.Number.intValue(10)).build(), true},
{ new Value.Builder().setNumber(new Value.IntNumber(10)).build(),
new Value.Builder().setNumber(new Value.IntNumber(10)).build(), false},
! // reference classes containing value fields
{ MUTABLE_PATH, MutablePath.makePath(10, 20, 30, 40), false},
{ MIXED_VALUES, MIXED_VALUES, true},
{ MIXED_VALUES, new MixedValues(P1, LINE1, MUTABLE_PATH, "value"), false},
// uninitialized default value
{ MyValue1.default, MyValue1.default, true},
--- 76,86 ----
.setLong(4L)
.setPoint(Point.makePoint(200, 200))
.setNumber(Value.Number.intValue(10)).build(), true},
{ new Value.Builder().setNumber(new Value.IntNumber(10)).build(),
new Value.Builder().setNumber(new Value.IntNumber(10)).build(), false},
! // reference classes containing fields of inline type
{ MUTABLE_PATH, MutablePath.makePath(10, 20, 30, 40), false},
{ MIXED_VALUES, MIXED_VALUES, true},
{ MIXED_VALUES, new MixedValues(P1, LINE1, MUTABLE_PATH, "value"), false},
// uninitialized default value
{ MyValue1.default, MyValue1.default, true},
*** 177,187 ****
hc = 31 * hc + (o != null ? o.hashCode() : 0);
}
return hc;
}
! static value class MyValue1 {
Point p = Point.default;
Point? box = Point.default;
static MyValue1 make(int x, int y, Point? box) {
MyValue1 v = MyValue1.default;
--- 177,187 ----
hc = 31 * hc + (o != null ? o.hashCode() : 0);
}
return hc;
}
! static inline class MyValue1 {
Point p = Point.default;
Point? box = Point.default;
static MyValue1 make(int x, int y, Point? box) {
MyValue1 v = MyValue1.default;
< prev index next >