Commit a28eb2c8 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[hash-table] Make a few accessor definitions more readable

Change-Id: I10dd526c0ec1bee9c049b8a2a352908357bb302a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534812
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71158}
parent 4a89c018
......@@ -71,18 +71,15 @@ void EphemeronHashTable::set_key(int index, Object value,
}
int HashTableBase::NumberOfElements() const {
int offset = OffsetOfElementAt(kNumberOfElementsIndex);
return TaggedField<Smi>::load(*this, offset).value();
return Smi::cast(get(kNumberOfElementsIndex)).value();
}
int HashTableBase::NumberOfDeletedElements() const {
int offset = OffsetOfElementAt(kNumberOfDeletedElementsIndex);
return TaggedField<Smi>::load(*this, offset).value();
return Smi::cast(get(kNumberOfDeletedElementsIndex)).value();
}
int HashTableBase::Capacity() const {
int offset = OffsetOfElementAt(kCapacityIndex);
return TaggedField<Smi>::load(*this, offset).value();
return Smi::cast(get(kCapacityIndex)).value();
}
InternalIndex::Range HashTableBase::IterateEntries() const {
......
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