| 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_VISITOR_H_ | 5 #ifndef VM_VISITOR_H_ |
| 6 #define VM_VISITOR_H_ | 6 #define VM_VISITOR_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 DISALLOW_COPY_AND_ASSIGN(ObjectVisitor); | 62 DISALLOW_COPY_AND_ASSIGN(ObjectVisitor); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 | 65 |
| 66 // An object finder visitor interface. | 66 // An object finder visitor interface. |
| 67 class FindObjectVisitor { | 67 class FindObjectVisitor { |
| 68 public: | 68 public: |
| 69 explicit FindObjectVisitor(Isolate* isolate) : isolate_(isolate) {} | 69 explicit FindObjectVisitor(Isolate* isolate) : isolate_(isolate) {} |
| 70 virtual ~FindObjectVisitor() {} | 70 virtual ~FindObjectVisitor() {} |
| 71 | 71 |
| 72 // Allow to specify a address filter. |
| 73 virtual uword filter_addr() { return 0; } |
| 74 |
| 72 // Check if object matches find condition. | 75 // Check if object matches find condition. |
| 73 virtual bool FindObject(RawObject* obj) = 0; | 76 virtual bool FindObject(RawObject* obj) = 0; |
| 74 | 77 |
| 75 private: | 78 private: |
| 76 Isolate* isolate_; | 79 Isolate* isolate_; |
| 77 | 80 |
| 78 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor); | 81 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor); |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 } // namespace dart | 84 } // namespace dart |
| 82 | 85 |
| 83 #endif // VM_VISITOR_H_ | 86 #endif // VM_VISITOR_H_ |
| OLD | NEW |