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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // Used for seralizing the external strings that hold the natives source. | 293 // Used for seralizing the external strings that hold the natives source. |
294 void VisitExternalOneByteString( | 294 void VisitExternalOneByteString( |
295 v8::String::ExternalOneByteStringResource** resource) override; | 295 v8::String::ExternalOneByteStringResource** resource) override; |
296 // We can't serialize a heap with external two byte strings. | 296 // We can't serialize a heap with external two byte strings. |
297 void VisitExternalTwoByteString( | 297 void VisitExternalTwoByteString( |
298 v8::String::ExternalStringResource** resource) override { | 298 v8::String::ExternalStringResource** resource) override { |
299 UNREACHABLE(); | 299 UNREACHABLE(); |
300 } | 300 } |
301 | 301 |
302 private: | 302 private: |
| 303 bool TryEncodeDeoptimizationEntry(HowToCode how_to_code, Address target, |
| 304 int skip); |
303 void SerializePrologue(AllocationSpace space, int size, Map* map); | 305 void SerializePrologue(AllocationSpace space, int size, Map* map); |
304 | 306 |
305 bool SerializeExternalNativeSourceString( | 307 bool SerializeExternalNativeSourceString( |
306 int builtin_count, | 308 int builtin_count, |
307 v8::String::ExternalOneByteStringResource** resource_pointer, | 309 v8::String::ExternalOneByteStringResource** resource_pointer, |
308 FixedArray* source_cache, int resource_index); | 310 FixedArray* source_cache, int resource_index); |
309 | 311 |
310 enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn }; | 312 enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn }; |
311 // This function outputs or skips the raw data between the last pointer and | 313 // This function outputs or skips the raw data between the last pointer and |
312 // up to the current position. It optionally can just return the number of | 314 // up to the current position. It optionally can just return the number of |
(...skipping 10 matching lines...) Expand all Loading... |
323 SnapshotByteSink* sink_; | 325 SnapshotByteSink* sink_; |
324 int reference_representation_; | 326 int reference_representation_; |
325 int bytes_processed_so_far_; | 327 int bytes_processed_so_far_; |
326 bool code_has_been_output_; | 328 bool code_has_been_output_; |
327 }; | 329 }; |
328 | 330 |
329 } // namespace internal | 331 } // namespace internal |
330 } // namespace v8 | 332 } // namespace v8 |
331 | 333 |
332 #endif // V8_SNAPSHOT_SERIALIZER_H_ | 334 #endif // V8_SNAPSHOT_SERIALIZER_H_ |
OLD | NEW |