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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 intptr_t NumCids() const { return top_; } | 172 intptr_t NumCids() const { return top_; } |
173 | 173 |
174 // Used to drop recently added classes. | 174 // Used to drop recently added classes. |
175 void SetNumCids(intptr_t num_cids) { | 175 void SetNumCids(intptr_t num_cids) { |
176 ASSERT(num_cids <= top_); | 176 ASSERT(num_cids <= top_); |
177 top_ = num_cids; | 177 top_ = num_cids; |
178 } | 178 } |
179 | 179 |
180 void Register(const Class& cls); | 180 void Register(const Class& cls); |
181 | 181 |
| 182 void AllocateIndex(intptr_t index); |
| 183 |
182 void RegisterAt(intptr_t index, const Class& cls); | 184 void RegisterAt(intptr_t index, const Class& cls); |
183 | 185 |
184 #if defined(DEBUG) | 186 #if defined(DEBUG) |
185 void Unregister(intptr_t index); | 187 void Unregister(intptr_t index); |
186 #endif | 188 #endif |
187 | 189 |
188 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 190 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
189 | 191 |
190 void Validate(); | 192 void Validate(); |
191 | 193 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); | 262 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); |
261 void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1); | 263 void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1); |
262 void UpdateLiveNew(intptr_t cid, intptr_t size); | 264 void UpdateLiveNew(intptr_t cid, intptr_t size); |
263 | 265 |
264 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 266 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
265 }; | 267 }; |
266 | 268 |
267 } // namespace dart | 269 } // namespace dart |
268 | 270 |
269 #endif // VM_CLASS_TABLE_H_ | 271 #endif // VM_CLASS_TABLE_H_ |
OLD | NEW |