mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8230841: Remove oopDesc::equals()
Reviewed-by: rkennke, tschatzl
This commit is contained in:
parent
cb50d3b4f3
commit
2d6874b861
52 changed files with 119 additions and 132 deletions
|
@ -177,7 +177,7 @@ bool SystemDictionary::is_system_class_loader(oop class_loader) {
|
|||
return false;
|
||||
}
|
||||
return (class_loader->klass() == SystemDictionary::jdk_internal_loader_ClassLoaders_AppClassLoader_klass() ||
|
||||
oopDesc::equals(class_loader, _java_system_loader));
|
||||
class_loader == _java_system_loader);
|
||||
}
|
||||
|
||||
// Returns true if the passed class loader is the platform class loader.
|
||||
|
@ -393,7 +393,7 @@ InstanceKlass* SystemDictionary::resolve_super_or_fail(Symbol* child_name,
|
|||
if ((childk != NULL ) && (is_superclass) &&
|
||||
((quicksuperk = childk->java_super()) != NULL) &&
|
||||
((quicksuperk->name() == super_name) &&
|
||||
(oopDesc::equals(quicksuperk->class_loader(), class_loader())))) {
|
||||
(quicksuperk->class_loader() == class_loader()))) {
|
||||
return quicksuperk;
|
||||
} else {
|
||||
PlaceholderEntry* probe = placeholders()->get_entry(p_index, p_hash, child_name, loader_data);
|
||||
|
@ -542,7 +542,7 @@ void SystemDictionary::double_lock_wait(Handle lockObject, TRAPS) {
|
|||
bool calledholdinglock
|
||||
= ObjectSynchronizer::current_thread_holds_lock((JavaThread*)THREAD, lockObject);
|
||||
assert(calledholdinglock,"must hold lock for notify");
|
||||
assert((!oopDesc::equals(lockObject(), _system_loader_lock_obj) && !is_parallelCapable(lockObject)), "unexpected double_lock_wait");
|
||||
assert((lockObject() != _system_loader_lock_obj && !is_parallelCapable(lockObject)), "unexpected double_lock_wait");
|
||||
ObjectSynchronizer::notifyall(lockObject, THREAD);
|
||||
intptr_t recursions = ObjectSynchronizer::complete_exit(lockObject, THREAD);
|
||||
SystemDictionary_lock->wait();
|
||||
|
@ -850,7 +850,7 @@ InstanceKlass* SystemDictionary::resolve_instance_class_or_null(Symbol* name,
|
|||
// If everything was OK (no exceptions, no null return value), and
|
||||
// class_loader is NOT the defining loader, do a little more bookkeeping.
|
||||
if (!HAS_PENDING_EXCEPTION && k != NULL &&
|
||||
!oopDesc::equals(k->class_loader(), class_loader())) {
|
||||
k->class_loader() != class_loader()) {
|
||||
|
||||
check_constraints(d_hash, k, class_loader, false, THREAD);
|
||||
|
||||
|
@ -1003,7 +1003,7 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
|||
if (unsafe_anonymous_host != NULL) {
|
||||
// Create a new CLD for an unsafe anonymous class, that uses the same class loader
|
||||
// as the unsafe_anonymous_host
|
||||
guarantee(oopDesc::equals(unsafe_anonymous_host->class_loader(), class_loader()), "should be the same");
|
||||
guarantee(unsafe_anonymous_host->class_loader() == class_loader(), "should be the same");
|
||||
loader_data = ClassLoaderData::unsafe_anonymous_class_loader_data(class_loader);
|
||||
} else {
|
||||
loader_data = ClassLoaderData::class_loader_data(class_loader());
|
||||
|
@ -1729,7 +1729,7 @@ void SystemDictionary::check_loader_lock_contention(Handle loader_lock, TRAPS) {
|
|||
== ObjectSynchronizer::owner_other) {
|
||||
// contention will likely happen, so increment the corresponding
|
||||
// contention counter.
|
||||
if (oopDesc::equals(loader_lock(), _system_loader_lock_obj)) {
|
||||
if (loader_lock() == _system_loader_lock_obj) {
|
||||
ClassLoader::sync_systemLoaderLockContentionRate()->inc();
|
||||
} else {
|
||||
ClassLoader::sync_nonSystemLoaderLockContentionRate()->inc();
|
||||
|
@ -2150,7 +2150,7 @@ void SystemDictionary::update_dictionary(unsigned int d_hash,
|
|||
// cleared if revocation occurs too often for this type
|
||||
// NOTE that we must only do this when the class is initally
|
||||
// defined, not each time it is referenced from a new class loader
|
||||
if (oopDesc::equals(k->class_loader(), class_loader())) {
|
||||
if (k->class_loader() == class_loader()) {
|
||||
k->set_prototype_header(markWord::biased_locking_prototype());
|
||||
}
|
||||
}
|
||||
|
@ -2343,7 +2343,7 @@ Symbol* SystemDictionary::check_signature_loaders(Symbol* signature,
|
|||
Handle loader1, Handle loader2,
|
||||
bool is_method, TRAPS) {
|
||||
// Nothing to do if loaders are the same.
|
||||
if (oopDesc::equals(loader1(), loader2())) {
|
||||
if (loader1() == loader2()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue