1434 }
1435 mdo = m()->method_data();
1436 }
1437 return mdo;
1438 }
1439
1440 #if COMPILER2_OR_JVMCI
1441 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
1442 // in case of an unresolved klass entry, load the class.
1443 if (constant_pool->tag_at(index).is_unresolved_klass()) {
1444 Klass* tk = constant_pool->klass_at_ignore_error(index, CHECK);
1445 return;
1446 }
1447
1448 if (!constant_pool->tag_at(index).is_symbol()) return;
1449
1450 Handle class_loader (THREAD, constant_pool->pool_holder()->class_loader());
1451 Symbol* symbol = constant_pool->symbol_at(index);
1452
1453 // class name?
1454 if (symbol->byte_at(0) != '(') {
1455 Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
1456 SystemDictionary::resolve_or_null(symbol, class_loader, protection_domain, CHECK);
1457 return;
1458 }
1459
1460 // then it must be a signature!
1461 ResourceMark rm(THREAD);
1462 for (SignatureStream ss(symbol); !ss.is_done(); ss.next()) {
1463 if (ss.is_object()) {
1464 Symbol* class_name = ss.as_symbol(CHECK);
1465 Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
1466 SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK);
1467 }
1468 }
1469 }
1470
1471
1472 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index) {
1473 EXCEPTION_MARK;
1474 load_class_by_index(constant_pool, index, THREAD);
|
1434 }
1435 mdo = m()->method_data();
1436 }
1437 return mdo;
1438 }
1439
1440 #if COMPILER2_OR_JVMCI
1441 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
1442 // in case of an unresolved klass entry, load the class.
1443 if (constant_pool->tag_at(index).is_unresolved_klass()) {
1444 Klass* tk = constant_pool->klass_at_ignore_error(index, CHECK);
1445 return;
1446 }
1447
1448 if (!constant_pool->tag_at(index).is_symbol()) return;
1449
1450 Handle class_loader (THREAD, constant_pool->pool_holder()->class_loader());
1451 Symbol* symbol = constant_pool->symbol_at(index);
1452
1453 // class name?
1454 if (symbol->char_at(0) != '(') {
1455 Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
1456 SystemDictionary::resolve_or_null(symbol, class_loader, protection_domain, CHECK);
1457 return;
1458 }
1459
1460 // then it must be a signature!
1461 ResourceMark rm(THREAD);
1462 for (SignatureStream ss(symbol); !ss.is_done(); ss.next()) {
1463 if (ss.is_object()) {
1464 Symbol* class_name = ss.as_symbol(CHECK);
1465 Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
1466 SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK);
1467 }
1468 }
1469 }
1470
1471
1472 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index) {
1473 EXCEPTION_MARK;
1474 load_class_by_index(constant_pool, index, THREAD);
|