| 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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 | 693 |
| 694 List<uint32_t>* stub_keys() { return &stub_keys_; } | 694 List<uint32_t>* stub_keys() { return &stub_keys_; } |
| 695 int num_internalized_strings() const { return num_internalized_strings_; } | 695 int num_internalized_strings() const { return num_internalized_strings_; } |
| 696 | 696 |
| 697 private: | 697 private: |
| 698 CodeSerializer(Isolate* isolate, SnapshotByteSink* sink, String* source, | 698 CodeSerializer(Isolate* isolate, SnapshotByteSink* sink, String* source, |
| 699 Code* main_code) | 699 Code* main_code) |
| 700 : Serializer(isolate, sink), | 700 : Serializer(isolate, sink), |
| 701 source_(source), | 701 source_(source), |
| 702 main_code_(main_code), | 702 main_code_(main_code), |
| 703 num_internalized_strings_(0) { | 703 num_internalized_strings_(0) {} |
| 704 InitializeCodeAddressMap(); | |
| 705 } | |
| 706 | 704 |
| 707 virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, | 705 virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, |
| 708 WhereToPoint where_to_point, int skip); | 706 WhereToPoint where_to_point, int skip); |
| 709 | 707 |
| 710 void SerializeBuiltin(int builtin_index, HowToCode how_to_code, | 708 void SerializeBuiltin(int builtin_index, HowToCode how_to_code, |
| 711 WhereToPoint where_to_point); | 709 WhereToPoint where_to_point); |
| 712 void SerializeIC(Code* ic, HowToCode how_to_code, | 710 void SerializeIC(Code* ic, HowToCode how_to_code, |
| 713 WhereToPoint where_to_point); | 711 WhereToPoint where_to_point); |
| 714 void SerializeCodeStub(uint32_t stub_key, HowToCode how_to_code, | 712 void SerializeCodeStub(uint32_t stub_key, HowToCode how_to_code, |
| 715 WhereToPoint where_to_point); | 713 WhereToPoint where_to_point); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 // Following the header, we store, in sequential order | 827 // Following the header, we store, in sequential order |
| 830 // - code stub keys | 828 // - code stub keys |
| 831 // - serialization payload | 829 // - serialization payload |
| 832 | 830 |
| 833 ScriptData* script_data_; | 831 ScriptData* script_data_; |
| 834 bool owns_script_data_; | 832 bool owns_script_data_; |
| 835 }; | 833 }; |
| 836 } } // namespace v8::internal | 834 } } // namespace v8::internal |
| 837 | 835 |
| 838 #endif // V8_SERIALIZE_H_ | 836 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |