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

Side by Side Diff: src/context-measure.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/api.cc ('k') | src/debug/liveedit.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_CONTEXT_MEASURE_H_ 5 #ifndef V8_CONTEXT_MEASURE_H_
6 #define V8_CONTEXT_MEASURE_H_ 6 #define V8_CONTEXT_MEASURE_H_
7 7
8 #include "src/address-map.h" 8 #include "src/address-map.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 class ContextMeasure : public ObjectVisitor { 15 class ContextMeasure : public ObjectVisitor {
16 public: 16 public:
17 explicit ContextMeasure(Context* context); 17 explicit ContextMeasure(Context* context);
18 18
19 int Size() { return size_; } 19 int Size() { return size_; }
20 int Count() { return count_; } 20 int Count() { return count_; }
21 21
22 void VisitPointers(Object** start, Object** end); 22 void VisitPointers(Object** start, Object** end) override;
23 23
24 private: 24 private:
25 void MeasureObject(HeapObject* object); 25 void MeasureObject(HeapObject* object);
26 void MeasureDeferredObjects(); 26 void MeasureDeferredObjects();
27 void MeasureAndRecurse(HeapObject* object); 27 void MeasureAndRecurse(HeapObject* object);
28 bool IsShared(HeapObject* object); 28 bool IsShared(HeapObject* object);
29 29
30 Context* context_; 30 Context* context_;
31 31
32 BackReferenceMap back_reference_map_; 32 BackReferenceMap back_reference_map_;
33 RootIndexMap root_index_map_; 33 RootIndexMap root_index_map_;
34 34
35 static const int kMaxRecursion = 16; 35 static const int kMaxRecursion = 16;
36 int recursion_depth_; 36 int recursion_depth_;
37 List<HeapObject*> deferred_objects_; 37 List<HeapObject*> deferred_objects_;
38 38
39 int count_; 39 int count_;
40 int size_; 40 int size_;
41 41
42 DisallowHeapAllocation no_gc_; 42 DisallowHeapAllocation no_gc_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ContextMeasure); 44 DISALLOW_COPY_AND_ASSIGN(ContextMeasure);
45 }; 45 };
46 } // namespace internal 46 } // namespace internal
47 } // namespace v8 47 } // namespace v8
48 48
49 #endif // V8_CONTEXT_MEASURE_H_ 49 #endif // V8_CONTEXT_MEASURE_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698