OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_SERIALIZE_H_ | 5 #ifndef V8_SERIALIZE_H_ |
6 #define V8_SERIALIZE_H_ | 6 #define V8_SERIALIZE_H_ |
7 | 7 |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/hashmap.h" | 9 #include "src/hashmap.h" |
10 #include "src/heap-profiler.h" | 10 #include "src/heap-profiler.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 void Serialize(); | 423 void Serialize(); |
424 void VisitPointers(Object** start, Object** end); | 424 void VisitPointers(Object** start, Object** end); |
425 void VisitEmbeddedPointer(RelocInfo* target); | 425 void VisitEmbeddedPointer(RelocInfo* target); |
426 void VisitExternalReference(Address* p); | 426 void VisitExternalReference(Address* p); |
427 void VisitExternalReference(RelocInfo* rinfo); | 427 void VisitExternalReference(RelocInfo* rinfo); |
428 void VisitCodeTarget(RelocInfo* target); | 428 void VisitCodeTarget(RelocInfo* target); |
429 void VisitCodeEntry(Address entry_address); | 429 void VisitCodeEntry(Address entry_address); |
430 void VisitCell(RelocInfo* rinfo); | 430 void VisitCell(RelocInfo* rinfo); |
431 void VisitRuntimeEntry(RelocInfo* reloc); | 431 void VisitRuntimeEntry(RelocInfo* reloc); |
432 // Used for seralizing the external strings that hold the natives source. | 432 // Used for seralizing the external strings that hold the natives source. |
433 void VisitExternalAsciiString( | 433 void VisitExternalOneByteString( |
434 v8::String::ExternalAsciiStringResource** resource); | 434 v8::String::ExternalOneByteStringResource** resource); |
435 // We can't serialize a heap with external two byte strings. | 435 // We can't serialize a heap with external two byte strings. |
436 void VisitExternalTwoByteString( | 436 void VisitExternalTwoByteString( |
437 v8::String::ExternalStringResource** resource) { | 437 v8::String::ExternalStringResource** resource) { |
438 UNREACHABLE(); | 438 UNREACHABLE(); |
439 } | 439 } |
440 | 440 |
441 private: | 441 private: |
442 enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn }; | 442 enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn }; |
443 // This function outputs or skips the raw data between the last pointer and | 443 // This function outputs or skips the raw data between the last pointer and |
444 // up to the current position. It optionally can just return the number of | 444 // up to the current position. It optionally can just return the number of |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 static const int kCheckSumOffset = 0; | 670 static const int kCheckSumOffset = 0; |
671 static const int kReservationsOffset = 1; | 671 static const int kReservationsOffset = 1; |
672 static const int kHeaderEntries = 8; | 672 static const int kHeaderEntries = 8; |
673 | 673 |
674 ScriptData* script_data_; | 674 ScriptData* script_data_; |
675 bool owns_script_data_; | 675 bool owns_script_data_; |
676 }; | 676 }; |
677 } } // namespace v8::internal | 677 } } // namespace v8::internal |
678 | 678 |
679 #endif // V8_SERIALIZE_H_ | 679 #endif // V8_SERIALIZE_H_ |
OLD | NEW |