src/share/vm/oops/instanceKlass.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/oops/instanceKlass.cpp	Wed Apr 15 12:03:14 2015
--- new/src/share/vm/oops/instanceKlass.cpp	Wed Apr 15 12:03:14 2015

*** 144,158 **** --- 144,158 ---- access_flags.is_interface(), is_anonymous); // Allocation InstanceKlass* ik; if (rt == REF_NONE) { ! if (name == vmSymbols::java_lang_Class()) { ! if (name->equals(vmSymbols::java_lang_Class())) { ik = new (loader_data, size, THREAD) InstanceMirrorKlass( vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous); ! } else if (name == vmSymbols::java_lang_ClassLoader() || ! } else if (name->equals(vmSymbols::java_lang_ClassLoader()) || (SystemDictionary::ClassLoader_klass_loaded() && super_klass != NULL && super_klass->is_subtype_of(SystemDictionary::ClassLoader_klass()))) { ik = new (loader_data, size, THREAD) InstanceClassLoaderKlass( vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt,
*** 1181,1191 **** --- 1181,1191 ---- bool InstanceKlass::find_local_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const { for (JavaFieldStream fs(this); !fs.done(); fs.next()) { Symbol* f_name = fs.name(); Symbol* f_sig = fs.signature(); ! if (f_name == name && f_sig == sig) { ! if (f_name->equals(name) && f_sig->equals(sig)) { fd->reinitialize(const_cast<InstanceKlass*>(this), fs.index()); return true; } } return false;
*** 1366,1376 **** --- 1366,1376 ---- static int linear_search(Array<Method*>* methods, Symbol* name, Symbol* signature) { int len = methods->length(); for (int index = 0; index < len; index++) { Method* m = methods->at(index); assert(m->is_method(), "must be method"); ! if (m->signature() == signature && m->name() == name) { ! if (m->signature()->equals(signature) && m->name()->equals(name)) { return index; } } return -1; }
*** 1434,1444 **** --- 1434,1444 ---- int hit = find_method_index(methods, name, signature, overpass_mode, static_mode); return hit >= 0 ? methods->at(hit): NULL; } bool InstanceKlass::method_matches(Method* m, Symbol* signature, bool skipping_overpass, bool skipping_static) { ! return (m->signature() == signature) && ! return (m->signature()->equals(signature)) && (!skipping_overpass || !m->is_overpass()) && (!skipping_static || !m->is_static()); } // Used directly for default_methods to find the index into the
*** 1463,1480 **** --- 1463,1480 ---- // search downwards through overloaded methods int i; for (i = hit - 1; i >= 0; --i) { Method* m = methods->at(i); assert(m->is_method(), "must be method"); ! if (m->name() != name) break; ! if (m->name()->not_equals(name)) break; if (method_matches(m, signature, skipping_overpass, skipping_static)) return i; } // search upwards for (i = hit + 1; i < methods->length(); ++i) { Method* m = methods->at(i); assert(m->is_method(), "must be method"); ! if (m->name() != name) break; ! if (m->name()->not_equals(name)) break; if (method_matches(m, signature, skipping_overpass, skipping_static)) return i; } // not found #ifdef ASSERT int index = (skipping_overpass || skipping_static) ? -1 : linear_search(methods, name, signature);
*** 1491,1502 **** --- 1491,1502 ---- Array<Method*>* methods, Symbol* name, int* end_ptr) { assert(end_ptr != NULL, "just checking"); int start = binary_search(methods, name); int end = start + 1; if (start != -1) { ! while (start - 1 >= 0 && (methods->at(start - 1))->name() == name) --start; ! while (end < methods->length() && (methods->at(end))->name() == name) ++end; ! while (start - 1 >= 0 && (methods->at(start - 1))->name()->equals(name)) --start; ! while (end < methods->length() && (methods->at(end))->name()->equals(name)) ++end; *end_ptr = end; return start; } return -1; }
*** 2574,2584 **** --- 2574,2584 ---- // and classname information is enough to determine a class's package bool InstanceKlass::is_same_class_package(oop class_loader1, Symbol* class_name1, oop class_loader2, Symbol* class_name2) { if (class_loader1 != class_loader2) { return false; ! } else if (class_name1 == class_name2) { ! } else if (class_name1->equals(class_name2)) { return true; // skip painful bytewise comparison } else { ResourceMark rm; // The Symbol*'s are in UTF8 encoding. Since we only need to check explicitly
*** 2709,2719 **** --- 2709,2719 ---- if (ioff == 0) continue; // only look at classes that are already loaded // since we are looking for the flags for our self. Symbol* inner_name = ik->constants()->klass_name_at(ioff); ! if ((ik->name() == inner_name)) { ! if ((ik->name()->equals(inner_name))) { // This is really a member class. access = iter.inner_access_flags(); break; } }
*** 3583,3594 **** --- 3583,3594 ---- Array<Method*>* method_refs = prev_version->methods(); for (int k = 0; k < method_refs->length(); k++) { Method* method = method_refs->at(k); if (!method->is_obsolete() && ! method->name() == m_name && ! method->signature() == m_signature) { ! method->name()->equals(m_name) && ! method->signature()->equals(m_signature)) { // The current RedefineClasses() call has made all EMCP // versions of this method obsolete so mark it as obsolete RC_TRACE(0x00000400, ("add: %s(%s): flush obsolete method @%d in version @%d", m_name->as_C_string(), m_signature->as_C_string(), k, j));

src/share/vm/oops/instanceKlass.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File