diff options
author | Michaël Zasso <targos@protonmail.com> | 2021-07-14 11:30:07 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-07-20 15:24:51 +0200 |
commit | 6cdd310275bb0f8056aa0ae6d95614e9ca5b70c7 (patch) | |
tree | 9ed37b19cd668894854b7f469010f7621e63ef81 /deps/v8/src/objects/fixed-array-inl.h | |
parent | c0f10006c82d2d9896a552de98ed146f9542720d (diff) | |
download | node-new-6cdd310275bb0f8056aa0ae6d95614e9ca5b70c7.tar.gz |
deps: update V8 to 9.2.230.21
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/fixed-array-inl.h')
-rw-r--r-- | deps/v8/src/objects/fixed-array-inl.h | 25 |
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) { |