Commit 679ed0f0 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[hashtable] Get rid of HashTable::Has, use FindEntry != NotFound instead

Bug: 
Change-Id: I483903e0a62363098370aeae154bbc6c52318741
Reviewed-on: https://chromium-review.googlesource.com/547956
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46201}
parent eccc60e3
......@@ -967,12 +967,12 @@ void CollectTypeProfileNexus::Collect(Handle<String> type, int position) {
Handle<ArrayList> position_specific_types;
if (types->Has(position)) {
int entry = types->FindEntry(position);
int entry = types->FindEntry(position);
if (entry == UnseededNumberDictionary::kNotFound) {
position_specific_types = ArrayList::New(isolate, 1);
} else {
DCHECK(types->ValueAt(entry)->IsArrayList());
position_specific_types = handle(ArrayList::cast(types->ValueAt(entry)));
} else {
position_specific_types = ArrayList::New(isolate, 1);
}
types = UnseededNumberDictionary::Set(
......
......@@ -2632,16 +2632,6 @@ int HashTable<Derived, Shape>::FindEntry(Isolate* isolate, Key key,
return kNotFound;
}
template <typename Derived, typename Shape>
bool HashTable<Derived, Shape>::Has(Key key) {
return FindEntry(key) != kNotFound;
}
template <typename Derived, typename Shape>
bool HashTable<Derived, Shape>::Has(Isolate* isolate, Key key) {
return FindEntry(isolate, key) != kNotFound;
}
bool ObjectHashSet::Has(Isolate* isolate, Handle<Object> key, int32_t hash) {
return FindEntry(isolate, key, hash) != kNotFound;
}
......
......@@ -149,8 +149,6 @@ class HashTable : public HashTableBase {
inline int FindEntry(Key key);
inline int FindEntry(Isolate* isolate, Key key, int32_t hash);
int FindEntry(Isolate* isolate, Key key);
inline bool Has(Isolate* isolate, Key key);
inline bool Has(Key key);
// Rehashes the table in-place.
void Rehash();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment