| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 explicit Deserializer(SnapshotByteSource* source); | 321 explicit Deserializer(SnapshotByteSource* source); |
| 322 | 322 |
| 323 virtual ~Deserializer(); | 323 virtual ~Deserializer(); |
| 324 | 324 |
| 325 // Deserialize the snapshot into an empty heap. | 325 // Deserialize the snapshot into an empty heap. |
| 326 void Deserialize(); | 326 void Deserialize(); |
| 327 | 327 |
| 328 // Deserialize a single object and the objects reachable from it. | 328 // Deserialize a single object and the objects reachable from it. |
| 329 void DeserializePartial(Object** root); | 329 void DeserializePartial(Object** root); |
| 330 | 330 |
| 331 void set_reservation(int space_number, uintptr_t reservation) { | 331 void set_reservation(int space_number, int reservation) { |
| 332 ASSERT(space_number >= 0); | 332 ASSERT(space_number >= 0); |
| 333 ASSERT(space_number <= LAST_SPACE); | 333 ASSERT(space_number <= LAST_SPACE); |
| 334 reservations_[space_number] = reservation; | 334 reservations_[space_number] = reservation; |
| 335 } | 335 } |
| 336 | 336 |
| 337 private: | 337 private: |
| 338 virtual void VisitPointers(Object** start, Object** end); | 338 virtual void VisitPointers(Object** start, Object** end); |
| 339 | 339 |
| 340 virtual void VisitExternalReferences(Address* start, Address* end) { | 340 virtual void VisitExternalReferences(Address* start, Address* end) { |
| 341 UNREACHABLE(); | 341 UNREACHABLE(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 | 374 |
| 375 // Cached current isolate. | 375 // Cached current isolate. |
| 376 Isolate* isolate_; | 376 Isolate* isolate_; |
| 377 | 377 |
| 378 SnapshotByteSource* source_; | 378 SnapshotByteSource* source_; |
| 379 // This is the address of the next object that will be allocated in each | 379 // This is the address of the next object that will be allocated in each |
| 380 // space. It is used to calculate the addresses of back-references. | 380 // space. It is used to calculate the addresses of back-references. |
| 381 Address high_water_[LAST_SPACE + 1]; | 381 Address high_water_[LAST_SPACE + 1]; |
| 382 | 382 |
| 383 intptr_t reservations_[LAST_SPACE + 1]; | 383 int reservations_[LAST_SPACE + 1]; |
| 384 static const intptr_t kUninitializedReservation = -1; | 384 static const intptr_t kUninitializedReservation = -1; |
| 385 | 385 |
| 386 ExternalReferenceDecoder* external_reference_decoder_; | 386 ExternalReferenceDecoder* external_reference_decoder_; |
| 387 | 387 |
| 388 DISALLOW_COPY_AND_ASSIGN(Deserializer); | 388 DISALLOW_COPY_AND_ASSIGN(Deserializer); |
| 389 }; | 389 }; |
| 390 | 390 |
| 391 | 391 |
| 392 class SnapshotByteSink { | 392 class SnapshotByteSink { |
| 393 public: | 393 public: |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 private: | 652 private: |
| 653 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 653 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 654 return false; | 654 return false; |
| 655 } | 655 } |
| 656 }; | 656 }; |
| 657 | 657 |
| 658 | 658 |
| 659 } } // namespace v8::internal | 659 } } // namespace v8::internal |
| 660 | 660 |
| 661 #endif // V8_SERIALIZE_H_ | 661 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |