5#ifndef V8_HEAP_MARKING_WORKLIST_H_
6#define V8_HEAP_MARKING_WORKLIST_H_
10#include <unordered_map>
75 static constexpr Address kSharedContext = 0;
76 static constexpr Address kOtherContext = 8;
90 return context_worklists_;
94 void CreateContextWorklists(
const std::vector<Address>& contexts);
97 void ReleaseContextWorklists();
105 void PrintWorklist(
const char* worklist_name,
MarkingWorklist* worklist);
134 static constexpr Address kSharedContext = MarkingWorklists::kSharedContext;
135 static constexpr Address kOtherContext = MarkingWorklists::kOtherContext;
136 static constexpr std::nullptr_t kNoCppMarkingState =
nullptr;
140 std::unique_ptr<CppMarkingState> cpp_marking_state = kNoCppMarkingState);
153 bool IsWrapperEmpty()
const;
165 inline void PublishCppHeapObjects();
168 Address
Context()
const {
return active_context_; }
169 inline Address SwitchToContext(Address context);
173 return cpp_marking_state_.get();
176 Address SwitchToSharedForTesting();
179 inline void SwitchToContextImpl(Address context,
180 MarkingWorklist::Local* worklist);
183 Address SwitchToContextSlow(Address context);
MarkingWorklist::Local * active_
bool IsPerContextMode() const
std::vector< MarkingWorklist::Local > context_worklists_
MarkingWorklist::Local other_
const bool is_per_context_mode_
std::unique_ptr< CppMarkingState > cpp_marking_state_
MarkingWorklist::Local shared_
CppMarkingState * cpp_marking_state() const
MarkingWorklist::Local on_hold_
AddressToIndexHashMap worklist_by_context_
const std::vector< ContextWorklistPair > & context_worklists() const
MarkingWorklist * other()
bool IsUsingContextWorklists() const
MarkingWorklist * shared()
MarkingWorklist * on_hold()
std::vector< ContextWorklistPair > context_worklists_
~MarkingWorklists()=default
MarkingWorklists()=default
Tagged< SharedFunctionInfo > shared_
std::vector< Handle< JSObject > > other_
const int kMainThreadTask
#define V8_EXPORT_PRIVATE
std::unique_ptr< MarkingWorklist > worklist