Commit d3dd3407 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by V8 LUCI CQ

[cleanup] Remove WeakArrayList::synchronized_capacity

It was never stored with a release store, so can we use the loads as
non-atomic ones.

Bug: v8:7790
Change-Id: Iaf91c0c431d557d74f80f243a0dbdaf9adc5e622
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2880540
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74471}
parent 0e9a480f
......@@ -48,8 +48,6 @@ SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
SYNCHRONIZED_SMI_ACCESSORS(WeakFixedArray, length, kLengthOffset)
SYNCHRONIZED_SMI_ACCESSORS(WeakArrayList, capacity, kCapacityOffset)
Object FixedArrayBase::unchecked_synchronized_length() const {
return ACQUIRE_READ_FIELD(*this, kLengthOffset);
}
......@@ -248,9 +246,7 @@ inline int FixedArray::AllocatedSize() {
inline int WeakFixedArray::AllocatedSize() {
return SizeFor(synchronized_length());
}
inline int WeakArrayList::AllocatedSize() {
return SizeFor(synchronized_capacity());
}
inline int WeakArrayList::AllocatedSize() { return SizeFor(capacity()); }
// Perform a binary search in a fixed array.
template <SearchMode search_mode, typename T>
......
......@@ -376,9 +376,6 @@ class WeakArrayList
V8_EXPORT_PRIVATE bool IsFull();
// Get and set the capacity using acquire loads and release stores.
DECL_SYNCHRONIZED_INT_ACCESSORS(capacity)
int AllocatedSize();
class BodyDescriptor;
......
......@@ -2313,7 +2313,7 @@ int HeapObject::SizeFromMap(Map map) const {
}
if (instance_type == WEAK_ARRAY_LIST_TYPE) {
return WeakArrayList::SizeForCapacity(
WeakArrayList::unchecked_cast(*this).synchronized_capacity());
WeakArrayList::unchecked_cast(*this).capacity());
}
if (instance_type == SMALL_ORDERED_HASH_SET_TYPE) {
return SmallOrderedHashSet::SizeFor(
......
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