Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: runtime/vm/scavenger.h

Issue 10696029: Implement a 2-pass heap verification algorithm. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SCAVENGER_H_ 5 #ifndef VM_SCAVENGER_H_
6 #define VM_SCAVENGER_H_ 6 #define VM_SCAVENGER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 uword* EndAddress() { return &end_; } 67 uword* EndAddress() { return &end_; }
68 static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); } 68 static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); }
69 static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); } 69 static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); }
70 70
71 intptr_t in_use() const { return (top_ - FirstObjectStart()); } 71 intptr_t in_use() const { return (top_ - FirstObjectStart()); }
72 intptr_t capacity() const { return space_->size(); } 72 intptr_t capacity() const { return space_->size(); }
73 73
74 void VisitObjects(ObjectVisitor* visitor) const; 74 void VisitObjects(ObjectVisitor* visitor) const;
75 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; 75 void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
76 76
77 void StartEndAddress(uword* start, uword* end) const {
78 *start = to_->start();
79 *end = to_->end();
80 }
81
77 // Returns true if the last scavenge had a promotion failure. 82 // Returns true if the last scavenge had a promotion failure.
78 bool HadPromotionFailure() { 83 bool HadPromotionFailure() {
79 return had_promotion_failure_; 84 return had_promotion_failure_;
80 } 85 }
81 86
82 private: 87 private:
83 uword FirstObjectStart() const { return to_->start() | object_alignment_; } 88 uword FirstObjectStart() const { return to_->start() | object_alignment_; }
84 void Prologue(Isolate* isolate, bool invoke_api_callbacks); 89 void Prologue(Isolate* isolate, bool invoke_api_callbacks);
85 void IterateRoots(Isolate* isolate, 90 void IterateRoots(Isolate* isolate,
86 ObjectPointerVisitor* visitor, 91 ObjectPointerVisitor* visitor,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 148
144 friend class ScavengerVisitor; 149 friend class ScavengerVisitor;
145 friend class ScavengerWeakVisitor; 150 friend class ScavengerWeakVisitor;
146 151
147 DISALLOW_COPY_AND_ASSIGN(Scavenger); 152 DISALLOW_COPY_AND_ASSIGN(Scavenger);
148 }; 153 };
149 154
150 } // namespace dart 155 } // namespace dart
151 156
152 #endif // VM_SCAVENGER_H_ 157 #endif // VM_SCAVENGER_H_
OLDNEW
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698