< prev index next >
test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBasicFunctionality.java
Print this page
*** 755,760 ****
--- 755,787 ----
MyValue3 res = test35(va[0], va);
res.verify(vt);
staticVal3.verify(vt);
va[0].verify(vt);
}
+
+ // Test the handling of anewarray of a VT
+ @Test()
+ public MyValue2[] test36() {
+ MyValue2[] va = new MyValue2[3];
+ return va;
+ }
+
+ @DontCompile
+ public void test36_verifier(boolean warmup) {
+ MyValue2[] va = new MyValue2[10];
+ MyValue2[] result = test36();
+ Asserts.assertEQ(result[2].hash(), va[0].hash());
+ }
+
+ // Test the handling of aaload from a VT array
+ @Test()
+ public MyValue2 test37(MyValue2[] array, int i) {
+ return array[i];
+ }
+
+ @DontCompile
+ public void test37_verifier(boolean warmup) {
+ MyValue2[] va = new MyValue2[10];
+ MyValue2 result = test37(va, 9);
+ Asserts.assertEQ(result.hash(), va[0].hash());
+ }
}
< prev index next >