summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiawen Geng <technicalcute@gmail.com>2020-10-14 12:22:20 +0000
committerMichaël Zasso <targos@protonmail.com>2022-04-21 11:54:45 +0200
commit7ac206f75f0280886766febd782150dea8085ae0 (patch)
tree7569c237995c74535021b8594d09aa3f7e3dbd03
parent11bccb8771d9a82e32db6dfb55a7211c20d1c8f2 (diff)
downloadnode-new-7ac206f75f0280886766febd782150dea8085ae0.tar.gz
deps: fix V8 build issue with inline methods
PR-URL: https://github.com/nodejs/node/pull/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> deps: patch for v8 on windows PR-URL: https://github.com/nodejs/node/pull/40010 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> deps: patch v8 for vs2019 in std17 PR-URL: https://github.com/nodejs/node/pull/40060 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> deps: workaround debug link error on Windows PR-URL: https://github.com/nodejs/node/pull/38807 Refs: https://github.com/nodejs/node/pull/38788 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ash Cripps <acripps@redhat.com>
-rw-r--r--common.gypi2
-rw-r--r--deps/v8/src/objects/fixed-array-inl.h2
-rw-r--r--deps/v8/src/objects/fixed-array.h13
-rw-r--r--deps/v8/src/objects/tagged-field.h2
4 files changed, 17 insertions, 2 deletions
diff --git a/common.gypi b/common.gypi
index b23d370481..099703383d 100644
--- a/common.gypi
+++ b/common.gypi
@@ -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.2',
+ 'v8_embedder_string': '-node.3',
##### V8 defaults for Node.js #####
diff --git a/deps/v8/src/objects/fixed-array-inl.h b/deps/v8/src/objects/fixed-array-inl.h
index 5dea891511..d0f619ac05 100644
--- a/deps/v8/src/objects/fixed-array-inl.h
+++ b/deps/v8/src/objects/fixed-array-inl.h
@@ -83,6 +83,7 @@ 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(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
@@ -90,6 +91,7 @@ void FixedArray::set(int index, Smi value) {
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
+#endif
void FixedArray::set(int index, Object value) {
DCHECK_NE(GetReadOnlyRoots().fixed_cow_array_map(), map());
diff --git a/deps/v8/src/objects/fixed-array.h b/deps/v8/src/objects/fixed-array.h
index f0c3bfc097..f36025535b 100644
--- a/deps/v8/src/objects/fixed-array.h
+++ b/deps/v8/src/objects/fixed-array.h
@@ -134,7 +134,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);
diff --git a/deps/v8/src/objects/tagged-field.h b/deps/v8/src/objects/tagged-field.h
index 7eb6a5a9cf..9410878c5e 100644
--- a/deps/v8/src/objects/tagged-field.h
+++ b/deps/v8/src/objects/tagged-field.h
@@ -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,