OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_VERIFIER_H_ | 5 #ifndef VM_VERIFIER_H_ |
6 #define VM_VERIFIER_H_ | 6 #define VM_VERIFIER_H_ |
7 | 7 |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 kAllowMarked, | 23 kAllowMarked, |
24 kRequireMarked | 24 kRequireMarked |
25 }; | 25 }; |
26 | 26 |
27 | 27 |
28 class VerifyObjectVisitor : public ObjectVisitor { | 28 class VerifyObjectVisitor : public ObjectVisitor { |
29 public: | 29 public: |
30 VerifyObjectVisitor(Isolate* isolate, | 30 VerifyObjectVisitor(Isolate* isolate, |
31 ObjectSet* allocated_set, | 31 ObjectSet* allocated_set, |
32 MarkExpectation mark_expectation) | 32 MarkExpectation mark_expectation) |
33 : ObjectVisitor(isolate), | 33 : isolate_(isolate), |
34 allocated_set_(allocated_set), | 34 allocated_set_(allocated_set), |
35 mark_expectation_(mark_expectation) { | 35 mark_expectation_(mark_expectation) { |
36 } | 36 } |
37 | 37 |
38 virtual void VisitObject(RawObject* obj); | 38 virtual void VisitObject(RawObject* obj); |
39 | 39 |
40 private: | 40 private: |
| 41 Isolate* isolate_; |
41 ObjectSet* allocated_set_; | 42 ObjectSet* allocated_set_; |
42 MarkExpectation mark_expectation_; | 43 MarkExpectation mark_expectation_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(VerifyObjectVisitor); | 45 DISALLOW_COPY_AND_ASSIGN(VerifyObjectVisitor); |
45 }; | 46 }; |
46 | 47 |
47 // A sample object pointer visitor implementation which verifies that | 48 // A sample object pointer visitor implementation which verifies that |
48 // the pointers visited are contained in the isolate heap. | 49 // the pointers visited are contained in the isolate heap. |
49 class VerifyPointersVisitor : public ObjectPointerVisitor { | 50 class VerifyPointersVisitor : public ObjectPointerVisitor { |
50 public: | 51 public: |
(...skipping 25 matching lines...) Expand all Loading... |
76 ObjectPointerVisitor* visitor_; | 77 ObjectPointerVisitor* visitor_; |
77 | 78 |
78 ObjectSet* allocated_set; | 79 ObjectSet* allocated_set; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor); | 81 DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor); |
81 }; | 82 }; |
82 | 83 |
83 } // namespace dart | 84 } // namespace dart |
84 | 85 |
85 #endif // VM_VERIFIER_H_ | 86 #endif // VM_VERIFIER_H_ |
OLD | NEW |