< prev index next >

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

Print this page




2204         MyValue1 vt = MyValue1.createWithFieldsInline(rI, rL);
2205         try {
2206             vt = (MyValue1)obj;
2207             throw new RuntimeException("NullPointerException expected");
2208         } catch (NullPointerException e) {
2209             // Expected
2210         }
2211         return vt;
2212     }
2213 
2214     @Test
2215     public MyValue1 test85() {
2216         return test85_inline(null);
2217     }
2218 
2219     @DontCompile
2220     public void test85_verifier(boolean warmup) {
2221         MyValue1 vt = test85();
2222         Asserts.assertEquals(vt.hash(), hash());
2223     }
























2224 }


2204         MyValue1 vt = MyValue1.createWithFieldsInline(rI, rL);
2205         try {
2206             vt = (MyValue1)obj;
2207             throw new RuntimeException("NullPointerException expected");
2208         } catch (NullPointerException e) {
2209             // Expected
2210         }
2211         return vt;
2212     }
2213 
2214     @Test
2215     public MyValue1 test85() {
2216         return test85_inline(null);
2217     }
2218 
2219     @DontCompile
2220     public void test85_verifier(boolean warmup) {
2221         MyValue1 vt = test85();
2222         Asserts.assertEquals(vt.hash(), hash());
2223     }
2224 
2225     // Test calling a method on an uninitialized value type
2226     __ByValue final class Test86Value {
2227         final int x = 42;
2228         public int get() {
2229             return x;
2230         }
2231     }
2232 
2233     // Make sure Test86Value is loaded but not initialized
2234     public void unused(Test86Value vt) { }
2235 
2236     @Test
2237     @Warmup(0)
2238     public int test86() {
2239         Test86Value vt = __MakeDefault Test86Value();
2240         return vt.get();
2241     }
2242 
2243     @DontCompile
2244     public void test86_verifier(boolean warmup) {
2245         int result = test86();
2246         Asserts.assertEquals(result, 0);
2247     }
2248 }
< prev index next >