/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/heap/cppgc/unmarker.h
42 строки
988 B
Michaël Zasso
deps: update V8 to 12.8.374.13
16 авг 2024, 17:03
Не верифицирован
16 авг 2024, 17:03
9d7cd9b
Код
Авторство
О чём код?
// Copyright 2021 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_HEAP_CPPGC_UNMARKER_H_ #define V8_HEAP_CPPGC_UNMARKER_H_ #include "src/heap/cppgc/heap-object-header.h" #include "src/heap/cppgc/heap-visitor.h" namespace cppgc { namespace internal { class SequentialUnmarker final : private HeapVisitor<SequentialUnmarker> { friend class HeapVisitor<SequentialUnmarker>; public: explicit SequentialUnmarker(RawHeap& heap) { Traverse(heap); } bool VisitNormalPage(NormalPage& page) { page.ResetMarkedBytes(); return false; } bool VisitLargePage(LargePage& page) { page.ResetMarkedBytes(); return false; } private: bool VisitHeapObjectHeader(HeapObjectHeader& header) { if (header.IsMarked()) { header.Unmark(); } return true; } }; } // namespace internal } // namespace cppgc #endif // V8_HEAP_CPPGC_UNMARKER_H_