| Index: runtime/vm/snapshot.h
|
| diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
|
| index f612073aa625f5b310bc441067282e8e61547096..25aff579a9bd46195c690b84c7252f380f4bb339 100644
|
| --- a/runtime/vm/snapshot.h
|
| +++ b/runtime/vm/snapshot.h
|
| @@ -32,6 +32,7 @@ class Library;
|
| class Object;
|
| class PassiveObject;
|
| class ObjectStore;
|
| +class MegamorphicCache;
|
| class PageSpace;
|
| class RawApiError;
|
| class RawArray;
|
| @@ -339,6 +340,8 @@ class SnapshotReader : public BaseReader {
|
| ExternalTypedData* DataHandle() { return &data_; }
|
| TypedData* TypedDataHandle() { return &typed_data_; }
|
| Code* CodeHandle() { return &code_; }
|
| + Function* FunctionHandle() { return &function_; }
|
| + MegamorphicCache* MegamorphicCacheHandle() { return &megamorphic_cache_; }
|
| Snapshot::Kind kind() const { return kind_; }
|
| bool snapshot_code() const { return snapshot_code_; }
|
|
|
| @@ -521,6 +524,8 @@ class SnapshotReader : public BaseReader {
|
| ExternalTypedData& data_; // Temporary stream data handle.
|
| TypedData& typed_data_; // Temporary typed data handle.
|
| Code& code_; // Temporary code handle.
|
| + Function& function_; // Temporary function handle.
|
| + MegamorphicCache& megamorphic_cache_; // Temporary megamorphic cache handle.
|
| UnhandledException& error_; // Error handle.
|
| intptr_t max_vm_isolate_object_id_;
|
| ZoneGrowableArray<BackRefNode>* backward_references_;
|
| @@ -780,7 +785,7 @@ class InstructionsWriter : public ZoneAllocated {
|
| ReAlloc alloc,
|
| intptr_t initial_size)
|
| : stream_(buffer, alloc, initial_size),
|
| - next_offset_(0),
|
| + next_offset_(HeaderSize()),
|
| instructions_() {
|
| ASSERT(buffer != NULL);
|
| ASSERT(alloc != NULL);
|
| @@ -803,6 +808,11 @@ class InstructionsWriter : public ZoneAllocated {
|
|
|
| void WriteAssembly();
|
|
|
| + intptr_t HeaderSize() {
|
| + ASSERT(OS::kMaxPreferredCodeAlignment > sizeof(uint64_t));
|
| + return OS::kMaxPreferredCodeAlignment;
|
| + }
|
| +
|
| private:
|
| struct InstructionsData {
|
| explicit InstructionsData(RawInstructions* insns)
|
|
|