#include "src/heap/heap-write-barrier.h"
#include "src/heap/heap-write-barrier-inl.h"
#include "src/heap/marking-barrier-inl.h"
#include "src/heap/memory-chunk-layout.h"
#include "src/heap/memory-chunk.h"
#include "src/heap/remembered-set.h"
#include "src/objects/code-inl.h"
#include "src/objects/descriptor-array.h"
#include "src/objects/js-objects.h"
#include "src/objects/maybe-object.h"
#include "src/objects/slots-inl.h"
#include "src/sandbox/js-dispatch-table-inl.h"
namespace v8 {
namespace internal {
namespace {
thread_local MarkingBarrier* current_marking_barrier = …;
}
bool HeapObjectInYoungGenerationSticky(MemoryChunk* chunk,
Tagged<HeapObject> object) { … }
MarkingBarrier* WriteBarrier::CurrentMarkingBarrier(
Tagged<HeapObject> verification_candidate) { … }
MarkingBarrier* WriteBarrier::SetForThread(MarkingBarrier* marking_barrier) { … }
void WriteBarrier::MarkingSlow(Tagged<HeapObject> host, HeapObjectSlot slot,
Tagged<HeapObject> value) { … }
void WriteBarrier::MarkingSlowFromGlobalHandle(Tagged<HeapObject> value) { … }
void WriteBarrier::MarkingSlowFromCppHeapWrappable(Heap* heap, void* object) { … }
void WriteBarrier::MarkingSlow(Tagged<InstructionStream> host,
RelocInfo* reloc_info,
Tagged<HeapObject> value) { … }
void WriteBarrier::SharedSlow(Tagged<InstructionStream> host,
RelocInfo* reloc_info, Tagged<HeapObject> value) { … }
void WriteBarrier::Shared(Tagged<TrustedObject> host, ProtectedPointerSlot slot,
Tagged<TrustedObject> value) { … }
void WriteBarrier::MarkingSlow(Tagged<JSArrayBuffer> host,
ArrayBufferExtension* extension) { … }
void WriteBarrier::MarkingSlow(Tagged<DescriptorArray> descriptor_array,
int number_of_own_descriptors) { … }
void WriteBarrier::MarkingSlow(Tagged<HeapObject> host,
IndirectPointerSlot slot) { … }
void WriteBarrier::MarkingSlow(Tagged<TrustedObject> host,
ProtectedPointerSlot slot,
Tagged<TrustedObject> value) { … }
void WriteBarrier::MarkingSlow(Tagged<HeapObject> host,
JSDispatchHandle handle) { … }
int WriteBarrier::MarkingFromCode(Address raw_host, Address raw_slot) { … }
int WriteBarrier::IndirectPointerMarkingFromCode(Address raw_host,
Address raw_slot,
Address raw_tag) { … }
int WriteBarrier::SharedMarkingFromCode(Address raw_host, Address raw_slot) { … }
int WriteBarrier::SharedFromCode(Address raw_host, Address raw_slot) { … }
#ifdef ENABLE_SLOW_DCHECKS
bool WriteBarrier::IsImmortalImmovableHeapObject(Tagged<HeapObject> object) {
MemoryChunk* chunk = MemoryChunk::FromHeapObject(object);
return chunk->InReadOnlySpace();
}
#endif
}
}