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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 virtual void VisitPointers(Object** start, Object** end); | 340 virtual void VisitPointers(Object** start, Object** end); |
341 | 341 |
342 virtual void VisitExternalReferences(Address* start, Address* end) { | 342 virtual void VisitExternalReferences(Address* start, Address* end) { |
343 UNREACHABLE(); | 343 UNREACHABLE(); |
344 } | 344 } |
345 | 345 |
346 virtual void VisitRuntimeEntry(RelocInfo* rinfo) { | 346 virtual void VisitRuntimeEntry(RelocInfo* rinfo) { |
347 UNREACHABLE(); | 347 UNREACHABLE(); |
348 } | 348 } |
349 | 349 |
350 // Allocation sites are present in the snapshot, and must be linked into | |
351 // a list at deserialization time. | |
352 void RelinkAllocationSite(AllocationSite* site); | |
353 | |
350 // Fills in some heap data in an area from start to end (non-inclusive). The | 354 // Fills in some heap data in an area from start to end (non-inclusive). The |
351 // space id is used for the write barrier. The object_address is the address | 355 // space id is used for the write barrier. The object_address is the address |
352 // of the object we are writing into, or NULL if we are not writing into an | 356 // of the object we are writing into, or NULL if we are not writing into an |
353 // object, i.e. if we are writing a series of tagged values that are not on | 357 // object, i.e. if we are writing a series of tagged values that are not on |
354 // the heap. | 358 // the heap. |
355 void ReadChunk( | 359 void ReadChunk( |
356 Object** start, Object** end, int space, Address object_address); | 360 Object** start, Object** end, int space, Address object_address); |
357 void ReadObject(int space_number, Object** write_back); | 361 void ReadObject(int space_number, Object** write_back); |
358 | 362 |
359 // This routine both allocates a new object, and also keeps | 363 // This routine both allocates a new object, and also keeps |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 // going on. | 484 // going on. |
481 static void TooLateToEnableNow() { too_late_to_enable_now_ = true; } | 485 static void TooLateToEnableNow() { too_late_to_enable_now_ = true; } |
482 static bool enabled() { return serialization_enabled_; } | 486 static bool enabled() { return serialization_enabled_; } |
483 SerializationAddressMapper* address_mapper() { return &address_mapper_; } | 487 SerializationAddressMapper* address_mapper() { return &address_mapper_; } |
484 void PutRoot(int index, | 488 void PutRoot(int index, |
485 HeapObject* object, | 489 HeapObject* object, |
486 HowToCode how, | 490 HowToCode how, |
487 WhereToPoint where, | 491 WhereToPoint where, |
488 int skip); | 492 int skip); |
489 | 493 |
494 Isolate* isolate() { return isolate_; } | |
Michael Starzinger
2013/07/17 11:25:30
nit: It looks like this accessor became obsolete,
mvstanton
2013/07/17 11:49:00
Done.
| |
495 | |
490 protected: | 496 protected: |
491 static const int kInvalidRootIndex = -1; | 497 static const int kInvalidRootIndex = -1; |
492 | 498 |
493 int RootIndex(HeapObject* heap_object, HowToCode from); | 499 int RootIndex(HeapObject* heap_object, HowToCode from); |
494 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) = 0; | 500 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) = 0; |
495 intptr_t root_index_wave_front() { return root_index_wave_front_; } | 501 intptr_t root_index_wave_front() { return root_index_wave_front_; } |
496 void set_root_index_wave_front(intptr_t value) { | 502 void set_root_index_wave_front(intptr_t value) { |
497 ASSERT(value >= root_index_wave_front_); | 503 ASSERT(value >= root_index_wave_front_); |
498 root_index_wave_front_ = value; | 504 root_index_wave_front_ = value; |
499 } | 505 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
653 private: | 659 private: |
654 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 660 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
655 return false; | 661 return false; |
656 } | 662 } |
657 }; | 663 }; |
658 | 664 |
659 | 665 |
660 } } // namespace v8::internal | 666 } } // namespace v8::internal |
661 | 667 |
662 #endif // V8_SERIALIZE_H_ | 668 #endif // V8_SERIALIZE_H_ |
OLD | NEW |