2253 2254 nullField = get_nullField(); // should not throw 2255 } 2256 2257 @DontCompile 2258 public void test87_verifier(boolean warmup) { 2259 test87(); 2260 } 2261 2262 // A callee that's not aware of VT may return a null to the caller. An 2263 // explicit null check is needed in compiled code. 2264 @Test(failOn = "CallStaticJava.*TestLWorld_mismatched::test88_callee compiler/valhalla/valuetypes/MyValue1:NotNull") 2265 public void test88() { 2266 TestLWorld_mismatched.test88(); 2267 } 2268 2269 @DontCompile 2270 public void test88_verifier(boolean warmup) { 2271 test88(); 2272 } 2273 } | 2253 2254 nullField = get_nullField(); // should not throw 2255 } 2256 2257 @DontCompile 2258 public void test87_verifier(boolean warmup) { 2259 test87(); 2260 } 2261 2262 // A callee that's not aware of VT may return a null to the caller. An 2263 // explicit null check is needed in compiled code. 2264 @Test(failOn = "CallStaticJava.*TestLWorld_mismatched::test88_callee compiler/valhalla/valuetypes/MyValue1:NotNull") 2265 public void test88() { 2266 TestLWorld_mismatched.test88(); 2267 } 2268 2269 @DontCompile 2270 public void test88_verifier(boolean warmup) { 2271 test88(); 2272 } 2273 2274 // Tests for loading/storing unkown values 2275 @Test 2276 public Object test89(Object[] va) { 2277 return va[0]; 2278 } 2279 2280 @DontCompile 2281 public void test89_verifier(boolean warmup) { 2282 MyValue1 vt = (MyValue1)test89(testValue1Array); 2283 Asserts.assertEquals(testValue1Array[0].hash(), vt.hash()); 2284 } 2285 2286 @Test 2287 public void test90(Object[] va, Object vt) { 2288 va[0] = vt; 2289 } 2290 2291 @DontCompile 2292 public void test90_verifier(boolean warmup) { 2293 MyValue1[] va = new MyValue1[1]; 2294 test90(va, testValue1); 2295 Asserts.assertEquals(va[0].hash(), testValue1.hash()); 2296 } 2297 2298 // Verify that mixing instances and arrays with the clone api 2299 // doesn't break anything 2300 @Test 2301 public Object test91(Object o) { 2302 MyValue1[] va = new MyValue1[1]; 2303 Object[] next = va; 2304 Object[] arr = va; 2305 for (int i = 0; i < 10; i++) { 2306 arr = next; 2307 next = new Integer[1]; 2308 } 2309 return arr[0]; 2310 } 2311 2312 @DontCompile 2313 public void test91_verifier(boolean warmup) { 2314 test91(42); 2315 } 2316 } |