Skip to content

Commit 3c23af4

Browse files
gengjiawentargos
authored andcommitted
deps: fix V8 build issue with inline methods
PR-URL: #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>
1 parent b803b3f commit 3c23af4

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
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.10',
39+
'v8_embedder_string': '-node.11',
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
@@ -122,7 +122,18 @@ class FixedArray
122122
inline bool is_the_hole(Isolate* isolate, int index);
123123

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

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ class TaggedField : public AllStatic {
4545

4646
static inline T Relaxed_Load(HeapObject host, int offset = 0);
4747
template <typename LocalIsolate>
48-
static inline T Relaxed_Load(const LocalIsolate* isolate, HeapObject host,
49-
int offset = 0);
48+
static T Relaxed_Load(const LocalIsolate* isolate, HeapObject host,
49+
int offset = 0);
5050

5151
static inline void Relaxed_Store(HeapObject host, T value);
52-
static inline void Relaxed_Store(HeapObject host, int offset, T value);
52+
static void Relaxed_Store(HeapObject host, int offset, T value);
5353

5454
static inline T Acquire_Load(HeapObject host, int offset = 0);
5555
template <typename LocalIsolate>

0 commit comments

Comments
 (0)