Skip to content

Commit 70f928c

Browse files
gengjiawentargos
authored andcommitted
deps: fix V8 build issue with inline methods
PR-URL: #35415 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent b045e39 commit 70f928c

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.6',
39+
'v8_embedder_string': '-node.7',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/objects/fixed-array-inl.h

+2
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
8888
return get(isolate, index).IsTheHole(isolate);
8989
}
9090

91+
#if !defined(_WIN32) || defined(_WIN64)
9192
void FixedArray::set(int index, Smi value) {
9293
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
9394
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
9495
DCHECK(Object(value).IsSmi());
9596
int offset = OffsetOfElementAt(index);
9697
RELAXED_WRITE_FIELD(*this, offset, value);
9798
}
99+
#endif
98100

99101
void FixedArray::set(int index, Object value) {
100102
DCHECK_NE(GetReadOnlyRoots().fixed_cow_array_map(), map());

deps/v8/src/objects/fixed-array.h

+11
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,18 @@ class FixedArray
123123
inline bool is_the_hole(Isolate* isolate, int index);
124124

125125
// Setter that doesn't need write barrier.
126+
#if defined(_WIN32) && !defined(_WIN64)
127+
inline void set(int index, Smi value) {
128+
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
129+
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
130+
DCHECK(Object(value).IsSmi());
131+
int offset = OffsetOfElementAt(index);
132+
RELAXED_WRITE_FIELD(*this, offset, value);
133+
}
134+
#else
126135
inline void set(int index, Smi value);
136+
#endif
137+
127138
// Setter with explicit barrier mode.
128139
inline void set(int index, Object value, WriteBarrierMode mode);
129140

deps/v8/src/objects/tagged-field.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TaggedField : public AllStatic {
4848
int offset = 0);
4949

5050
static inline void Relaxed_Store(HeapObject host, T value);
51-
static inline void Relaxed_Store(HeapObject host, int offset, T value);
51+
static void Relaxed_Store(HeapObject host, int offset, T value);
5252

5353
static inline T Acquire_Load(HeapObject host, int offset = 0);
5454
static inline T Acquire_Load(IsolateRoot isolate, HeapObject host,

0 commit comments

Comments
 (0)