| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 void InitializeAllocators(); | 566 void InitializeAllocators(); |
| 567 // This will return the space for an object. | 567 // This will return the space for an object. |
| 568 static int SpaceOfObject(HeapObject* object); | 568 static int SpaceOfObject(HeapObject* object); |
| 569 int Allocate(int space, int size); | 569 int Allocate(int space, int size); |
| 570 int EncodeExternalReference(Address addr) { | 570 int EncodeExternalReference(Address addr) { |
| 571 return external_reference_encoder_->Encode(addr); | 571 return external_reference_encoder_->Encode(addr); |
| 572 } | 572 } |
| 573 | 573 |
| 574 int SpaceAreaSize(int space); | 574 int SpaceAreaSize(int space); |
| 575 | 575 |
| 576 // Some roots should not be serialized, because their actual value depends on |
| 577 // absolute addresses and they are reset after deserialization, anyway. |
| 578 bool ShouldBeSkipped(Object** current); |
| 579 |
| 576 Isolate* isolate_; | 580 Isolate* isolate_; |
| 577 // Keep track of the fullness of each space in order to generate | 581 // Keep track of the fullness of each space in order to generate |
| 578 // relative addresses for back references. | 582 // relative addresses for back references. |
| 579 int fullness_[LAST_SPACE + 1]; | 583 int fullness_[LAST_SPACE + 1]; |
| 580 SnapshotByteSink* sink_; | 584 SnapshotByteSink* sink_; |
| 581 int current_root_index_; | 585 int current_root_index_; |
| 582 ExternalReferenceEncoder* external_reference_encoder_; | 586 ExternalReferenceEncoder* external_reference_encoder_; |
| 583 static bool serialization_enabled_; | 587 static bool serialization_enabled_; |
| 584 // Did we already make use of the fact that serialization was not enabled? | 588 // Did we already make use of the fact that serialization was not enabled? |
| 585 static bool too_late_to_enable_now_; | 589 static bool too_late_to_enable_now_; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 private: | 667 private: |
| 664 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 668 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 665 return false; | 669 return false; |
| 666 } | 670 } |
| 667 }; | 671 }; |
| 668 | 672 |
| 669 | 673 |
| 670 } } // namespace v8::internal | 674 } } // namespace v8::internal |
| 671 | 675 |
| 672 #endif // V8_SERIALIZE_H_ | 676 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |