diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2022-11-18 09:50:46 +0000 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2022-11-19 09:11:32 +0000 |
commit | edd537ca2f38b94738fe25c2dc9b8c21bc7847f2 (patch) | |
tree | dad755f6f70ae5d70ab7bc251193ceeff04f20a5 /deps/v8/include/cppgc | |
parent | bcc704f6e527a2b072bf1477e72ae49a5a96c51a (diff) | |
download | node-new-edd537ca2f38b94738fe25c2dc9b8c21bc7847f2.tar.gz |
deps: update V8 to 10.8.168.20
PR-URL: https://github.com/nodejs/node/pull/45230
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Diffstat (limited to 'deps/v8/include/cppgc')
-rw-r--r-- | deps/v8/include/cppgc/heap-handle.h | 2 | ||||
-rw-r--r-- | deps/v8/include/cppgc/internal/member-storage.h | 4 | ||||
-rw-r--r-- | deps/v8/include/cppgc/internal/write-barrier.h | 18 | ||||
-rw-r--r-- | deps/v8/include/cppgc/member.h | 7 |
4 files changed, 19 insertions, 12 deletions
diff --git a/deps/v8/include/cppgc/heap-handle.h b/deps/v8/include/cppgc/heap-handle.h index 5a0f9cd2ed..8d825133b0 100644 --- a/deps/v8/include/cppgc/heap-handle.h +++ b/deps/v8/include/cppgc/heap-handle.h @@ -12,6 +12,7 @@ namespace cppgc { namespace internal { class HeapBase; class WriteBarrierTypeForCagedHeapPolicy; +class WriteBarrierTypeForNonCagedHeapPolicy; } // namespace internal /** @@ -34,6 +35,7 @@ class HeapHandle { friend class internal::HeapBase; friend class internal::WriteBarrierTypeForCagedHeapPolicy; + friend class internal::WriteBarrierTypeForNonCagedHeapPolicy; }; } // namespace cppgc diff --git a/deps/v8/include/cppgc/internal/member-storage.h b/deps/v8/include/cppgc/internal/member-storage.h index 98389b8cd3..0eb6382070 100644 --- a/deps/v8/include/cppgc/internal/member-storage.h +++ b/deps/v8/include/cppgc/internal/member-storage.h @@ -61,7 +61,7 @@ class CageBaseGlobal final { #undef CPPGC_REQUIRE_CONSTANT_INIT #undef CPPGC_CONST -class CompressedPointer final { +class V8_TRIVIAL_ABI CompressedPointer final { public: using IntegralType = uint32_t; @@ -170,7 +170,7 @@ class CompressedPointer final { #endif // defined(CPPGC_POINTER_COMPRESSION) -class RawPointer final { +class V8_TRIVIAL_ABI RawPointer final { public: using IntegralType = uintptr_t; diff --git a/deps/v8/include/cppgc/internal/write-barrier.h b/deps/v8/include/cppgc/internal/write-barrier.h index 2d8e14be08..37bc5c973e 100644 --- a/deps/v8/include/cppgc/internal/write-barrier.h +++ b/deps/v8/include/cppgc/internal/write-barrier.h @@ -12,6 +12,7 @@ #include "cppgc/heap-state.h" #include "cppgc/internal/api-constants.h" #include "cppgc/internal/atomic-entry-flag.h" +#include "cppgc/internal/base-page-handle.h" #include "cppgc/internal/member-storage.h" #include "cppgc/platform.h" #include "cppgc/sentinel-pointer.h" @@ -283,7 +284,7 @@ struct WriteBarrierTypeForCagedHeapPolicy::ValueModeDispatch< return SetAndReturnType<WriteBarrier::Type::kGenerational>(params); } #else // !defined(CPPGC_YOUNG_GENERATION) - if (V8_UNLIKELY(!subtle::HeapState::IsMarking(handle))) { + if (V8_UNLIKELY(!handle.is_incremental_marking_in_progress())) { return SetAndReturnType<WriteBarrier::Type::kNone>(params); } #endif // !defined(CPPGC_YOUNG_GENERATION) @@ -326,11 +327,6 @@ class V8_EXPORT WriteBarrierTypeForNonCagedHeapPolicy final { template <WriteBarrier::ValueMode value_mode> struct ValueModeDispatch; - // TODO(chromium:1056170): Create fast path on API. - static bool IsMarking(const void*, HeapHandle**); - // TODO(chromium:1056170): Create fast path on API. - static bool IsMarking(HeapHandle&); - WriteBarrierTypeForNonCagedHeapPolicy() = delete; }; @@ -348,7 +344,13 @@ struct WriteBarrierTypeForNonCagedHeapPolicy::ValueModeDispatch< if (V8_LIKELY(!WriteBarrier::IsEnabled())) { return SetAndReturnType<WriteBarrier::Type::kNone>(params); } - if (IsMarking(object, ¶ms.heap)) { + // We know that |object| is within the normal page or in the beginning of a + // large page, so extract the page header by bitmasking. + BasePageHandle* page = + BasePageHandle::FromPayload(const_cast<void*>(object)); + + HeapHandle& heap_handle = page->heap_handle(); + if (V8_LIKELY(heap_handle.is_incremental_marking_in_progress())) { return SetAndReturnType<WriteBarrier::Type::kMarking>(params); } return SetAndReturnType<WriteBarrier::Type::kNone>(params); @@ -364,7 +366,7 @@ struct WriteBarrierTypeForNonCagedHeapPolicy::ValueModeDispatch< HeapHandleCallback callback) { if (V8_UNLIKELY(WriteBarrier::IsEnabled())) { HeapHandle& handle = callback(); - if (IsMarking(handle)) { + if (V8_LIKELY(handle.is_incremental_marking_in_progress())) { params.heap = &handle; return SetAndReturnType<WriteBarrier::Type::kMarking>(params); } diff --git a/deps/v8/include/cppgc/member.h b/deps/v8/include/cppgc/member.h index 71f9cab652..9bc383634f 100644 --- a/deps/v8/include/cppgc/member.h +++ b/deps/v8/include/cppgc/member.h @@ -28,7 +28,7 @@ namespace internal { // MemberBase always refers to the object as const object and defers to // BasicMember on casting to the right type as needed. -class MemberBase { +class V8_TRIVIAL_ABI MemberBase { public: #if defined(CPPGC_POINTER_COMPRESSION) using RawStorage = CompressedPointer; @@ -68,13 +68,16 @@ class MemberBase { V8_INLINE void ClearFromGC() const { raw_.Clear(); } private: + friend class MemberDebugHelper; + mutable RawStorage raw_; }; // The basic class from which all Member classes are 'generated'. template <typename T, typename WeaknessTag, typename WriteBarrierPolicy, typename CheckingPolicy> -class BasicMember final : private MemberBase, private CheckingPolicy { +class V8_TRIVIAL_ABI BasicMember final : private MemberBase, + private CheckingPolicy { public: using PointeeType = T; |