Skip to content

Commit fbb78d9

Browse files
gengjiawennodejs-github-bot
authored andcommitted
deps: fix V8 build issue with inline methods
PR-URL: nodejs/node#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]> deps: patch for v8 on windows PR-URL: nodejs/node#40010 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> deps: patch v8 for vs2019 in std17 PR-URL: nodejs/node#40060 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> deps: workaround debug link error on Windows PR-URL: nodejs/node#38807 Refs: nodejs/node#38788 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ash Cripps <[email protected]>
1 parent c75e0a2 commit fbb78d9

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-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.4',
39+
'v8_embedder_string': '-node.5',
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
@@ -84,13 +84,15 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
8484
return get(isolate, index).IsTheHole(isolate);
8585
}
8686

87+
#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930 && __cplusplus < 201703L)
8788
void FixedArray::set(int index, Smi value) {
8889
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
8990
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
9091
DCHECK(Object(value).IsSmi());
9192
int offset = OffsetOfElementAt(index);
9293
RELAXED_WRITE_FIELD(*this, offset, value);
9394
}
95+
#endif
9496

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

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

+13
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,20 @@ class FixedArray
134134
inline bool is_the_hole(Isolate* isolate, int index);
135135

136136
// Setter that doesn't need write barrier.
137+
#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930 && __cplusplus < 201703L)
137138
inline void set(int index, Smi value);
139+
#else
140+
inline void set(int index, Smi value) {
141+
#if !defined(_WIN32)
142+
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
143+
#endif
144+
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
145+
DCHECK(Object(value).IsSmi());
146+
int offset = OffsetOfElementAt(index);
147+
RELAXED_WRITE_FIELD(*this, offset, value);
148+
}
149+
#endif
150+
138151
// Setter with explicit barrier mode.
139152
inline void set(int index, Object value, WriteBarrierMode mode);
140153

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TaggedField : public AllStatic {
4949
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
static inline T Acquire_Load_No_Unpack(PtrComprCageBase cage_base,

0 commit comments

Comments
 (0)