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

Unified Diff: runtime/vm/verifier.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/verifier.h
diff --git a/runtime/vm/verifier.h b/runtime/vm/verifier.h
index 709a95869f46555f7e8745e84657700243853619..ae96f021a3bfefc7f0437d9de3d5f61b7d7d60cc 100644
--- a/runtime/vm/verifier.h
+++ b/runtime/vm/verifier.h
@@ -23,14 +23,31 @@ DECLARE_FLAG(bool, verify_on_transition);
// Forward declarations.
class Isolate;
+class ObjectSet;
class RawObject;
+class VerifyObjectVisitor : public ObjectVisitor {
+ public:
+ VerifyObjectVisitor(Isolate* isolate, ObjectSet* allocated_set)
+ : ObjectVisitor(isolate),
+ allocated_set_(allocated_set) {
+ }
+
+ virtual void VisitObject(RawObject* obj);
+
+ private:
+ ObjectSet* allocated_set_;
+
+ DISALLOW_COPY_AND_ASSIGN(VerifyObjectVisitor);
+};
+
// A sample object pointer visitor implementation which verifies that
// the pointers visited are contained in the isolate heap.
class VerifyPointersVisitor : public ObjectPointerVisitor {
public:
- explicit VerifyPointersVisitor(Isolate* isolate)
- : ObjectPointerVisitor(isolate) {
+ explicit VerifyPointersVisitor(Isolate* isolate, ObjectSet* allocated_set)
+ : ObjectPointerVisitor(isolate),
+ allocated_set_(allocated_set) {
}
virtual void VisitPointers(RawObject** first, RawObject** last);
@@ -38,6 +55,8 @@ class VerifyPointersVisitor : public ObjectPointerVisitor {
static void VerifyPointers();
private:
+ ObjectSet* allocated_set_;
+
DISALLOW_COPY_AND_ASSIGN(VerifyPointersVisitor);
};
@@ -52,6 +71,8 @@ class VerifyWeakPointersVisitor : public HandleVisitor {
private:
ObjectPointerVisitor* visitor_;
+ ObjectSet* allocated_set;
+
DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor);
};
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698