OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/context-measure.h" |
6 | 6 |
7 #include "src/context-measure.h" | 7 #include "src/base/logging.h" |
| 8 #include "src/contexts.h" |
| 9 #include "src/objects-inl.h" |
8 | 10 |
9 namespace v8 { | 11 namespace v8 { |
10 namespace internal { | 12 namespace internal { |
11 | 13 |
12 ContextMeasure::ContextMeasure(Context* context) | 14 ContextMeasure::ContextMeasure(Context* context) |
13 : context_(context), | 15 : context_(context), |
14 root_index_map_(context->GetIsolate()), | 16 root_index_map_(context->GetIsolate()), |
15 recursion_depth_(0), | 17 recursion_depth_(0), |
16 count_(0), | 18 count_(0), |
17 size_(0) { | 19 size_(0) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 69 |
68 | 70 |
69 void ContextMeasure::VisitPointers(Object** start, Object** end) { | 71 void ContextMeasure::VisitPointers(Object** start, Object** end) { |
70 for (Object** current = start; current < end; current++) { | 72 for (Object** current = start; current < end; current++) { |
71 if ((*current)->IsSmi()) continue; | 73 if ((*current)->IsSmi()) continue; |
72 MeasureObject(HeapObject::cast(*current)); | 74 MeasureObject(HeapObject::cast(*current)); |
73 } | 75 } |
74 } | 76 } |
75 } | 77 } |
76 } // namespace v8::internal | 78 } // namespace v8::internal |
OLD | NEW |