summaryrefslogtreecommitdiff
path: root/deps/v8/src/snapshot.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/snapshot.h')
-rw-r--r--deps/v8/src/snapshot.h55
1 files changed, 11 insertions, 44 deletions
diff --git a/deps/v8/src/snapshot.h b/deps/v8/src/snapshot.h
index 590ecf1718..25a07cdd97 100644
--- a/deps/v8/src/snapshot.h
+++ b/deps/v8/src/snapshot.h
@@ -10,60 +10,27 @@
namespace v8 {
namespace internal {
-class Snapshot {
+class Snapshot : public AllStatic {
public:
// Initialize the Isolate from the internal snapshot. Returns false if no
// snapshot could be found.
static bool Initialize(Isolate* isolate);
-
- static bool HaveASnapshotToStartFrom();
-
// Create a new context using the internal partial snapshot.
static Handle<Context> NewContextFromSnapshot(Isolate* isolate);
- // 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_; }
- static void set_raw_data(const byte* raw_data) {
- raw_data_ = raw_data;
- }
- static const byte* context_data() { return context_data_; }
- static int context_size() { return context_size_; }
- static int context_raw_size() { return context_raw_size_; }
- static void set_context_raw_data(
- const byte* context_raw_data) {
- context_raw_data_ = context_raw_data;
- }
+ static bool HaveASnapshotToStartFrom();
- private:
- static const byte data_[];
- static const byte* raw_data_;
- static const byte context_data_[];
- static const byte* context_raw_data_;
- static const int new_space_used_;
- static const int pointer_space_used_;
- static const int data_space_used_;
- static const int code_space_used_;
- static const int map_space_used_;
- static const int cell_space_used_;
- static const int property_cell_space_used_;
- static const int lo_space_used_;
- static const int context_new_space_used_;
- static const int context_pointer_space_used_;
- static const int context_data_space_used_;
- static const int context_code_space_used_;
- static const int context_map_space_used_;
- static const int context_cell_space_used_;
- static const int context_property_cell_space_used_;
- static const int context_lo_space_used_;
- static const int size_;
- static const int raw_size_;
- static const int context_size_;
- static const int context_raw_size_;
+ // To be implemented by the snapshot source.
+ static const v8::StartupData SnapshotBlob();
+
+ static v8::StartupData CreateSnapshotBlob(
+ const Vector<const byte> startup_data,
+ const Vector<const byte> context_data);
- static void ReserveSpaceForLinkedInSnapshot(Deserializer* deserializer);
+ static Vector<const byte> ExtractStartupData(const v8::StartupData* data);
+ static Vector<const byte> ExtractContextData(const v8::StartupData* data);
+ private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
};