src/share/vm/oops/constantPool.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/oops/constantPool.cpp Thu Apr 16 13:30:51 2015
--- new/src/share/vm/oops/constantPool.cpp Thu Apr 16 13:30:51 2015
*** 810,820 ****
--- 810,820 ----
bool ConstantPool::klass_name_at_matches(instanceKlassHandle k,
int which) {
// Names are interned, so we can compare Symbol*s directly
Symbol* cp_name = klass_name_at(which);
! return (cp_name == k->name());
! return (cp_name->equals(k->name()));
}
// Iterate over symbols and decrement ones which are Symbol*s
// This is done during GC.
*** 949,959 ****
--- 949,959 ----
case JVM_CONSTANT_UnresolvedClass:
{
Symbol* k1 = klass_name_at(index1);
Symbol* k2 = cp2->klass_name_at(index2);
! if (k1 == k2) {
! if (k1->equals(k2)) {
return true;
}
} break;
case JVM_CONSTANT_MethodType:
*** 994,1013 ****
--- 994,1013 ----
case JVM_CONSTANT_String:
{
Symbol* s1 = unresolved_string_at(index1);
Symbol* s2 = cp2->unresolved_string_at(index2);
! if (s1 == s2) {
! if (s1->equals(s2)) {
return true;
}
} break;
case JVM_CONSTANT_Utf8:
{
Symbol* s1 = symbol_at(index1);
Symbol* s2 = cp2->symbol_at(index2);
! if (s1 == s2) {
! if (s1->equals(s2)) {
return true;
}
} break;
// Invalid is used as the tag for the second constant pool entry
*** 2048,2058 ****
--- 2048,2058 ----
// check if already in map
// we prefer the first entry since it is more likely to be what was used in
// the class file
for (SymbolHashMapEntry *en = bucket(index); en != NULL; en = en->next()) {
assert(en->symbol() != NULL, "SymbolHashMapEntry symbol is NULL");
! if (en->hash() == hash && en->symbol() == sym) {
! if (en->hash() == hash && en->symbol()->equals(sym)) {
return; // already there
}
}
SymbolHashMapEntry* entry = new SymbolHashMapEntry(hash, sym, value);
*** 2067,2077 ****
--- 2067,2077 ----
int len = sym->utf8_length();
unsigned int hash = SymbolHashMap::compute_hash(str, len);
unsigned int index = hash % table_size();
for (SymbolHashMapEntry *en = bucket(index); en != NULL; en = en->next()) {
assert(en->symbol() != NULL, "SymbolHashMapEntry symbol is NULL");
! if (en->hash() == hash && en->symbol() == sym) {
! if (en->hash() == hash && en->symbol()->equals(sym)) {
return en;
}
}
return NULL;
}
src/share/vm/oops/constantPool.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File