#include "src/handles/traced-handles.h"
#include <limits>
#include "include/v8-embedder-heap.h"
#include "include/v8-internal.h"
#include "include/v8-traced-handle.h"
#include "src/base/logging.h"
#include "src/base/platform/memory.h"
#include "src/common/globals.h"
#include "src/handles/handles.h"
#include "src/handles/traced-handles-inl.h"
#include "src/heap/heap-write-barrier-inl.h"
#include "src/objects/objects.h"
#include "src/objects/slots.h"
#include "src/objects/visitors.h"
namespace v8::internal {
class TracedNodeBlock;
TracedNode::TracedNode(IndexType index, IndexType next_free_index)
: … { … }
void TracedNode::Release(Address zap_value) { … }
TracedNodeBlock* TracedNodeBlock::Create(TracedHandles& traced_handles) { … }
void TracedNodeBlock::Delete(TracedNodeBlock* block) { … }
TracedNodeBlock::TracedNodeBlock(TracedHandles& traced_handles,
TracedNode::IndexType capacity)
: … { … }
TracedNodeBlock& TracedNodeBlock::From(TracedNode& node) { … }
const TracedNodeBlock& TracedNodeBlock::From(const TracedNode& node) { … }
void TracedNodeBlock::FreeNode(TracedNode* node, Address zap_value) { … }
void SetSlotThreadSafe(Address** slot, Address* val) { … }
void TracedHandles::RefillUsableNodeBlocks() { … }
void TracedHandles::FreeNode(TracedNode* node, Address zap_value) { … }
TracedHandles::TracedHandles(Isolate* isolate) : … { … }
TracedHandles::~TracedHandles() { … }
void TracedHandles::Destroy(TracedNodeBlock& node_block, TracedNode& node) { … }
void TracedHandles::Copy(const TracedNode& from_node, Address** to) { … }
void TracedHandles::Move(TracedNode& from_node, Address** from, Address** to) { … }
void TracedHandles::SetIsMarking(bool value) { … }
void TracedHandles::SetIsSweepingOnMutatorThread(bool value) { … }
const TracedHandles::NodeBounds TracedHandles::GetNodeBounds() const { … }
void TracedHandles::UpdateListOfYoungNodes() { … }
void TracedHandles::DeleteEmptyBlocks() { … }
void TracedHandles::ResetDeadNodes(
WeakSlotCallbackWithHeap should_reset_handle) { … }
void TracedHandles::ResetYoungDeadNodes(
WeakSlotCallbackWithHeap should_reset_handle) { … }
namespace {
void ComputeWeaknessForYoungObject(
EmbedderRootsHandler* handler, TracedNode* node,
bool should_call_is_root_for_default_traced_reference) { … }
}
void TracedHandles::ComputeWeaknessForYoungObjects() { … }
void TracedHandles::ProcessYoungObjects(
RootVisitor* visitor, WeakSlotCallbackWithHeap should_reset_handle) { … }
void TracedHandles::Iterate(RootVisitor* visitor) { … }
void TracedHandles::IterateYoung(RootVisitor* visitor) { … }
void TracedHandles::IterateYoungRoots(RootVisitor* visitor) { … }
void TracedHandles::IterateAndMarkYoungRootsWithOldHosts(RootVisitor* visitor) { … }
void TracedHandles::IterateYoungRootsWithOldHostsForTesting(
RootVisitor* visitor) { … }
void TracedHandles::Destroy(Address* location) { … }
void TracedHandles::Copy(const Address* const* from, Address** to) { … }
void TracedHandles::Move(Address** from, Address** to) { … }
namespace {
Tagged<Object> MarkObject(Tagged<Object> obj, TracedNode& node,
TracedHandles::MarkMode mark_mode) { … }
}
Tagged<Object> TracedHandles::Mark(Address* location, MarkMode mark_mode) { … }
Tagged<Object> TracedHandles::MarkConservatively(
Address* inner_location, Address* traced_node_block_base,
MarkMode mark_mode) { … }
bool TracedHandles::IsValidInUseNode(const Address* location) { … }
bool TracedHandles::HasYoung() const { … }
}