| 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // going on. | 478 // going on. |
| 479 static void TooLateToEnableNow() { too_late_to_enable_now_ = true; } | 479 static void TooLateToEnableNow() { too_late_to_enable_now_ = true; } |
| 480 static bool enabled() { return serialization_enabled_; } | 480 static bool enabled() { return serialization_enabled_; } |
| 481 SerializationAddressMapper* address_mapper() { return &address_mapper_; } | 481 SerializationAddressMapper* address_mapper() { return &address_mapper_; } |
| 482 void PutRoot( | 482 void PutRoot( |
| 483 int index, HeapObject* object, HowToCode how, WhereToPoint where); | 483 int index, HeapObject* object, HowToCode how, WhereToPoint where); |
| 484 | 484 |
| 485 protected: | 485 protected: |
| 486 static const int kInvalidRootIndex = -1; | 486 static const int kInvalidRootIndex = -1; |
| 487 | 487 |
| 488 int RootIndex(HeapObject* heap_object); | 488 int RootIndex(HeapObject* heap_object, HowToCode from); |
| 489 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) = 0; | 489 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) = 0; |
| 490 intptr_t root_index_wave_front() { return root_index_wave_front_; } | 490 intptr_t root_index_wave_front() { return root_index_wave_front_; } |
| 491 void set_root_index_wave_front(intptr_t value) { | 491 void set_root_index_wave_front(intptr_t value) { |
| 492 ASSERT(value >= root_index_wave_front_); | 492 ASSERT(value >= root_index_wave_front_); |
| 493 root_index_wave_front_ = value; | 493 root_index_wave_front_ = value; |
| 494 } | 494 } |
| 495 | 495 |
| 496 class ObjectSerializer : public ObjectVisitor { | 496 class ObjectSerializer : public ObjectVisitor { |
| 497 public: | 497 public: |
| 498 ObjectSerializer(Serializer* serializer, | 498 ObjectSerializer(Serializer* serializer, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 private: | 643 private: |
| 644 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 644 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 645 return false; | 645 return false; |
| 646 } | 646 } |
| 647 }; | 647 }; |
| 648 | 648 |
| 649 | 649 |
| 650 } } // namespace v8::internal | 650 } } // namespace v8::internal |
| 651 | 651 |
| 652 #endif // V8_SERIALIZE_H_ | 652 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |