< prev index next >

test/compiler/valhalla/valuetypes/ValueTypeTestBench.java

Print this page

        

*** 98,112 **** --- 98,128 ---- @ForceInline public static MyValue1 createInline(int x, long y) { return __Make MyValue1(x, y, MyValue2.createInline(x, true), MyValue2.createInline(x, false), ValueTypeTestBench.rI); } + @DontInline + __ValueFactory static MyValue1 createDefaultDontInline() { + return __MakeDefault MyValue1(); + } + @ForceInline __ValueFactory static MyValue1 createDefaultInline() { return __MakeDefault MyValue1(); } + @DontInline + static MyValue1 createWithFieldsDontInline(int x, long y) { + MyValue1 v = createDefaultInline(); + v = setX(v, x); + v = setY(v, y); + v = setV1(v, MyValue2.createWithFieldsInline(x, x < y)); + v = setV2(v, MyValue2.createWithFieldsInline(x, x > y)); + v = setC(v, ValueTypeTestBench.rI); + return v; + } + @ForceInline static MyValue1 createWithFieldsInline(int x, long y) { MyValue1 v = createDefaultInline(); v = setX(v, x); v = setY(v, y);
*** 1208,1218 **** long result = test49(); Asserts.assertEQ(result, hash()); } // test vdefault ! @Test(failOn = ALLOC + STORE + TRAP) public long test50() { MyValue2 v = MyValue2.createDefaultInline(); return v.hash(); } --- 1224,1234 ---- long result = test49(); Asserts.assertEQ(result, hash()); } // test vdefault ! @Test(failOn = ALLOC + LOAD + STORE + LOOP + TRAP) public long test50() { MyValue2 v = MyValue2.createDefaultInline(); return v.hash(); }
*** 1220,1243 **** public void test50_verifier(boolean warmup) { long result = test50(); Asserts.assertEQ(result, MyValue2.createDefaultInline().hash()); } ! @Test(failOn = ALLOC + STORE + TRAP) public long test51() { ! MyValue1 v = MyValue1.createDefaultInline(); ! return v.hash(); } @DontCompile public void test51_verifier(boolean warmup) { long result = test51(); ! Asserts.assertEQ(result, MyValue1.createDefaultInline().hash()); } // test vwithfield ! @Test(failOn = ALLOC + LOAD + STORE + TRAP) public long test52() { MyValue2 v = MyValue2.createWithFieldsInline(rI, true); return v.hash(); } --- 1236,1261 ---- public void test50_verifier(boolean warmup) { long result = test50(); Asserts.assertEQ(result, MyValue2.createDefaultInline().hash()); } ! // test vdefault ! @Test(failOn = ALLOC + STORE + LOOP + TRAP) public long test51() { ! MyValue1 v1 = MyValue1.createDefaultInline(); ! MyValue1 v2 = MyValue1.createDefaultDontInline(); ! return v1.hash() + v2.hash(); } @DontCompile public void test51_verifier(boolean warmup) { long result = test51(); ! Asserts.assertEQ(result, 2 * MyValue1.createDefaultInline().hash()); } // test vwithfield ! @Test(failOn = ALLOC + LOAD + STORE + LOOP + TRAP) public long test52() { MyValue2 v = MyValue2.createWithFieldsInline(rI, true); return v.hash(); }
*** 1246,1265 **** long result = test52(); Asserts.assertEQ(result, MyValue2.createWithFieldsInline(rI, true).hash()); } // test vwithfield ! @Test(failOn = ALLOC + LOAD + STORE + TRAP) public long test53() { ! MyValue1 v = MyValue1.createWithFieldsInline(rI, rL); ! return v.hash(); } @DontCompile public void test53_verifier(boolean warmup) { long result = test53(); ! Asserts.assertEQ(result, hash()); } // multi-dimensional arrays @Test() public MyValue1[][][] test54(int len1, int len2, int len3) { --- 1264,1284 ---- long result = test52(); Asserts.assertEQ(result, MyValue2.createWithFieldsInline(rI, true).hash()); } // test vwithfield ! @Test(failOn = ALLOC + STORE + LOOP + TRAP) public long test53() { ! MyValue1 v1 = MyValue1.createWithFieldsInline(rI, rL); ! MyValue1 v2 = MyValue1.createWithFieldsDontInline(rI, rL); ! return v1.hash() + v2.hash(); } @DontCompile public void test53_verifier(boolean warmup) { long result = test53(); ! Asserts.assertEQ(result, 2 * hash()); } // multi-dimensional arrays @Test() public MyValue1[][][] test54(int len1, int len2, int len3) {
< prev index next >