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 446 matching lines...) Loading... |
457 class CodeAddressMap; | 457 class CodeAddressMap; |
458 | 458 |
459 // There can be only one serializer per V8 process. | 459 // There can be only one serializer per V8 process. |
460 class Serializer : public SerializerDeserializer { | 460 class Serializer : public SerializerDeserializer { |
461 public: | 461 public: |
462 Serializer(Isolate* isolate, SnapshotByteSink* sink); | 462 Serializer(Isolate* isolate, SnapshotByteSink* sink); |
463 ~Serializer(); | 463 ~Serializer(); |
464 void VisitPointers(Object** start, Object** end); | 464 void VisitPointers(Object** start, Object** end); |
465 // You can call this after serialization to find out how much space was used | 465 // You can call this after serialization to find out how much space was used |
466 // in each space. | 466 // in each space. |
467 int CurrentAllocationAddress(int space) { | 467 int CurrentAllocationAddress(int space) const { |
468 ASSERT(space < kNumberOfSpaces); | 468 ASSERT(space < kNumberOfSpaces); |
469 return fullness_[space]; | 469 return fullness_[space]; |
470 } | 470 } |
471 | 471 |
472 Isolate* isolate() const { return isolate_; } | 472 Isolate* isolate() const { return isolate_; } |
473 static void Enable(Isolate* isolate); | 473 static void Enable(Isolate* isolate); |
474 static void Disable(); | 474 static void Disable(); |
475 | 475 |
476 // Call this when you have made use of the fact that there is no serialization | 476 // Call this when you have made use of the fact that there is no serialization |
477 // going on. | 477 // going on. |
(...skipping 179 matching lines...) Loading... |
657 private: | 657 private: |
658 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 658 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
659 return false; | 659 return false; |
660 } | 660 } |
661 }; | 661 }; |
662 | 662 |
663 | 663 |
664 } } // namespace v8::internal | 664 } } // namespace v8::internal |
665 | 665 |
666 #endif // V8_SERIALIZE_H_ | 666 #endif // V8_SERIALIZE_H_ |
OLD | NEW |