v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
marking-worklist-inl.h
Go to the documentation of this file.
1// Copyright 2020 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_MARKING_WORKLIST_INL_H_
6#define V8_HEAP_MARKING_WORKLIST_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
11#include <unordered_map>
12
16
17namespace v8 {
18namespace internal {
19
21 active_->Push(object);
22}
23
25 if (active_->Pop(object)) return true;
26 if (!is_per_context_mode_) return false;
27 // The active worklist is empty. Find any other non-empty worklist and
28 // switch the active worklist to it.
29 return PopContext(object);
30}
31
35
39
41 if (context == active_context_) return context;
42 return SwitchToContextSlow(context);
43}
44
46 Address context, MarkingWorklist::Local* worklist) {
47 active_ = worklist;
48 active_context_ = context;
49}
50
52 if (!cpp_marking_state_) {
53 return;
54 }
55 cpp_marking_state_->Publish();
56}
57
58} // namespace internal
59} // namespace v8
60
61#endif // V8_HEAP_MARKING_WORKLIST_INL_H_
void Push(Segment *segment)
Definition worklist.h:106
bool Pop(Segment **segment)
Definition worklist.h:115
void SwitchToContextImpl(Address context, MarkingWorklist::Local *worklist)
bool PopOnHold(Tagged< HeapObject > *object)
void Push(Tagged< HeapObject > object)
void PushOnHold(Tagged< HeapObject > object)
bool Pop(Tagged< HeapObject > *object)
bool active_
Definition cpp-heap.cc:596
TNode< Context > context