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

*** 33,43 **** --- 33,43 ---- Symbol* vmSymbols::_symbols[vmSymbols::SID_LIMIT]; Symbol* vmSymbols::_type_signatures[T_VOID+1] = { NULL /*, NULL...*/ }; inline int compare_symbol(Symbol* a, Symbol* b) { ! if (a == b) return 0; ! if (a->equals(b)) return 0; // follow the natural address order: return (address)a > (address)b ? +1 : -1; } static vmSymbols::SID vm_symbol_index[vmSymbols::SID_LIMIT];
*** 100,110 **** --- 100,110 ---- #ifdef ASSERT // Check for duplicates: for (int i1 = (int)FIRST_SID; i1 < (int)SID_LIMIT; i1++) { Symbol* sym = symbol_at((SID)i1); for (int i2 = (int)FIRST_SID; i2 < i1; i2++) { ! if (symbol_at((SID)i2) == sym) { ! if (symbol_at((SID)i2)->equals(sym)) { tty->print("*** Duplicate VM symbol SIDs %s(%d) and %s(%d): \"", vm_symbol_enum_name((SID)i2), i2, vm_symbol_enum_name((SID)i1), i1); sym->print_symbol_on(tty); tty->print_cr("\"");
*** 189,199 **** --- 189,199 ---- BasicType vmSymbols::signature_type(Symbol* s) { assert(s != NULL, "checking"); for (int i = T_BOOLEAN; i < T_VOID+1; i++) { ! if (s == _type_signatures[i]) { ! if (s->equals(_type_signatures[i])) { return (BasicType)i; } } return T_OBJECT; }
*** 260,276 **** --- 260,276 ---- // Make sure this is the right answer, using linear search. // (We have already proven that there are no duplicates in the list.) SID sid2 = NO_SID; for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { Symbol* sym2 = symbol_at((SID)index); ! if (sym2 == symbol) { ! if (sym2->equals(symbol)) { sid2 = (SID)index; break; } } // Unless it's a duplicate, assert that the sids are the same. ! if (_symbols[sid] != _symbols[sid2]) { ! if (_symbols[sid]->not_equals(_symbols[sid2])) { assert(sid == sid2, "binary same as linear search"); } } #endif //ASSERT
*** 485,502 **** --- 485,502 ---- #ifndef PRODUCT // verify_method performs an extra check on a matched intrinsic method static bool match_method(Method* m, Symbol* n, Symbol* s) { ! return (m->name() == n && ! m->signature() == s); ! return (m->name()->equals(n) && ! m->signature()->equals(s)); } static vmIntrinsics::ID match_method_with_klass(Method* m, Symbol* mk) { #define VM_INTRINSIC_MATCH(id, klassname, namepart, sigpart, flags) \ { Symbol* k = vmSymbols::klassname(); \ ! if (mk == k) { \ ! if (mk->equals(k)) { \ Symbol* n = vmSymbols::namepart(); \ Symbol* s = vmSymbols::sigpart(); \ if (match_method(m, n, s)) \ return vmIntrinsics::id; \ } }
*** 510,520 **** --- 510,520 ---- Symbol* mk = m->method_holder()->name(); ID declared_id = match_method_with_klass(m, mk); if (declared_id == actual_id) return; // success ! if (declared_id == _none && actual_id != _none && mk == vmSymbols::java_lang_StrictMath()) { ! if (declared_id == _none && actual_id != _none && mk->equals(vmSymbols::java_lang_StrictMath())) { // Here are a few special cases in StrictMath not declared in vmSymbols.hpp. switch (actual_id) { case _min: case _max: case _dsqrt:

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