5#ifndef RUNTIME_VM_SNAPSHOT_H_
6#define RUNTIME_VM_SNAPSHOT_H_
42 static constexpr intptr_t
kKindSize =
sizeof(int64_t);
72#if !defined(DART_COMPRESSED_POINTERS)
79 const uint8_t*
Addr()
const {
return reinterpret_cast<const uint8_t*
>(
this); }
96 reinterpret_cast<const T*
>(
reinterpret_cast<uword>(
this) +
offset));
105 DISALLOW_COPY_AND_ASSIGN(Snapshot);
110 if (vm_kind == isolate_kind)
return true;
123 ASSERT(message_ ==
nullptr);
126 std::unique_ptr<Message>
StealMessage() {
return std::move(message_); }
129 std::unique_ptr<Message> message_;
void set_message(std::unique_ptr< Message > message)
std::unique_ptr< Message > StealMessage()
static bool IsFull(Kind kind)
static const Snapshot * SetupFromBuffer(const void *raw_memory)
const uint8_t * Addr() const
static constexpr int32_t kMagicValue
static const char * KindToCString(Kind kind)
static constexpr intptr_t kMagicSize
static bool IncludesStringsInROData(Kind kind)
static constexpr intptr_t kLengthOffset
static bool IncludesCode(Kind kind)
static constexpr intptr_t kMagicOffset
static constexpr intptr_t kKindOffset
int64_t large_length() const
const uint8_t * DataImage() const
static constexpr intptr_t kLengthSize
void set_length(intptr_t value)
static constexpr intptr_t kHeaderSize
static constexpr intptr_t kKindSize
void set_kind(Kind value)
static constexpr T RoundUp(T x, uintptr_t alignment, uintptr_t offset=0)
static constexpr intptr_t kObjectStartAlignment
static T LoadUnaligned(const T *ptr)
static void StoreUnaligned(T *ptr, T value)
static bool IsSnapshotCompatible(Snapshot::Kind vm_kind, Snapshot::Kind isolate_kind)