5#ifndef V8_OBJECTS_INSTRUCTION_STREAM_H_
6#define V8_OBJECTS_INSTRUCTION_STREAM_H_
22class WritableJitAllocation;
107 inline int Size()
const;
128#define ISTREAM_FIELDS(V) \
129 V(kCodeOffset, kProtectedPointerSize) \
130 V(kRelocationInfoOffset, kProtectedPointerSize) \
133 V(kBodySizeOffset, kUInt32Size) \
134 V(kConstantPoolOffsetOffset, V8_EMBEDDED_CONSTANT_POOL_BOOL ? kIntSize : 0) \
135 V(kUnalignedSize, OBJECT_POINTER_PADDING(kUnalignedSize)) \
164 void RegisterAddress(Address address);
165 void ResolveAddress(Address address);
169 std::set<Address> delayed_write_barriers_;
188 WriteBarrierPromise& promise,
WriteBarrierPromise()=default
WriteBarrierPromise(WriteBarrierPromise &&) V8_NOEXCEPT=default
void RegisterAddress(Address address)
void ResolveAddress(Address address)
Tagged< Object > raw_code(AcquireLoadTag tag) const
static PtrComprCageBase main_cage_base()
static constexpr int kCodeAlignmentMinusCodeHeader
static NEVER_READ_ONLY_SPACE constexpr bool kOnHeapBodyIsContiguous
uint8_t * relocation_start() const
uint8_t * relocation_end() const
static constexpr bool kOffHeapBodyIsContiguous
void RelocateFromDescWriteBarriers(Heap *heap, const CodeDesc &desc, Address constant_pool, WriteBarrierPromise &promise, const DisallowGarbageCollection &no_gc)
bool TryGetCode(Tagged< Code > *code_out, AcquireLoadTag tag) const
OBJECT_CONSTRUCTORS(InstructionStream, TrustedObject)
static constexpr int kMetadataAlignment
Address constant_pool() const
static constexpr int TrailingPaddingSizeFor(uint32_t body_size)
static Tagged< InstructionStream > FromTargetAddress(Address address)
Address instruction_start() const
bool TryGetCodeUnchecked(Tagged< Code > *code_out, AcquireLoadTag tag) const
static Tagged< InstructionStream > FromEntryAddress(Address location_of_address)
V8_INLINE void Finalize(Tagged< Code > code, Tagged< TrustedByteArray > reloc_info, CodeDesc desc, Heap *heap)
static constexpr bool kBodyIsContiguous
void Relocate(WritableJitAllocation &jit_allocation, intptr_t delta)
V8_INLINE bool IsFullyInitialized()
int relocation_size() const
WriteBarrierPromise RelocateFromDesc(WritableJitAllocation &jit_allocation, Heap *heap, const CodeDesc &desc, Address constant_pool, const DisallowGarbageCollection &no_gc)
static constexpr int SizeFor(int body_size)
Tagged< TrustedByteArray > relocation_info() const
Tagged< TrustedByteArray > unchecked_relocation_info() const
static V8_INLINE Tagged< InstructionStream > Initialize(Tagged< HeapObject > self, Tagged< Map > map, uint32_t body_size, int constant_pool_offset, Tagged< TrustedByteArray > reloc_info)
static constexpr int kHeaderSize
#define ISTREAM_FIELDS(V)
constexpr intptr_t kCodeAlignment
#define DECL_VERIFIER(Name)
#define NEVER_READ_ONLY_SPACE
#define DECL_PRIMITIVE_GETTER(name, type)
#define DECL_PRINTER(Name)
constexpr T RoundUp(T x, intptr_t m)
#define DEFINE_FIELD_OFFSET_CONSTANTS(StartOffset, LIST_MACRO)