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

Unified Diff: src/mksnapshot.cc

Issue 373713006: Introduce code serializer/deserializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and rebased Created 6 years, 5 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 | « src/full-codegen.cc ('k') | src/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index 5ed3855e9ef4397225d19acb06969bb10ab25d3c..36c03763c751154840200c8a0dea82b756c0270c 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -32,17 +32,6 @@ class Compressor {
};
-class ListSnapshotSink : public i::SnapshotByteSink {
- public:
- explicit ListSnapshotSink(i::List<char>* data) : data_(data) { }
- virtual ~ListSnapshotSink() {}
- virtual void Put(int byte, const char* description) { data_->Add(byte); }
- virtual int Position() { return data_->length(); }
- private:
- i::List<char>* data_;
-};
-
-
class SnapshotWriter {
public:
explicit SnapshotWriter(const char* snapshot_file)
@@ -93,7 +82,7 @@ class SnapshotWriter {
return;
i::List<char> startup_blob;
- ListSnapshotSink sink(&startup_blob);
+ i::ListSnapshotSink sink(&startup_blob);
int spaces[] = {
i::NEW_SPACE, i::OLD_POINTER_SPACE, i::OLD_DATA_SPACE, i::CODE_SPACE,
@@ -417,12 +406,12 @@ int main(int argc, char** argv) {
// This results in a somewhat smaller snapshot, probably because it gets
// rid of some things that are cached between garbage collections.
i::List<char> snapshot_data;
- ListSnapshotSink snapshot_sink(&snapshot_data);
+ i::ListSnapshotSink snapshot_sink(&snapshot_data);
i::StartupSerializer ser(internal_isolate, &snapshot_sink);
ser.SerializeStrongReferences();
i::List<char> context_data;
- ListSnapshotSink contex_sink(&context_data);
+ i::ListSnapshotSink contex_sink(&context_data);
i::PartialSerializer context_ser(internal_isolate, &ser, &contex_sink);
context_ser.Serialize(&raw_context);
ser.SerializeWeakReferences();
« no previous file with comments | « src/full-codegen.cc ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698