#ifndef V8_HEAP_HEAP_WRITE_BARRIER_H_
#define V8_HEAP_HEAP_WRITE_BARRIER_H_
#include "include/v8-internal.h"
#include "src/common/globals.h"
#include "src/objects/heap-object.h"
namespace v8 {
namespace internal {
class ArrayBufferExtension;
class InstructionStream;
class DescriptorArray;
class EphemeronHashTable;
class FixedArray;
class Heap;
class JSArrayBuffer;
class Map;
class MarkCompactCollector;
class MarkingBarrier;
class RelocInfo;
void WriteBarrierForCode(Tagged<InstructionStream> host, RelocInfo* rinfo,
Tagged<Object> value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
void WriteBarrierForCode(Tagged<InstructionStream> host, RelocInfo* rinfo,
Tagged<HeapObject> value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
void CombinedWriteBarrier(Tagged<HeapObject> object, ObjectSlot slot,
Tagged<Object> value, WriteBarrierMode mode);
void CombinedWriteBarrier(Tagged<HeapObject> object, MaybeObjectSlot slot,
Tagged<MaybeObject> value, WriteBarrierMode mode);
void CombinedWriteBarrier(HeapObjectLayout* object, TaggedMemberBase* slot,
Tagged<Object> value, WriteBarrierMode mode);
void CombinedEphemeronWriteBarrier(Tagged<EphemeronHashTable> object,
ObjectSlot slot, Tagged<Object> value,
WriteBarrierMode mode);
void IndirectPointerWriteBarrier(Tagged<HeapObject> host,
IndirectPointerSlot slot,
Tagged<HeapObject> value,
WriteBarrierMode mode);
void JSDispatchHandleWriteBarrier(Tagged<HeapObject> host,
JSDispatchHandle handle,
WriteBarrierMode mode);
void GenerationalBarrierForCode(Tagged<InstructionStream> host,
RelocInfo* rinfo, Tagged<HeapObject> object);
inline bool IsReadOnlyHeapObject(Tagged<HeapObject> object);
class V8_EXPORT_PRIVATE WriteBarrier { … };
}
}
#endif