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

Unified Diff: src/snapshot.h

Issue 293993021: Support external startup data in V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final rebase (I hope) w/ various fixes. Created 6 years, 7 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/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot.h
diff --git a/src/snapshot.h b/src/snapshot.h
index 17191f0be13c476c55a3f8daf9beb75eb19c21a2..b785cf57008999f622b1d466314e9239a76a2f67 100644
--- a/src/snapshot.h
+++ b/src/snapshot.h
@@ -12,23 +12,16 @@ namespace internal {
class Snapshot {
public:
- // Initialize the VM from the given snapshot file. If snapshot_file is
- // NULL, use the internal snapshot instead. Returns false if no snapshot
+ // Initialize the VM from the internal snapshot. Returns false if no snapshot
// could be found.
- static bool Initialize(const char* snapshot_file = NULL);
+ static bool Initialize();
static bool HaveASnapshotToStartFrom();
// Create a new context using the internal partial snapshot.
static Handle<Context> NewContextFromSnapshot(Isolate* isolate);
- // Returns whether or not the snapshot is enabled.
- static bool IsEnabled() { return size_ != 0; }
-
- // Write snapshot to the given file. Returns true if snapshot was written
- // successfully.
- static bool WriteToFile(const char* snapshot_file);
-
+ // These methods support COMPRESS_STARTUP_DATA_BZ2.
static const byte* data() { return data_; }
static int size() { return size_; }
static int raw_size() { return raw_size_; }
@@ -72,6 +65,10 @@ class Snapshot {
DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
};
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+void SetSnapshotFromFile(StartupData* snapshot_blob);
+#endif
+
} } // namespace v8::internal
#endif // V8_SNAPSHOT_H_
« no previous file with comments | « src/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698