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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 static int SpaceOfObject(HeapObject* object); | 549 static int SpaceOfObject(HeapObject* object); |
550 // This just returns the space of the object. It will return LO_SPACE | 550 // This just returns the space of the object. It will return LO_SPACE |
551 // for all large objects since you can't check the type of the object | 551 // for all large objects since you can't check the type of the object |
552 // once the map has been used for the serialization address. | 552 // once the map has been used for the serialization address. |
553 static int SpaceOfAlreadySerializedObject(HeapObject* object); | 553 static int SpaceOfAlreadySerializedObject(HeapObject* object); |
554 int Allocate(int space, int size, bool* new_page_started); | 554 int Allocate(int space, int size, bool* new_page_started); |
555 int EncodeExternalReference(Address addr) { | 555 int EncodeExternalReference(Address addr) { |
556 return external_reference_encoder_->Encode(addr); | 556 return external_reference_encoder_->Encode(addr); |
557 } | 557 } |
558 | 558 |
| 559 int SpaceAreaSize(int space); |
| 560 |
| 561 Isolate* isolate_; |
559 // Keep track of the fullness of each space in order to generate | 562 // Keep track of the fullness of each space in order to generate |
560 // relative addresses for back references. Large objects are | 563 // relative addresses for back references. Large objects are |
561 // just numbered sequentially since relative addresses make no | 564 // just numbered sequentially since relative addresses make no |
562 // sense in large object space. | 565 // sense in large object space. |
563 int fullness_[LAST_SPACE + 1]; | 566 int fullness_[LAST_SPACE + 1]; |
564 SnapshotByteSink* sink_; | 567 SnapshotByteSink* sink_; |
565 int current_root_index_; | 568 int current_root_index_; |
566 ExternalReferenceEncoder* external_reference_encoder_; | 569 ExternalReferenceEncoder* external_reference_encoder_; |
567 static bool serialization_enabled_; | 570 static bool serialization_enabled_; |
568 // Did we already make use of the fact that serialization was not enabled? | 571 // Did we already make use of the fact that serialization was not enabled? |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 private: | 643 private: |
641 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 644 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
642 return false; | 645 return false; |
643 } | 646 } |
644 }; | 647 }; |
645 | 648 |
646 | 649 |
647 } } // namespace v8::internal | 650 } } // namespace v8::internal |
648 | 651 |
649 #endif // V8_SERIALIZE_H_ | 652 #endif // V8_SERIALIZE_H_ |
OLD | NEW |