src/hotspot/share/classfile/compactHashtable.inline.hpp
changeset 51179 516acf6956a2
parent 49592 77fb0be7d19f
child 51491 187c84a5efe1
equal deleted inserted replaced
51178:416a76fe8067 51179:516acf6956a2
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    34 template <class T, class N>
    34 template <class T, class N>
    35 inline Symbol* CompactHashtable<T, N>::decode_entry(CompactHashtable<Symbol*, char>* const t,
    35 inline Symbol* CompactHashtable<T, N>::decode_entry(CompactHashtable<Symbol*, char>* const t,
    36                                                     u4 offset, const char* name, int len) {
    36                                                     u4 offset, const char* name, int len) {
    37   Symbol* sym = (Symbol*)(_base_address + offset);
    37   Symbol* sym = (Symbol*)(_base_address + offset);
    38   if (sym->equals(name, len)) {
    38   if (sym->equals(name, len)) {
    39     assert(sym->refcount() == -1, "must be shared");
    39     assert(sym->refcount() == PERM_REFCOUNT, "must be shared");
    40     return sym;
    40     return sym;
    41   }
    41   }
    42 
    42 
    43   return NULL;
    43   return NULL;
    44 }
    44 }