1359 delete ec;
1360 ec = next;
1361 }
1362
1363 if (on_scavenge_root_list()) {
1364 CodeCache::drop_scavenge_root_nmethod(this);
1365 }
1366
1367 #if INCLUDE_JVMCI
1368 if (_jvmci_installed_code != NULL) {
1369 JNIHandles::destroy_weak_global(_jvmci_installed_code);
1370 _jvmci_installed_code = NULL;
1371 }
1372
1373 if (_speculation_log != NULL) {
1374 JNIHandles::destroy_weak_global(_speculation_log);
1375 _speculation_log = NULL;
1376 }
1377 #endif
1378
1379 CodeBlob::flush();
1380 CodeCache::free(this);
1381 }
1382
1383 oop nmethod::oop_at(int index) const {
1384 if (index == 0) {
1385 return NULL;
1386 }
1387 return NativeAccess<AS_NO_KEEPALIVE>::oop_load(oop_addr_at(index));
1388 }
1389
1390 //
1391 // Notify all classes this nmethod is dependent on that it is no
1392 // longer dependent. This should only be called in two situations.
1393 // First, when a nmethod transitions to a zombie all dependents need
1394 // to be clear. Since zombification happens at a safepoint there's no
1395 // synchronization issues. The second place is a little more tricky.
1396 // During phase 1 of mark sweep class unloading may happen and as a
1397 // result some nmethods may get unloaded. In this case the flushing
|
1359 delete ec;
1360 ec = next;
1361 }
1362
1363 if (on_scavenge_root_list()) {
1364 CodeCache::drop_scavenge_root_nmethod(this);
1365 }
1366
1367 #if INCLUDE_JVMCI
1368 if (_jvmci_installed_code != NULL) {
1369 JNIHandles::destroy_weak_global(_jvmci_installed_code);
1370 _jvmci_installed_code = NULL;
1371 }
1372
1373 if (_speculation_log != NULL) {
1374 JNIHandles::destroy_weak_global(_speculation_log);
1375 _speculation_log = NULL;
1376 }
1377 #endif
1378
1379 Universe::heap()->flush_nmethod(this);
1380
1381 CodeBlob::flush();
1382 CodeCache::free(this);
1383 }
1384
1385 oop nmethod::oop_at(int index) const {
1386 if (index == 0) {
1387 return NULL;
1388 }
1389 return NativeAccess<AS_NO_KEEPALIVE>::oop_load(oop_addr_at(index));
1390 }
1391
1392 //
1393 // Notify all classes this nmethod is dependent on that it is no
1394 // longer dependent. This should only be called in two situations.
1395 // First, when a nmethod transitions to a zombie all dependents need
1396 // to be clear. Since zombification happens at a safepoint there's no
1397 // synchronization issues. The second place is a little more tricky.
1398 // During phase 1 of mark sweep class unloading may happen and as a
1399 // result some nmethods may get unloaded. In this case the flushing
|