Line data Source code
1 : // Copyright 2017 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #ifndef V8_SNAPSHOT_STARTUP_DESERIALIZER_H_
6 : #define V8_SNAPSHOT_STARTUP_DESERIALIZER_H_
7 :
8 : #include "src/snapshot/deserializer.h"
9 : #include "src/snapshot/snapshot.h"
10 :
11 : namespace v8 {
12 : namespace internal {
13 :
14 : // Initializes an isolate with context-independent data from a given snapshot.
15 62366 : class StartupDeserializer final : public Deserializer {
16 : public:
17 : explicit StartupDeserializer(const SnapshotData* startup_data)
18 62358 : : Deserializer(startup_data, false) {}
19 :
20 : // Deserialize the snapshot into an empty heap.
21 : void DeserializeInto(Isolate* isolate);
22 :
23 : private:
24 : void FlushICache();
25 : void LogNewMapEvents();
26 : };
27 :
28 : } // namespace internal
29 : } // namespace v8
30 :
31 : #endif // V8_SNAPSHOT_STARTUP_DESERIALIZER_H_
|