< prev index next >

test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java

Print this page




1865         Asserts.assertEQ(testValue1.hash(), vt.hash());
1866         holder = holder.init();
1867         Asserts.assertEQ(holder.valueField1.hash(), vt.hash());
1868         long result = test65(holder, vt, vt);
1869         Asserts.assertEQ(result, 9*vt.hash() + def.hashPrimitive());
1870     }
1871 
1872     // Access non-flattened, uninitialized value type field with value type holder
1873     @Test()
1874     public void test66(Test65Value holder) {
1875         if ((Object)holder.valueField5 != null) {
1876             throw new RuntimeException("Should be null");
1877         }
1878     }
1879 
1880     @DontCompile
1881     public void test66_verifier(boolean warmup) {
1882         Test65Value vt = __MakeDefault Test65Value();
1883         test66(vt);
1884     }











































1885 }


1865         Asserts.assertEQ(testValue1.hash(), vt.hash());
1866         holder = holder.init();
1867         Asserts.assertEQ(holder.valueField1.hash(), vt.hash());
1868         long result = test65(holder, vt, vt);
1869         Asserts.assertEQ(result, 9*vt.hash() + def.hashPrimitive());
1870     }
1871 
1872     // Access non-flattened, uninitialized value type field with value type holder
1873     @Test()
1874     public void test66(Test65Value holder) {
1875         if ((Object)holder.valueField5 != null) {
1876             throw new RuntimeException("Should be null");
1877         }
1878     }
1879 
1880     @DontCompile
1881     public void test66_verifier(boolean warmup) {
1882         Test65Value vt = __MakeDefault Test65Value();
1883         test66(vt);
1884     }
1885 
1886     // Merging value types of different types
1887     @Test()
1888     public Object test67(Object o, boolean b) {
1889         MyValue1 vt = MyValue1.createWithFieldsInline(rI, rL);
1890         return b ? vt : o;
1891     }
1892 
1893     @DontCompile
1894     public void test67_verifier(boolean warmup) {
1895         test67(new Object(), false);
1896         MyValue1 result = (MyValue1)test67(new Object(), true);
1897         Asserts.assertEQ(result.hash(), hash());
1898     }
1899 
1900     @Test()
1901     public Object test68(boolean b) {
1902         MyValue1 vt = MyValue1.createWithFieldsInline(rI, rL);
1903         return b ? vt : testValue2;
1904     }
1905 
1906     @DontCompile
1907     public void test68_verifier(boolean warmup) {
1908         MyValue1 result1 = (MyValue1)test68(true);
1909         Asserts.assertEQ(result1.hash(), hash());
1910         MyValue2 result2 = (MyValue2)test68(false);
1911         Asserts.assertEQ(result2.hash(), testValue2.hash());
1912     }
1913 
1914     @Test()
1915     public Object test69(boolean b) {
1916         MyValue1 vt1 = MyValue1.createWithFieldsInline(rI, rL);
1917         MyValue2 vt2 = MyValue2.createWithFieldsInline(rI, true);
1918         return b ? vt1 : vt2;
1919     }
1920 
1921     @DontCompile
1922     public void test69_verifier(boolean warmup) {
1923         MyValue1 result1 = (MyValue1)test69(true);
1924         Asserts.assertEQ(result1.hash(), hash());
1925         MyValue2 result2 = (MyValue2)test69(false);
1926         Asserts.assertEQ(result2.hash(), testValue2.hash());
1927     }
1928 }
< prev index next >