Skip to content

Commit 0d78bc3

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 5214918 commit 0d78bc3

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

Diff for: 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.4',
39+
'v8_embedder_string': '-node.5',
4040

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

Diff for: 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());

Diff for: deps/v8/src/objects/fixed-array.h

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

132132
// Setter that doesn't need write barrier.
133+
#if defined(_WIN32) && !defined(_WIN64)
134+
inline void set(int index, Smi value) {
135+
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
136+
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
137+
DCHECK(Object(value).IsSmi());
138+
int offset = OffsetOfElementAt(index);
139+
RELAXED_WRITE_FIELD(*this, offset, value);
140+
}
141+
#else
133142
inline void set(int index, Smi value);
143+
#endif
144+
134145
// Setter with explicit barrier mode.
135146
inline void set(int index, Object value, WriteBarrierMode mode);
136147

Diff for: 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)