OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_PARTIAL_SERIALIZER_H_ | 5 #ifndef V8_SNAPSHOT_PARTIAL_SERIALIZER_H_ |
6 #define V8_SNAPSHOT_PARTIAL_SERIALIZER_H_ | 6 #define V8_SNAPSHOT_PARTIAL_SERIALIZER_H_ |
7 | 7 |
8 #include "src/address-map.h" | 8 #include "src/address-map.h" |
9 #include "src/snapshot/serializer.h" | 9 #include "src/snapshot/serializer.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 class PartialSerializer : public Serializer { | 14 class PartialSerializer : public Serializer { |
15 public: | 15 public: |
16 PartialSerializer(Isolate* isolate, Serializer* startup_snapshot_serializer, | 16 PartialSerializer(Isolate* isolate, Serializer* startup_snapshot_serializer); |
17 SnapshotByteSink* sink); | |
18 | 17 |
19 ~PartialSerializer() override; | 18 ~PartialSerializer() override; |
20 | 19 |
21 // Serialize the objects reachable from a single object pointer. | 20 // Serialize the objects reachable from a single object pointer. |
22 void Serialize(Object** o); | 21 void Serialize(Object** o); |
23 | 22 |
24 private: | 23 private: |
25 class PartialCacheIndexMap : public AddressMapBase { | 24 class PartialCacheIndexMap : public AddressMapBase { |
26 public: | 25 public: |
27 PartialCacheIndexMap() : map_(base::HashMap::PointersMatch) {} | 26 PartialCacheIndexMap() : map_(base::HashMap::PointersMatch) {} |
(...skipping 24 matching lines...) Expand all Loading... |
52 Serializer* startup_serializer_; | 51 Serializer* startup_serializer_; |
53 PartialCacheIndexMap partial_cache_index_map_; | 52 PartialCacheIndexMap partial_cache_index_map_; |
54 int next_partial_cache_index_; | 53 int next_partial_cache_index_; |
55 DISALLOW_COPY_AND_ASSIGN(PartialSerializer); | 54 DISALLOW_COPY_AND_ASSIGN(PartialSerializer); |
56 }; | 55 }; |
57 | 56 |
58 } // namespace internal | 57 } // namespace internal |
59 } // namespace v8 | 58 } // namespace v8 |
60 | 59 |
61 #endif // V8_SNAPSHOT_PARTIAL_SERIALIZER_H_ | 60 #endif // V8_SNAPSHOT_PARTIAL_SERIALIZER_H_ |
OLD | NEW |