OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_CLASS_TABLE_H_ | 5 #ifndef VM_CLASS_TABLE_H_ |
6 #define VM_CLASS_TABLE_H_ | 6 #define VM_CLASS_TABLE_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/bitfield.h" | 9 #include "vm/bitfield.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 void set_trace_allocation(bool trace_allocation) { | 126 void set_trace_allocation(bool trace_allocation) { |
127 state_ = TraceAllocationBit::update(trace_allocation, state_); | 127 state_ = TraceAllocationBit::update(trace_allocation, state_); |
128 } | 128 } |
129 | 129 |
130 private: | 130 private: |
131 enum StateBits { | 131 enum StateBits { |
132 kTraceAllocationBit = 0, | 132 kTraceAllocationBit = 0, |
133 }; | 133 }; |
134 | 134 |
135 class TraceAllocationBit : public BitField<bool, kTraceAllocationBit, 1> {}; | 135 class TraceAllocationBit : |
| 136 public BitField<intptr_t, bool, kTraceAllocationBit, 1> {}; |
136 | 137 |
137 // Recent old at start of last new GC (used to compute promoted_*). | 138 // Recent old at start of last new GC (used to compute promoted_*). |
138 intptr_t old_pre_new_gc_count_; | 139 intptr_t old_pre_new_gc_count_; |
139 intptr_t old_pre_new_gc_size_; | 140 intptr_t old_pre_new_gc_size_; |
140 intptr_t state_; | 141 intptr_t state_; |
141 }; | 142 }; |
142 | 143 |
143 | 144 |
144 class ClassTable { | 145 class ClassTable { |
145 public: | 146 public: |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); | 246 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); |
246 void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1); | 247 void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1); |
247 void UpdateLiveNew(intptr_t cid, intptr_t size); | 248 void UpdateLiveNew(intptr_t cid, intptr_t size); |
248 | 249 |
249 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 250 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
250 }; | 251 }; |
251 | 252 |
252 } // namespace dart | 253 } // namespace dart |
253 | 254 |
254 #endif // VM_CLASS_TABLE_H_ | 255 #endif // VM_CLASS_TABLE_H_ |
OLD | NEW |