deps: fix V8 build issue with inline methods

PR-URL: https://github.com/nodejs/node/pull/35415
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
pull/39474/head
Jiawen Geng 2020-10-14 12:22:20 +00:00 committed by Michaël Zasso
parent 7f51e2c4af
commit 323f285e93
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
4 changed files with 15 additions and 2 deletions

View File

@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades. # Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8. # Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.4', 'v8_embedder_string': '-node.5',
##### V8 defaults for Node.js ##### ##### V8 defaults for Node.js #####

View File

@ -85,6 +85,7 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
return get(isolate, index).IsTheHole(isolate); return get(isolate, index).IsTheHole(isolate);
} }
#if !defined(_WIN32) || defined(_WIN64)
void FixedArray::set(int index, Smi value) { void FixedArray::set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map()); DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length())); DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
@ -92,6 +93,7 @@ void FixedArray::set(int index, Smi value) {
int offset = OffsetOfElementAt(index); int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value); RELAXED_WRITE_FIELD(*this, offset, value);
} }
#endif
void FixedArray::set(int index, Object value) { void FixedArray::set(int index, Object value) {
DCHECK_NE(GetReadOnlyRoots().fixed_cow_array_map(), map()); DCHECK_NE(GetReadOnlyRoots().fixed_cow_array_map(), map());

View File

@ -134,7 +134,18 @@ class FixedArray
inline bool is_the_hole(Isolate* isolate, int index); inline bool is_the_hole(Isolate* isolate, int index);
// Setter that doesn't need write barrier. // Setter that doesn't need write barrier.
#if defined(_WIN32) && !defined(_WIN64)
inline void set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
#else
inline void set(int index, Smi value); inline void set(int index, Smi value);
#endif
// Setter with explicit barrier mode. // Setter with explicit barrier mode.
inline void set(int index, Object value, WriteBarrierMode mode); inline void set(int index, Object value, WriteBarrierMode mode);

View File

@ -49,7 +49,7 @@ class TaggedField : public AllStatic {
int offset = 0); int offset = 0);
static inline void Relaxed_Store(HeapObject host, T value); static inline void Relaxed_Store(HeapObject host, T value);
static inline void Relaxed_Store(HeapObject host, int offset, T value); static void Relaxed_Store(HeapObject host, int offset, T value);
static inline T Acquire_Load(HeapObject host, int offset = 0); static inline T Acquire_Load(HeapObject host, int offset = 0);
static inline T Acquire_Load_No_Unpack(PtrComprCageBase cage_base, static inline T Acquire_Load_No_Unpack(PtrComprCageBase cage_base,