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_SERIALIZER_H_ | 5 #ifndef V8_SNAPSHOT_SERIALIZER_H_ |
6 #define V8_SNAPSHOT_SERIALIZER_H_ | 6 #define V8_SNAPSHOT_SERIALIZER_H_ |
7 | 7 |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 #include "src/log.h" | 9 #include "src/log.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 private: | 151 private: |
152 static const int kMaxRecursionDepth = 32; | 152 static const int kMaxRecursionDepth = 32; |
153 Serializer* serializer_; | 153 Serializer* serializer_; |
154 }; | 154 }; |
155 | 155 |
156 virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, | 156 virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, |
157 WhereToPoint where_to_point, int skip) = 0; | 157 WhereToPoint where_to_point, int skip) = 0; |
158 | 158 |
159 void VisitPointers(Object** start, Object** end) override; | 159 void VisitRootPointers(Root root, Object** start, Object** end) override; |
160 | 160 |
161 void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where, | 161 void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where, |
162 int skip); | 162 int skip); |
163 | 163 |
164 void PutSmi(Smi* smi); | 164 void PutSmi(Smi* smi); |
165 | 165 |
166 void PutBackReference(HeapObject* object, SerializerReference reference); | 166 void PutBackReference(HeapObject* object, SerializerReference reference); |
167 | 167 |
168 void PutAttachedReference(SerializerReference reference, | 168 void PutAttachedReference(SerializerReference reference, |
169 HowToCode how_to_code, WhereToPoint where_to_point); | 169 HowToCode how_to_code, WhereToPoint where_to_point); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 SnapshotByteSink* sink_; | 314 SnapshotByteSink* sink_; |
315 int reference_representation_; | 315 int reference_representation_; |
316 int bytes_processed_so_far_; | 316 int bytes_processed_so_far_; |
317 bool code_has_been_output_; | 317 bool code_has_been_output_; |
318 }; | 318 }; |
319 | 319 |
320 } // namespace internal | 320 } // namespace internal |
321 } // namespace v8 | 321 } // namespace v8 |
322 | 322 |
323 #endif // V8_SNAPSHOT_SERIALIZER_H_ | 323 #endif // V8_SNAPSHOT_SERIALIZER_H_ |
OLD | NEW |