Skip to content

Commit

Permalink
deps: fix V8 build issue with inline methods
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
gengjiawen authored and targos committed Jan 2, 2023
1 parent ffb3d36 commit c32c52b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.0',
'v8_embedder_string': '-node.1',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 2 additions & 0 deletions deps/v8/src/objects/fixed-array-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
return get(isolate, index).IsTheHole(isolate);
}

#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930 && __cplusplus < 201703L)
void FixedArray::set(int index, Smi value) {
DCHECK_NE(map(), EarlyGetReadOnlyRoots().unchecked_fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
#endif

void FixedArray::set(int index, Object value) {
DCHECK_NE(EarlyGetReadOnlyRoots().unchecked_fixed_cow_array_map(), map());
Expand Down
13 changes: 13 additions & 0 deletions deps/v8/src/objects/fixed-array.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,20 @@ class FixedArray
inline bool is_the_hole(Isolate* isolate, int index);

// Setter that doesn't need write barrier.
#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930 && __cplusplus < 201703L)
inline void set(int index, Smi value);
#else
inline void set(int index, Smi value) {
#if !defined(_WIN32)
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
#endif
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
#endif

// Setter with explicit barrier mode.
inline void set(int index, Object value, WriteBarrierMode mode);

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/objects/tagged-field.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TaggedField : public AllStatic {
int offset = 0);

static inline void Relaxed_Store(HeapObject host, T value);
static inline void Relaxed_Store(HeapObject host, int offset, T value);
static void Relaxed_Store(HeapObject host, int offset, T value);

static inline T Acquire_Load(HeapObject host, int offset = 0);
static inline T Acquire_Load_No_Unpack(PtrComprCageBase cage_base,
Expand Down

0 comments on commit c32c52b

Please sign in to comment.