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

Side by Side Diff: src/snapshot.h

Issue 792563002: Revert of Use same blob format for internal and external snapshots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/serialize.h ('k') | src/snapshot-common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #ifndef V8_SNAPSHOT_H_ 7 #ifndef V8_SNAPSHOT_H_
8 #define V8_SNAPSHOT_H_ 8 #define V8_SNAPSHOT_H_
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 class Snapshot { 13 class Snapshot {
14 public: 14 public:
15 // Initialize the Isolate from the internal snapshot. Returns false if no 15 // Initialize the Isolate from the internal snapshot. Returns false if no
16 // snapshot could be found. 16 // snapshot could be found.
17 static bool Initialize(Isolate* isolate); 17 static bool Initialize(Isolate* isolate);
18
19 static bool HaveASnapshotToStartFrom();
20
18 // Create a new context using the internal partial snapshot. 21 // Create a new context using the internal partial snapshot.
19 static Handle<Context> NewContextFromSnapshot(Isolate* isolate); 22 static Handle<Context> NewContextFromSnapshot(Isolate* isolate);
20 23
21 static const Vector<const byte> StartupSnapshot(); 24 private:
22 static const Vector<const byte> ContextSnapshot(); 25 static const byte data_[];
23 static bool HaveASnapshotToStartFrom(); 26 static const int size_;
27 static const byte context_data_[];
28 static const int context_size_;
24 29
25 static const v8::StartupData SnapshotBlob();
26
27 private:
28 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot); 30 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
29 }; 31 };
30 32
31 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 33 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
32 void SetSnapshotFromFile(StartupData* snapshot_blob); 34 void SetSnapshotFromFile(StartupData* snapshot_blob);
33 #endif 35 #endif
34 36
35 } } // namespace v8::internal 37 } } // namespace v8::internal
36 38
37 #endif // V8_SNAPSHOT_H_ 39 #endif // V8_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « src/serialize.h ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698