summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/fixed-array-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/fixed-array-inl.h')
-rw-r--r--deps/v8/src/objects/fixed-array-inl.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/deps/v8/src/objects/fixed-array-inl.h b/deps/v8/src/objects/fixed-array-inl.h
index 520b6e7da6..43b77539e1 100644
--- a/deps/v8/src/objects/fixed-array-inl.h
+++ b/deps/v8/src/objects/fixed-array-inl.h
@@ -19,7 +19,6 @@
#include "src/objects/oddball.h"
#include "src/objects/slots.h"
#include "src/roots/roots-inl.h"
-#include "src/sanitizer/tsan.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
@@ -45,13 +44,11 @@ TQ_OBJECT_CONSTRUCTORS_IMPL(WeakArrayList)
NEVER_READ_ONLY_SPACE_IMPL(WeakArrayList)
-SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
+RELEASE_ACQUIRE_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
-SYNCHRONIZED_SMI_ACCESSORS(WeakFixedArray, length, kLengthOffset)
+RELEASE_ACQUIRE_SMI_ACCESSORS(WeakFixedArray, length, kLengthOffset)
-SYNCHRONIZED_SMI_ACCESSORS(WeakArrayList, capacity, kCapacityOffset)
-
-Object FixedArrayBase::unchecked_synchronized_length() const {
+Object FixedArrayBase::unchecked_length(AcquireLoadTag) const {
return ACQUIRE_READ_FIELD(*this, kLengthOffset);
}
@@ -88,7 +85,6 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
return get(isolate, index).IsTheHole(isolate);
}
-#if !defined(_WIN32) || defined(_WIN64)
void FixedArray::set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
@@ -96,7 +92,6 @@ void FixedArray::set(int index, Smi value) {
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
-#endif
void FixedArray::set(int index, Object value) {
DCHECK_NE(GetReadOnlyRoots().fixed_cow_array_map(), map());
@@ -245,15 +240,11 @@ void FixedArray::CopyElements(Isolate* isolate, int dst_index, FixedArray src,
// Due to left- and right-trimming, concurrent visitors need to read the length
// with acquire semantics.
// TODO(ulan): Acquire should not be needed anymore.
-inline int FixedArray::AllocatedSize() {
- return SizeFor(synchronized_length());
-}
+inline int FixedArray::AllocatedSize() { return SizeFor(length(kAcquireLoad)); }
inline int WeakFixedArray::AllocatedSize() {
- return SizeFor(synchronized_length());
-}
-inline int WeakArrayList::AllocatedSize() {
- return SizeFor(synchronized_capacity());
+ return SizeFor(length(kAcquireLoad));
}
+inline int WeakArrayList::AllocatedSize() { return SizeFor(capacity()); }
// Perform a binary search in a fixed array.
template <SearchMode search_mode, typename T>
@@ -447,7 +438,7 @@ MaybeObject WeakFixedArray::Get(int index) const {
MaybeObject WeakFixedArray::Get(PtrComprCageBase cage_base, int index) const {
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
- return objects(cage_base, index);
+ return objects(cage_base, index, kRelaxedLoad);
}
void WeakFixedArray::Set(int index, MaybeObject value, WriteBarrierMode mode) {
@@ -482,7 +473,7 @@ MaybeObject WeakArrayList::Get(int index) const {
MaybeObject WeakArrayList::Get(PtrComprCageBase cage_base, int index) const {
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(capacity()));
- return objects(cage_base, index);
+ return objects(cage_base, index, kRelaxedLoad);
}
void WeakArrayList::Set(int index, MaybeObject value, WriteBarrierMode mode) {