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

Side by Side Diff: dart/runtime/vm/visitor.h

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/runtime/vm/stub_code_x64.cc ('k') | dart/runtime/vm/vm.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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() const { return 0; }
74 bool VisitRange(uword begin_addr, uword end_addr) const {
75 uword addr = filter_addr();
76 return (addr == 0) || ((begin_addr <= addr) && (addr < end_addr));
77 }
78
72 // Check if object matches find condition. 79 // Check if object matches find condition.
73 virtual bool FindObject(RawObject* obj) = 0; 80 virtual bool FindObject(RawObject* obj) const = 0;
74 81
75 private: 82 private:
76 Isolate* isolate_; 83 Isolate* isolate_;
77 84
78 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor); 85 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor);
79 }; 86 };
80 87
81 } // namespace dart 88 } // namespace dart
82 89
83 #endif // VM_VISITOR_H_ 90 #endif // VM_VISITOR_H_
OLDNEW
« no previous file with comments | « dart/runtime/vm/stub_code_x64.cc ('k') | dart/runtime/vm/vm.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698