#include "src/heap/array-buffer-sweeper.h"
#include <atomic>
#include <memory>
#include <utility>
#include "src/base/logging.h"
#include "src/heap/gc-tracer-inl.h"
#include "src/heap/gc-tracer.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap.h"
#include "src/objects/js-array-buffer.h"
namespace v8 {
namespace internal {
void ArrayBufferList::Append(ArrayBufferExtension* extension) { … }
void ArrayBufferList::Append(ArrayBufferList& list) { … }
bool ArrayBufferList::ContainsSlow(ArrayBufferExtension* extension) const { … }
size_t ArrayBufferList::BytesSlow() const { … }
bool ArrayBufferList::IsEmpty() const { … }
class ArrayBufferSweeper::SweepingState final { … };
class ArrayBufferSweeper::SweepingState::SweepingJob final : public JobTask { … };
void ArrayBufferSweeper::SweepingState::SweepingJob::Run(
JobDelegate* delegate) { … }
ArrayBufferSweeper::SweepingState::SweepingState(
Heap* heap, ArrayBufferList young, ArrayBufferList old,
ArrayBufferSweeper::SweepingType type,
ArrayBufferSweeper::TreatAllYoungAsPromoted treat_all_young_as_promoted,
uint64_t trace_id)
: … { … }
ArrayBufferSweeper::ArrayBufferSweeper(Heap* heap) : … { … }
ArrayBufferSweeper::~ArrayBufferSweeper() { … }
void ArrayBufferSweeper::EnsureFinished() { … }
void ArrayBufferSweeper::Finish() { … }
void ArrayBufferSweeper::FinishIfDone() { … }
void ArrayBufferSweeper::RequestSweep(
SweepingType type, TreatAllYoungAsPromoted treat_all_young_as_promoted) { … }
void ArrayBufferSweeper::Prepare(
SweepingType type, TreatAllYoungAsPromoted treat_all_young_as_promoted,
uint64_t trace_id) { … }
void ArrayBufferSweeper::Finalize() { … }
void ArrayBufferSweeper::ReleaseAll(ArrayBufferList* list) { … }
void ArrayBufferSweeper::Append(Tagged<JSArrayBuffer> object,
ArrayBufferExtension* extension) { … }
void ArrayBufferSweeper::Detach(ArrayBufferExtension* extension) { … }
void ArrayBufferSweeper::IncrementExternalMemoryCounters(size_t bytes) { … }
void ArrayBufferSweeper::DecrementExternalMemoryCounters(size_t bytes) { … }
void ArrayBufferSweeper::FinalizeAndDelete(ArrayBufferExtension* extension) { … }
void ArrayBufferSweeper::SweepingState::SweepingJob::Sweep(
JobDelegate* delegate) { … }
bool ArrayBufferSweeper::SweepingState::SweepingJob::SweepFull(
JobDelegate* delegate) { … }
bool ArrayBufferSweeper::SweepingState::SweepingJob::SweepListFull(
JobDelegate* delegate, ArrayBufferList& list) { … }
bool ArrayBufferSweeper::SweepingState::SweepingJob::SweepYoung(
JobDelegate* delegate) { … }
uint64_t ArrayBufferSweeper::GetTraceIdForFlowEvent(
GCTracer::Scope::ScopeId scope_id) const { … }
}
}