Skip to content

Commit eac4bbd

Browse files
gengjiawentargos
authored andcommittedOct 11, 2022
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]> deps: patch for v8 on windows PR-URL: #40010 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> deps: patch v8 for vs2019 in std17 PR-URL: #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: #38807 Refs: #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 01bc8e6 commit eac4bbd

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

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

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

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

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

144144
// Setter that doesn't need write barrier.
145+
#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930 && __cplusplus < 201703L)
145146
inline void set(int index, Smi value);
147+
#else
148+
inline void set(int index, Smi value) {
149+
#if !defined(_WIN32)
150+
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
151+
#endif
152+
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
153+
DCHECK(Object(value).IsSmi());
154+
int offset = OffsetOfElementAt(index);
155+
RELAXED_WRITE_FIELD(*this, offset, value);
156+
}
157+
#endif
158+
146159
// Setter with explicit barrier mode.
147160
inline void set(int index, Object value, WriteBarrierMode mode);
148161

‎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)
Please sign in to comment.