| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_SNAPSHOT_H_ | 5 #ifndef VM_SNAPSHOT_H_ |
| 6 #define VM_SNAPSHOT_H_ | 6 #define VM_SNAPSHOT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/bitfield.h" | 10 #include "vm/bitfield.h" |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 void WriteObject(RawObject* raw); | 498 void WriteObject(RawObject* raw); |
| 499 | 499 |
| 500 void WriteClassId(RawClass* cls); | 500 void WriteClassId(RawClass* cls); |
| 501 | 501 |
| 502 // Unmark all objects that were marked as forwarded for serializing. | 502 // Unmark all objects that were marked as forwarded for serializing. |
| 503 void UnmarkAll(); | 503 void UnmarkAll(); |
| 504 | 504 |
| 505 // Writes a full snapshot of the Isolate. | 505 // Writes a full snapshot of the Isolate. |
| 506 void WriteFullSnapshot(); | 506 void WriteFullSnapshot(); |
| 507 | 507 |
| 508 uword GetObjectTags(RawObject* raw); |
| 509 |
| 508 private: | 510 private: |
| 509 class ForwardObjectNode : public ZoneAllocated { | 511 class ForwardObjectNode : public ZoneAllocated { |
| 510 public: | 512 public: |
| 511 ForwardObjectNode(RawObject* raw, RawClass* cls) : raw_(raw), cls_(cls) {} | 513 ForwardObjectNode(RawObject* raw, uword tags) : raw_(raw), tags_(tags) {} |
| 512 RawObject* raw() const { return raw_; } | 514 RawObject* raw() const { return raw_; } |
| 513 RawClass* cls() const { return cls_; } | 515 uword tags() const { return tags_; } |
| 514 | 516 |
| 515 private: | 517 private: |
| 516 RawObject* raw_; | 518 RawObject* raw_; |
| 517 RawClass* cls_; | 519 uword tags_; |
| 518 | 520 |
| 519 DISALLOW_COPY_AND_ASSIGN(ForwardObjectNode); | 521 DISALLOW_COPY_AND_ASSIGN(ForwardObjectNode); |
| 520 }; | 522 }; |
| 521 | 523 |
| 522 intptr_t MarkObject(RawObject* raw, RawClass* cls); | 524 intptr_t MarkObject(RawObject* raw, RawClass* cls); |
| 523 | 525 |
| 524 void WriteInlinedObject(RawObject* raw); | 526 void WriteInlinedObject(RawObject* raw); |
| 525 | 527 |
| 526 ObjectStore* object_store() const { return object_store_; } | 528 ObjectStore* object_store() const { return object_store_; } |
| 527 | 529 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 562 |
| 561 private: | 563 private: |
| 562 SnapshotWriter* writer_; | 564 SnapshotWriter* writer_; |
| 563 | 565 |
| 564 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 566 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
| 565 }; | 567 }; |
| 566 | 568 |
| 567 } // namespace dart | 569 } // namespace dart |
| 568 | 570 |
| 569 #endif // VM_SNAPSHOT_H_ | 571 #endif // VM_SNAPSHOT_H_ |
| OLD | NEW |