v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
unmarker.h
Go to the documentation of this file.
1
// Copyright 2021 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_HEAP_CPPGC_UNMARKER_H_
6
#define V8_HEAP_CPPGC_UNMARKER_H_
7
8
#include "
src/heap/cppgc/heap-object-header.h
"
9
#include "
src/heap/cppgc/heap-visitor.h
"
10
11
namespace
cppgc
{
12
namespace
internal
{
13
14
class
SequentialUnmarker
final :
private
HeapVisitor
<SequentialUnmarker> {
15
friend
class
HeapVisitor
<
SequentialUnmarker
>;
16
17
public
:
18
explicit
SequentialUnmarker
(
RawHeap
&
heap
) {
Traverse
(
heap
); }
19
20
bool
VisitNormalPage
(
NormalPage
& page) {
21
page.ResetMarkedBytes();
22
return
false
;
23
}
24
25
bool
VisitLargePage
(
LargePage
& page) {
26
page.ResetMarkedBytes();
27
return
false
;
28
}
29
30
private
:
31
bool
VisitHeapObjectHeader
(
HeapObjectHeader
& header) {
32
if
(header.
IsMarked
()) {
33
header.
Unmark
();
34
}
35
return
true
;
36
}
37
};
38
39
}
// namespace internal
40
}
// namespace cppgc
41
42
#endif
// V8_HEAP_CPPGC_UNMARKER_H_
cppgc::internal::HeapObjectHeader
Definition
heap-object-header.h:58
cppgc::internal::HeapObjectHeader::IsMarked
bool IsMarked() const
Definition
heap-object-header.h:270
cppgc::internal::HeapObjectHeader::Unmark
void Unmark()
Definition
heap-object-header.h:277
cppgc::internal::HeapVisitor
Definition
heap-visitor.h:20
cppgc::internal::HeapVisitor< SequentialUnmarker >::Traverse
void Traverse(RawHeap &heap)
Definition
heap-visitor.h:22
cppgc::internal::LargePage
Definition
heap-page.h:256
cppgc::internal::NormalPage
Definition
heap-page.h:152
cppgc::internal::RawHeap
Definition
raw-heap.h:23
cppgc::internal::SequentialUnmarker
Definition
unmarker.h:14
cppgc::internal::SequentialUnmarker::VisitNormalPage
bool VisitNormalPage(NormalPage &page)
Definition
unmarker.h:20
cppgc::internal::SequentialUnmarker::VisitHeapObjectHeader
bool VisitHeapObjectHeader(HeapObjectHeader &header)
Definition
unmarker.h:31
cppgc::internal::SequentialUnmarker::SequentialUnmarker
SequentialUnmarker(RawHeap &heap)
Definition
unmarker.h:18
cppgc::internal::SequentialUnmarker::VisitLargePage
bool VisitLargePage(LargePage &page)
Definition
unmarker.h:25
heap-visitor.h
heap-object-header.h
cppgc
Definition
cross-heap-remembered-set.h:14
heap
Definition
platform.h:72
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
src
heap
cppgc
unmarker.h
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0