File indexing completed on 2025-02-23 10:08:50
0001
0002
0003
0004
0005 #ifndef INCLUDE_CPPGC_HEAP_HANDLE_H_
0006 #define INCLUDE_CPPGC_HEAP_HANDLE_H_
0007
0008 #include "v8config.h" // NOLINT(build/include_directory)
0009
0010 namespace cppgc {
0011
0012 namespace internal {
0013 class HeapBase;
0014 class WriteBarrierTypeForCagedHeapPolicy;
0015 class WriteBarrierTypeForNonCagedHeapPolicy;
0016 }
0017
0018
0019
0020
0021 class HeapHandle {
0022 public:
0023
0024 HeapHandle(const HeapHandle&) = delete;
0025 HeapHandle& operator=(const HeapHandle&) = delete;
0026
0027 private:
0028 HeapHandle() = default;
0029
0030 V8_INLINE bool is_incremental_marking_in_progress() const {
0031 return is_incremental_marking_in_progress_;
0032 }
0033
0034 V8_INLINE bool is_young_generation_enabled() const {
0035 return is_young_generation_enabled_;
0036 }
0037
0038 bool is_incremental_marking_in_progress_ = false;
0039 bool is_young_generation_enabled_ = false;
0040
0041 friend class internal::HeapBase;
0042 friend class internal::WriteBarrierTypeForCagedHeapPolicy;
0043 friend class internal::WriteBarrierTypeForNonCagedHeapPolicy;
0044 };
0045
0046 }
0047
0048 #endif