| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 | 563 |
| 564 private: | 564 private: |
| 565 DISALLOW_COPY_AND_ASSIGN(ScriptSnapshotWriter); | 565 DISALLOW_COPY_AND_ASSIGN(ScriptSnapshotWriter); |
| 566 }; | 566 }; |
| 567 | 567 |
| 568 | 568 |
| 569 // An object pointer visitor implementation which writes out | 569 // An object pointer visitor implementation which writes out |
| 570 // objects to a snap shot. | 570 // objects to a snap shot. |
| 571 class SnapshotWriterVisitor : public ObjectPointerVisitor { | 571 class SnapshotWriterVisitor : public ObjectPointerVisitor { |
| 572 public: | 572 public: |
| 573 explicit SnapshotWriterVisitor(SnapshotWriter* writer) : writer_(writer) {} | 573 explicit SnapshotWriterVisitor(SnapshotWriter* writer) |
| 574 : ObjectPointerVisitor(Isolate::Current()), writer_(writer) {} |
| 574 | 575 |
| 575 virtual void VisitPointers(RawObject** first, RawObject** last); | 576 virtual void VisitPointers(RawObject** first, RawObject** last); |
| 576 | 577 |
| 577 private: | 578 private: |
| 578 SnapshotWriter* writer_; | 579 SnapshotWriter* writer_; |
| 579 | 580 |
| 580 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 581 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
| 581 }; | 582 }; |
| 582 | 583 |
| 583 } // namespace dart | 584 } // namespace dart |
| 584 | 585 |
| 585 #endif // VM_SNAPSHOT_H_ | 586 #endif // VM_SNAPSHOT_H_ |
| OLD | NEW |