X Tutup
The Wayback Machine - https://web.archive.org/web/20210828180958/https://github.com/nodejs/node/commit/6200176ef0
Skip to content
Permalink
Browse files
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>
  • Loading branch information
gengjiawen authored and targos committed Nov 15, 2020
1 parent bd5642d commit 6200176ef08f45002aa496507d86110f3689fd00
Showing with 17 additions and 4 deletions.
  1. +1 −1 common.gypi
  2. +2 −0 deps/v8/src/objects/fixed-array-inl.h
  3. +11 −0 deps/v8/src/objects/fixed-array.h
  4. +3 −3 deps/v8/src/objects/tagged-field.h
@@ -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.9',
'v8_embedder_string': '-node.10',

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

@@ -87,13 +87,15 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
return get(isolate, index).IsTheHole(isolate);
}

#if !defined(_WIN32) || defined(_WIN64)
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()));
DCHECK(Object(value).IsSmi());
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());
@@ -122,7 +122,18 @@ class FixedArray
inline bool is_the_hole(Isolate* isolate, int index);

// Setter that doesn't need write barrier.
#if defined(_WIN32) && !defined(_WIN64)
inline void set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().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);
}
#else
inline void set(int index, Smi value);
#endif

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

@@ -45,11 +45,11 @@ class TaggedField : public AllStatic {

static inline T Relaxed_Load(HeapObject host, int offset = 0);
template <typename LocalIsolate>
static inline T Relaxed_Load(const LocalIsolate* isolate, HeapObject host,
int offset = 0);
static T Relaxed_Load(const LocalIsolate* isolate, HeapObject host,
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);
template <typename LocalIsolate>

0 comments on commit 6200176

Please sign in to comment.
X Tutup