--- old/src/hotspot/share/classfile/classListParser.hpp 2018-11-16 19:18:34.097870541 -0800 +++ new/src/hotspot/share/classfile/classListParser.hpp 2018-11-16 19:18:33.829860341 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -27,30 +27,12 @@ #include "utilities/exceptions.hpp" #include "utilities/globalDefinitions.hpp" -#include "utilities/hashtable.hpp" +#include "utilities/growableArray.hpp" +#include "utilities/hashtable.inline.hpp" -class CDSClassInfo; - -// Look up from ID -> InstanceKlass* -class ID2KlassTable : public Hashtable { +class ID2KlassTable : public KVHashtable { public: - ID2KlassTable() : Hashtable(1987, sizeof(HashtableEntry)) { } - void add(int id, InstanceKlass* klass) { - unsigned int hash = (unsigned int)id; - HashtableEntry* entry = new_entry(hash, klass); - add_entry(hash_to_index(hash), entry); - } - - InstanceKlass* lookup(int id) { - unsigned int hash = (unsigned int)id; - int index = hash_to_index(id); - for (HashtableEntry* e = bucket(index); e != NULL; e = e->next()) { - if (e->hash() == hash) { - return e->literal(); - } - } - return NULL; - } + ID2KlassTable() : KVHashtable(1987) {} }; class ClassListParser : public StackObj {