| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 572 |
| 573 // Some roots should not be serialized, because their actual value depends on | 573 // Some roots should not be serialized, because their actual value depends on |
| 574 // absolute addresses and they are reset after deserialization, anyway. | 574 // absolute addresses and they are reset after deserialization, anyway. |
| 575 bool ShouldBeSkipped(Object** current); | 575 bool ShouldBeSkipped(Object** current); |
| 576 | 576 |
| 577 Isolate* isolate_; | 577 Isolate* isolate_; |
| 578 // Keep track of the fullness of each space in order to generate | 578 // Keep track of the fullness of each space in order to generate |
| 579 // relative addresses for back references. | 579 // relative addresses for back references. |
| 580 int fullness_[LAST_SPACE + 1]; | 580 int fullness_[LAST_SPACE + 1]; |
| 581 SnapshotByteSink* sink_; | 581 SnapshotByteSink* sink_; |
| 582 int current_root_index_; | |
| 583 ExternalReferenceEncoder* external_reference_encoder_; | 582 ExternalReferenceEncoder* external_reference_encoder_; |
| 584 static bool serialization_enabled_; | 583 static bool serialization_enabled_; |
| 585 // Did we already make use of the fact that serialization was not enabled? | 584 // Did we already make use of the fact that serialization was not enabled? |
| 586 static bool too_late_to_enable_now_; | 585 static bool too_late_to_enable_now_; |
| 587 SerializationAddressMapper address_mapper_; | 586 SerializationAddressMapper address_mapper_; |
| 588 intptr_t root_index_wave_front_; | 587 intptr_t root_index_wave_front_; |
| 589 void Pad(); | 588 void Pad(); |
| 590 | 589 |
| 591 friend class ObjectSerializer; | 590 friend class ObjectSerializer; |
| 592 friend class Deserializer; | 591 friend class Deserializer; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 private: | 663 private: |
| 665 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 664 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 666 return false; | 665 return false; |
| 667 } | 666 } |
| 668 }; | 667 }; |
| 669 | 668 |
| 670 | 669 |
| 671 } } // namespace v8::internal | 670 } } // namespace v8::internal |
| 672 | 671 |
| 673 #endif // V8_SERIALIZE_H_ | 672 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |