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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 Isolate* isolate() const { return isolate_; } | 23 Isolate* isolate() const { return isolate_; } |
24 | 24 |
25 // Range of pointers to visit 'first' <= pointer <= 'last'. | 25 // Range of pointers to visit 'first' <= pointer <= 'last'. |
26 virtual void VisitPointers(RawObject** first, RawObject** last) = 0; | 26 virtual void VisitPointers(RawObject** first, RawObject** last) = 0; |
27 | 27 |
28 virtual bool visit_function_code() const { return true; } | 28 virtual bool visit_function_code() const { return true; } |
29 virtual GrowableArray<RawFunction*>* skipped_code_functions() { | 29 virtual GrowableArray<RawFunction*>* skipped_code_functions() { |
30 return NULL; | 30 return NULL; |
31 } | 31 } |
32 | |
33 // len argument is the number of pointers to visit starting from 'p'. | 32 // len argument is the number of pointers to visit starting from 'p'. |
34 void VisitPointers(RawObject** p, intptr_t len) { | 33 void VisitPointers(RawObject** p, intptr_t len) { |
35 VisitPointers(p, (p + len - 1)); | 34 VisitPointers(p, (p + len - 1)); |
36 } | 35 } |
37 | 36 |
38 void VisitPointer(RawObject** p) { VisitPointers(p , p); } | 37 void VisitPointer(RawObject** p) { VisitPointers(p , p); } |
39 | 38 |
40 private: | 39 private: |
41 Isolate* isolate_; | 40 Isolate* isolate_; |
42 | 41 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 80 |
82 private: | 81 private: |
83 Isolate* isolate_; | 82 Isolate* isolate_; |
84 | 83 |
85 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor); | 84 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor); |
86 }; | 85 }; |
87 | 86 |
88 } // namespace dart | 87 } // namespace dart |
89 | 88 |
90 #endif // VM_VISITOR_H_ | 89 #endif // VM_VISITOR_H_ |
OLD | NEW |