/* * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// For cleaning staticvoid reset_has_items_to_clean(); staticvoid mark_has_items_to_clean(); staticbool has_items_to_clean();
static Symbol* allocate_symbol(constchar* name, int len, bool c_heap); // Assumes no characters larger than 0x7F static Symbol* do_lookup(constchar* name, int len, uintx hash); static Symbol* do_add_if_needed(constchar* name, int len, uintx hash, bool heap);
// lookup only, won't add. Also calculate hash. Used by the ClassfileParser. static Symbol* lookup_only(constchar* name, int len, unsignedint& hash); static Symbol* lookup_only_unicode(const jchar* name, int len, unsignedint& hash);
// Adding elements staticvoid new_symbols(ClassLoaderData* loader_data, const constantPoolHandle& cp, int names_count, constchar** name, int* lengths, int* cp_indices, unsignedint* hashValues);
static Symbol* lookup_shared(constchar* name, int len, unsignedint hash) NOT_CDS_RETURN_(NULL); static Symbol* lookup_dynamic(constchar* name, int len, unsignedint hash); static Symbol* lookup_common(constchar* name, int len, unsignedint hash);
// Arena for permanent symbols (null class loader) that are never unloaded static Arena* _arena; static Arena* arena() { return _arena; } // called for statistics
// Probing // Needed for preloading classes in signatures when compiling. // Returns the symbol is already present in symbol table, otherwise // NULL. NO ALLOCATION IS GUARANTEED! static Symbol* probe(constchar* name, int len) { unsignedint ignore_hash; return lookup_only(name, len, ignore_hash);
} static Symbol* probe_unicode(const jchar* name, int len) { unsignedint ignore_hash; return lookup_only_unicode(name, len, ignore_hash);
}
// Symbol lookup and create if not found. // jchar (UTF16) version of lookup static Symbol* new_symbol(const jchar* name, int len); // char (UTF8) versions static Symbol* new_symbol(const Symbol* sym, int begin, int end); static Symbol* new_symbol(constchar* utf8_buffer, int length); static Symbol* new_symbol(constchar* name) { return new_symbol(name, (int)strlen(name));
}
// Create a symbol in the arena for symbols that are not deleted static Symbol* new_permanent_symbol(constchar* name);
// Rehash the string table if it gets out of balance staticvoid rehash_table(); staticbool needs_rehashing() { return _needs_rehashing; } staticinlinevoid update_needs_rehash(bool rehash) { if (rehash) {
_needs_rehashing = true;
}
}
// Heap dumper and CDS staticvoid symbols_do(SymbolClosure *cl);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.