| 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/globals.h" | 9 #include "vm/globals.h" |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 bool HasValidClassAt(intptr_t index) const { | 109 bool HasValidClassAt(intptr_t index) const { |
| 110 ASSERT(IsValidIndex(index)); | 110 ASSERT(IsValidIndex(index)); |
| 111 return table_[index] != NULL; | 111 return table_[index] != NULL; |
| 112 } | 112 } |
| 113 | 113 |
| 114 intptr_t NumCids() const { return top_; } | 114 intptr_t NumCids() const { return top_; } |
| 115 | 115 |
| 116 void Register(const Class& cls); | 116 void Register(const Class& cls); |
| 117 | 117 |
| 118 void RegisterAt(intptr_t index, const Class& cls); |
| 119 |
| 118 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 120 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 119 | 121 |
| 122 void Validate(); |
| 123 |
| 120 void Print(); | 124 void Print(); |
| 121 | 125 |
| 122 void PrintToJSONStream(JSONStream* stream); | 126 void PrintToJSONStream(JSONStream* stream); |
| 123 | 127 |
| 124 static intptr_t table_offset() { | 128 static intptr_t table_offset() { |
| 125 return OFFSET_OF(ClassTable, table_); | 129 return OFFSET_OF(ClassTable, table_); |
| 126 } | 130 } |
| 127 | 131 |
| 128 // Called whenever a class is allocated in the runtime. | 132 // Called whenever a class is allocated in the runtime. |
| 129 void UpdateAllocatedNew(intptr_t cid, intptr_t size); | 133 void UpdateAllocatedNew(intptr_t cid, intptr_t size); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ClassHeapStats* StatsAt(intptr_t cid); | 172 ClassHeapStats* StatsAt(intptr_t cid); |
| 169 void UpdateLiveOld(intptr_t cid, intptr_t size); | 173 void UpdateLiveOld(intptr_t cid, intptr_t size); |
| 170 void UpdateLiveNew(intptr_t cid, intptr_t size); | 174 void UpdateLiveNew(intptr_t cid, intptr_t size); |
| 171 | 175 |
| 172 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 176 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 } // namespace dart | 179 } // namespace dart |
| 176 | 180 |
| 177 #endif // VM_CLASS_TABLE_H_ | 181 #endif // VM_CLASS_TABLE_H_ |
| OLD | NEW |