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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 // Writes a message of integers. | 478 // Writes a message of integers. |
479 void WriteMessage(intptr_t field_count, intptr_t *data); | 479 void WriteMessage(intptr_t field_count, intptr_t *data); |
480 | 480 |
481 void WriteCMessage(Dart_CObject* object); | 481 void WriteCMessage(Dart_CObject* object); |
482 | 482 |
483 void FinalizeBuffer() { | 483 void FinalizeBuffer() { |
484 BaseWriter::FinalizeBuffer(Snapshot::kMessage); | 484 BaseWriter::FinalizeBuffer(Snapshot::kMessage); |
485 } | 485 } |
486 | 486 |
487 private: | 487 private: |
488 static const intptr_t kDartCObjectTypeBits = 3; | 488 static const intptr_t kDartCObjectTypeBits = 4; |
489 static const intptr_t kDartCObjectTypeMask = (1 << kDartCObjectTypeBits) - 1; | 489 static const intptr_t kDartCObjectTypeMask = (1 << kDartCObjectTypeBits) - 1; |
490 static const intptr_t kDartCObjectMarkMask = ~kDartCObjectTypeMask; | 490 static const intptr_t kDartCObjectMarkMask = ~kDartCObjectTypeMask; |
491 static const intptr_t kDartCObjectMarkOffset = 1; | 491 static const intptr_t kDartCObjectMarkOffset = 1; |
492 | 492 |
493 void MarkCObject(Dart_CObject* object, intptr_t object_id); | 493 void MarkCObject(Dart_CObject* object, intptr_t object_id); |
494 void UnmarkCObject(Dart_CObject* object); | 494 void UnmarkCObject(Dart_CObject* object); |
495 bool IsCObjectMarked(Dart_CObject* object); | 495 bool IsCObjectMarked(Dart_CObject* object); |
496 intptr_t GetMarkedCObjectMark(Dart_CObject* object); | 496 intptr_t GetMarkedCObjectMark(Dart_CObject* object); |
497 void UnmarkAllCObjects(Dart_CObject* object); | 497 void UnmarkAllCObjects(Dart_CObject* object); |
498 | 498 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 596 |
597 private: | 597 private: |
598 SnapshotWriter* writer_; | 598 SnapshotWriter* writer_; |
599 | 599 |
600 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 600 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
601 }; | 601 }; |
602 | 602 |
603 } // namespace dart | 603 } // namespace dart |
604 | 604 |
605 #endif // VM_SNAPSHOT_H_ | 605 #endif // VM_SNAPSHOT_H_ |
OLD | NEW |