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

Side by Side Diff: src/heap/scavenger.h

Issue 1425013006: Using override keyword in ObjectVisitor class hierarchy. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/heap/mark-compact.cc ('k') | src/profiler/heap-snapshot-generator.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SCAVENGER_H_ 5 #ifndef V8_HEAP_SCAVENGER_H_
6 #define V8_HEAP_SCAVENGER_H_ 6 #define V8_HEAP_SCAVENGER_H_
7 7
8 #include "src/heap/objects-visiting.h" 8 #include "src/heap/objects-visiting.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 30 matching lines...) Expand all
41 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; 41 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_;
42 }; 42 };
43 43
44 44
45 // Helper class for turning the scavenger into an object visitor that is also 45 // Helper class for turning the scavenger into an object visitor that is also
46 // filtering out non-HeapObjects and objects which do not reside in new space. 46 // filtering out non-HeapObjects and objects which do not reside in new space.
47 class ScavengeVisitor : public ObjectVisitor { 47 class ScavengeVisitor : public ObjectVisitor {
48 public: 48 public:
49 explicit ScavengeVisitor(Heap* heap) : heap_(heap) {} 49 explicit ScavengeVisitor(Heap* heap) : heap_(heap) {}
50 50
51 void VisitPointer(Object** p); 51 void VisitPointer(Object** p) override;
52 void VisitPointers(Object** start, Object** end); 52 void VisitPointers(Object** start, Object** end) override;
53 53
54 private: 54 private:
55 inline void ScavengePointer(Object** p); 55 inline void ScavengePointer(Object** p);
56 56
57 Heap* heap_; 57 Heap* heap_;
58 }; 58 };
59 59
60 60
61 // Helper class for turning the scavenger into an object visitor that is also 61 // Helper class for turning the scavenger into an object visitor that is also
62 // filtering out non-HeapObjects and objects which do not reside in new space. 62 // filtering out non-HeapObjects and objects which do not reside in new space.
63 class StaticScavengeVisitor 63 class StaticScavengeVisitor
64 : public StaticNewSpaceVisitor<StaticScavengeVisitor> { 64 : public StaticNewSpaceVisitor<StaticScavengeVisitor> {
65 public: 65 public:
66 static inline void VisitPointer(Heap* heap, Object** p); 66 static inline void VisitPointer(Heap* heap, Object** p);
67 }; 67 };
68 68
69 } // namespace internal 69 } // namespace internal
70 } // namespace v8 70 } // namespace v8
71 71
72 #endif // V8_HEAP_SCAVENGER_H_ 72 #endif // V8_HEAP_SCAVENGER_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/profiler/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698