| Index: runtime/vm/snapshot.h
|
| ===================================================================
|
| --- runtime/vm/snapshot.h (revision 39714)
|
| +++ runtime/vm/snapshot.h (working copy)
|
| @@ -428,7 +428,7 @@
|
| };
|
|
|
|
|
| -class BaseWriter {
|
| +class BaseWriter : public StackResource {
|
| public:
|
| // Size of the snapshot.
|
| intptr_t BytesWritten() const { return stream_.bytes_written(); }
|
| @@ -496,7 +496,9 @@
|
| protected:
|
| BaseWriter(uint8_t** buffer,
|
| ReAlloc alloc,
|
| - intptr_t initial_size) : stream_(buffer, alloc, initial_size) {
|
| + intptr_t initial_size)
|
| + : StackResource(Isolate::Current()),
|
| + stream_(buffer, alloc, initial_size) {
|
| ASSERT(buffer != NULL);
|
| ASSERT(alloc != NULL);
|
| }
|
| @@ -522,10 +524,8 @@
|
|
|
| class ForwardList {
|
| public:
|
| - explicit ForwardList(intptr_t first_object_id)
|
| - : first_object_id_(first_object_id),
|
| - nodes_(),
|
| - first_unprocessed_object_id_(first_object_id) {}
|
| + explicit ForwardList(intptr_t first_object_id);
|
| + ~ForwardList();
|
|
|
| class Node : public ZoneAllocated {
|
| public:
|
| @@ -631,10 +631,12 @@
|
| intptr_t tags);
|
| void WriteInstanceRef(RawObject* raw, RawClass* cls);
|
|
|
| + Isolate* isolate() const { return isolate_; }
|
| ObjectStore* object_store() const { return object_store_; }
|
|
|
| private:
|
| Snapshot::Kind kind_;
|
| + Isolate* isolate_;
|
| ObjectStore* object_store_; // Object store for common classes.
|
| ClassTable* class_table_; // Class table for the class index to class lookup.
|
| ForwardList forward_list_;
|
|
|