Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: runtime/vm/snapshot.h

Issue 2032153003: Use clustered serialization for full snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: round2 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.h
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 601eba53e172e54c056493899ef3398720a53c6b..1d8f585320b9aeaa431f494ad4678e5bdda10f2c 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -429,10 +429,7 @@ class SnapshotReader : public BaseReader {
// Get an object from the backward references list.
Object* GetBackRef(intptr_t id);
- // Read a full snap shot.
- RawApiError* ReadFullSnapshot();
-
- // Read a script snap shot.
+ // Read a script snapshot.
RawObject* ReadScriptSnapshot();
// Read version number of snapshot and verify.
@@ -650,38 +647,6 @@ class SnapshotReader : public BaseReader {
};
-class VmIsolateSnapshotReader : public SnapshotReader {
- public:
- VmIsolateSnapshotReader(Snapshot::Kind kind,
- const uint8_t* buffer,
- intptr_t size,
- const uint8_t* instructions_buffer,
- const uint8_t* data_buffer,
- Thread* thread);
- ~VmIsolateSnapshotReader();
-
- RawApiError* ReadVmIsolateSnapshot();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VmIsolateSnapshotReader);
-};
-
-
-class IsolateSnapshotReader : public SnapshotReader {
- public:
- IsolateSnapshotReader(Snapshot::Kind kind,
- const uint8_t* buffer,
- intptr_t size,
- const uint8_t* instructions_buffer,
- const uint8_t* data_buffer,
- Thread* thread);
- ~IsolateSnapshotReader();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(IsolateSnapshotReader);
-};
-
-
class ScriptSnapshotReader : public SnapshotReader {
public:
ScriptSnapshotReader(const uint8_t* buffer,
@@ -849,7 +814,6 @@ class ForwardList {
GrowableArray<Node*> nodes_;
intptr_t first_unprocessed_object_id_;
- friend class FullSnapshotWriter;
DISALLOW_COPY_AND_ASSIGN(ForwardList);
};
@@ -1075,7 +1039,6 @@ class SnapshotWriter : public BaseWriter {
bool can_send_any_object_; // True if any Dart instance can be sent.
bool writing_vm_isolate_;
- friend class FullSnapshotWriter;
friend class RawArray;
friend class RawClass;
friend class RawClosureData;
@@ -1109,63 +1072,6 @@ class SnapshotWriter : public BaseWriter {
};
-class FullSnapshotWriter {
- public:
- static const intptr_t kInitialSize = 64 * KB;
- FullSnapshotWriter(Snapshot::Kind kind,
- uint8_t** vm_isolate_snapshot_buffer,
- uint8_t** isolate_snapshot_buffer,
- ReAlloc alloc,
- InstructionsWriter* instructions_writer);
- ~FullSnapshotWriter();
-
- uint8_t** vm_isolate_snapshot_buffer() {
- return vm_isolate_snapshot_buffer_;
- }
-
- uint8_t** isolate_snapshot_buffer() {
- return isolate_snapshot_buffer_;
- }
-
- Thread* thread() const { return thread_; }
- Zone* zone() const { return thread_->zone(); }
- Isolate* isolate() const { return thread_->isolate(); }
- Heap* heap() const { return isolate()->heap(); }
-
- // Writes a full snapshot of the Isolate.
- void WriteFullSnapshot();
-
- intptr_t VmIsolateSnapshotSize() const {
- return vm_isolate_snapshot_size_;
- }
- intptr_t IsolateSnapshotSize() const {
- return isolate_snapshot_size_;
- }
-
- private:
- // Writes a snapshot of the VM Isolate.
- void WriteVmIsolateSnapshot();
-
- // Writes a full snapshot of a regular Dart Isolate.
- void WriteIsolateFullSnapshot();
-
- Thread* thread_;
- Snapshot::Kind kind_;
- uint8_t** vm_isolate_snapshot_buffer_;
- uint8_t** isolate_snapshot_buffer_;
- ReAlloc alloc_;
- intptr_t vm_isolate_snapshot_size_;
- intptr_t isolate_snapshot_size_;
- ForwardList* forward_list_;
- InstructionsWriter* instructions_writer_;
- Array& scripts_;
- Array& saved_symbol_table_;
- Array& new_vm_symbol_table_;
-
- DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter);
-};
-
-
class ScriptSnapshotWriter : public SnapshotWriter {
public:
static const intptr_t kInitialSize = 64 * KB;
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698