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

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

Issue 1287463003: Refactor skipped code functions interface. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rm garbage file. Created 5 years, 3 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
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | 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/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 17
18 // An object pointer visitor interface. 18 // An object pointer visitor interface.
19 class ObjectPointerVisitor { 19 class ObjectPointerVisitor {
20 public: 20 public:
21 explicit ObjectPointerVisitor(Isolate* isolate) : isolate_(isolate) {} 21 explicit ObjectPointerVisitor(Isolate* isolate) : isolate_(isolate) {}
22 virtual ~ObjectPointerVisitor() {} 22 virtual ~ObjectPointerVisitor() {}
23 23
24 Isolate* isolate() const { return isolate_; } 24 Isolate* isolate() const { return isolate_; }
25 25
26 // Range of pointers to visit 'first' <= pointer <= 'last'. 26 // Range of pointers to visit 'first' <= pointer <= 'last'.
27 virtual void VisitPointers(RawObject** first, RawObject** last) = 0; 27 virtual void VisitPointers(RawObject** first, RawObject** last) = 0;
28 28
29 virtual bool visit_function_code() const { return true; } 29 virtual bool visit_function_code() const { return true; }
30 virtual MallocGrowableArray<RawFunction*>* skipped_code_functions() { 30 virtual void add_skipped_code_function(RawFunction* funct) {
31 return NULL; 31 UNREACHABLE();
32 } 32 }
33 // len argument is the number of pointers to visit starting from 'p'. 33 // len argument is the number of pointers to visit starting from 'p'.
34 void VisitPointers(RawObject** p, intptr_t len) { 34 void VisitPointers(RawObject** p, intptr_t len) {
35 VisitPointers(p, (p + len - 1)); 35 VisitPointers(p, (p + len - 1));
36 } 36 }
37 37
38 void VisitPointer(RawObject** p) { VisitPointers(p , p); } 38 void VisitPointer(RawObject** p) { VisitPointers(p , p); }
39 39
40 private: 40 private:
41 Isolate* isolate_; 41 Isolate* isolate_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 private: 83 private:
84 Isolate* isolate_; 84 Isolate* isolate_;
85 85
86 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor); 86 DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor);
87 }; 87 };
88 88
89 } // namespace dart 89 } // namespace dart
90 90
91 #endif // VM_VISITOR_H_ 91 #endif // VM_VISITOR_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698