OLD | NEW |
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 #ifndef V8_SNAPSHOT_SNAPSHOT_H_ |
| 6 #define V8_SNAPSHOT_SNAPSHOT_H_ |
| 7 |
5 #include "src/isolate.h" | 8 #include "src/isolate.h" |
6 #include "src/snapshot/serialize.h" | 9 #include "src/snapshot/serialize.h" |
7 | 10 |
8 #ifndef V8_SNAPSHOT_SNAPSHOT_H_ | |
9 #define V8_SNAPSHOT_SNAPSHOT_H_ | |
10 | |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
| 14 // Forward declarations. |
| 15 class Isolate; |
| 16 class PartialSerializer; |
| 17 class StartupSerializer; |
| 18 |
14 class Snapshot : public AllStatic { | 19 class Snapshot : public AllStatic { |
15 public: | 20 public: |
16 class Metadata { | 21 class Metadata { |
17 public: | 22 public: |
18 explicit Metadata(uint32_t data = 0) : data_(data) {} | 23 explicit Metadata(uint32_t data = 0) : data_(data) {} |
19 bool embeds_script() { return EmbedsScriptBits::decode(data_); } | 24 bool embeds_script() { return EmbedsScriptBits::decode(data_); } |
20 void set_embeds_script(bool v) { | 25 void set_embeds_script(bool v) { |
21 data_ = EmbedsScriptBits::update(data_, v); | 26 data_ = EmbedsScriptBits::update(data_, v); |
22 } | 27 } |
23 | 28 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot); | 90 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot); |
86 }; | 91 }; |
87 | 92 |
88 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 93 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
89 void SetSnapshotFromFile(StartupData* snapshot_blob); | 94 void SetSnapshotFromFile(StartupData* snapshot_blob); |
90 #endif | 95 #endif |
91 | 96 |
92 } } // namespace v8::internal | 97 } } // namespace v8::internal |
93 | 98 |
94 #endif // V8_SNAPSHOT_SNAPSHOT_H_ | 99 #endif // V8_SNAPSHOT_SNAPSHOT_H_ |
OLD | NEW |