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 RUNTIME_VM_VISITOR_H_ | 5 #ifndef RUNTIME_VM_VISITOR_H_ |
6 #define RUNTIME_VM_VISITOR_H_ | 6 #define RUNTIME_VM_VISITOR_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
11 | 11 |
12 namespace dart { | 12 namespace dart { |
13 | 13 |
14 // Forward declarations. | 14 // Forward declarations. |
15 class Isolate; | 15 class Isolate; |
16 class RawObject; | 16 class RawObject; |
| 17 class RawFunction; |
17 | 18 |
18 // An object pointer visitor interface. | 19 // An object pointer visitor interface. |
19 class ObjectPointerVisitor { | 20 class ObjectPointerVisitor { |
20 public: | 21 public: |
21 explicit ObjectPointerVisitor(Isolate* isolate) : isolate_(isolate) {} | 22 explicit ObjectPointerVisitor(Isolate* isolate) : isolate_(isolate) {} |
22 virtual ~ObjectPointerVisitor() {} | 23 virtual ~ObjectPointerVisitor() {} |
23 | 24 |
24 Isolate* isolate() const { return isolate_; } | 25 Isolate* isolate() const { return isolate_; } |
25 | 26 |
26 // Range of pointers to visit 'first' <= pointer <= 'last'. | 27 // Range of pointers to visit 'first' <= pointer <= 'last'. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Check if object matches find condition. | 75 // Check if object matches find condition. |
75 virtual bool FindObject(RawObject* obj) const = 0; | 76 virtual bool FindObject(RawObject* obj) const = 0; |
76 | 77 |
77 private: | 78 private: |
78 DISALLOW_COPY_AND_ASSIGN(FindObjectVisitor); | 79 DISALLOW_COPY_AND_ASSIGN(FindObjectVisitor); |
79 }; | 80 }; |
80 | 81 |
81 } // namespace dart | 82 } // namespace dart |
82 | 83 |
83 #endif // RUNTIME_VM_VISITOR_H_ | 84 #endif // RUNTIME_VM_VISITOR_H_ |
OLD | NEW |